See How Things Work

Converse, inverse and contrapositive

Unit
Logic
Part
1. Statements
Lesson
1.6

From a conditional “if p, then q” three more conditionals can be made: its converse, its inverse and its contrapositive. This lesson defines them, proves that only the contrapositive always has the same truth value as the original, warns against one of the most common errors in reasoning, assuming the converse, and uses the contrapositive to prove statements about whole numbers.

Three conditionals made from one

Lesson 1.5 (Conditional statements) defined p → q, false only when p is true and q is false. Moving and negating its two parts gives three related conditionals, which occur so often that they have names.⁠[1]

Definition (Converse, inverse, contrapositive).

Let p → q be a conditional statement.

  • Its converse is q → p: the hypothesis and the conclusion are interchanged.⁠[1][2][3]
  • Its inverse is ¬p → ¬q: the hypothesis and the conclusion are both negated.⁠[1][4]
  • Its contrapositive is ¬q → ¬p: the hypothesis and the conclusion are interchanged and both negated.⁠[1][5][6]
swapswapnegate bothnegate bothp → qconditionalq → pconverse¬p → ¬qinverse¬q → ¬pcontrapositive
Figure. The four conditionals made from p and q. Swapping the two parts leads across, negating both parts leads down; doing both leads to the opposite corner. Boxes of the same color always have the same truth value: green, the conditional and its contrapositive; amber, the converse and the inverse.⁠[7][8]

To write them in words, negate the parts as in lesson 1.2 (Negation): the negation of “n > 4” is “n ≤ 4”, the negation of “n is not prime” is “n is prime”.

Example (The three relatives of a true statement).

Write the converse, the inverse and the contrapositive of “if n is a multiple of 10, then n is a multiple of 5”, and decide each one for whole numbers n.

  1. p: n is a multiple of 10; q: n is a multiple of 5. The statement is true: a multiple of 10 is 10 × k = 5 × (2 × k) (Factors and multiples).
  2. Converse, q → p: “if n is a multiple of 5, then n is a multiple of 10”. False: n = 15 = 3 × 5 is a multiple of 5, but 15 = 1 × 10 + 5 is not a multiple of 10.
  3. Inverse, ¬p → ¬q: “if n is not a multiple of 10, then n is not a multiple of 5”. False, again because of 15: the hypothesis is true and the conclusion false.
  4. Contrapositive, ¬q → ¬p: “if n is not a multiple of 5, then n is not a multiple of 10”. True: if n were a multiple of 10, it would be a multiple of 5, by the first step.

Answer: the statement and its contrapositive are true; the converse and the inverse are false, and one number, 15, refutes both.

p: n is a multiple of 10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
q: n is a multiple of 5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
p → qtrue for every n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
¬q → ¬pthe same cells
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
q → pfalse for 5 and 15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
¬p → ¬qthe same cells as the converse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Figure. The whole numbers from 1 to 15; a colored cell means “true for this n”. The statement and its contrapositive are true for all fifteen numbers. The converse and the inverse are false for the same two numbers, 5 and 15, the multiples of 5 that are not multiples of 10.

Which of them say the same thing

The truth table answers the question for all statements p and q at once (Truth tables). Each column below is computed from the table of the conditional, with the parts that each formula uses.

pqp → qq → p¬p → ¬q¬q → ¬p
TTTTTT
TFFTTF
FTTFFT
FFTTTT
Table. The conditional and its three relatives. The columns of p → q and ¬q → ¬p agree in every row; so do those of q → p and ¬p → ¬q. The two pairs differ in the highlighted rows 2 and 3, the rows TF and FT.⁠[7][9]
Theorem (the contrapositive).

For all statements p and q, the contrapositive ¬q → ¬p has the same truth value as p → q.

Proof.

A conditional is false exactly when its hypothesis is true and its conclusion false (lesson 1.5). So ¬q → ¬p is false exactly when ¬q is true and ¬p is false, that is, when q is false and p is true. That is exactly the case in which p → q is false. Two statements that are false in exactly the same case, and true in all the others, have the same truth value in every case. The table confirms it row by row.⁠[10]

Proposition .

(1) The inverse ¬p → ¬q has the same truth value as the converse q → p, for all p and q. (2) The converse does not always have the same truth value as p → q: when p is true and q is false, the conditional is false, but its converse and its inverse are true.

Proof.

(1) The inverse is the contrapositive of the converse: the contrapositive of q → p negates and swaps its parts, giving ¬p → ¬q. By the Theorem, applied to the conditional q → p, the two have the same truth value.

(2) In row 2, p is true and q false. Then p → q is false; q → p has the false hypothesis q, so it is true; and ¬p → ¬q has the false hypothesis ¬p, so it is true. One row in which they differ is enough.

So, of the three relatives, only the contrapositive always has the same truth value as the conditional.⁠[7] Statements that have the same truth value in every case are called equivalent: a conditional is equivalent to its contrapositive, and its converse is equivalent to its inverse, but neither of these is equivalent to the conditional.⁠[11][8] Lesson 1.8 (Logical equivalence) defines this word precisely.

Example (Relatives of statements with negations and comparisons).

Write the contrapositive of (1) “if x > 4, then x ≥ 2” for integers x, and (2) “if n is not prime, then n is not 7” for whole numbers n. Decide each statement and its contrapositive.

  1. (1) ¬q is the negation of x ≥ 2, which is x < 2; ¬p is the negation of x > 4, which is x ≤ 4. The contrapositive is “if x < 2, then x ≤ 4”. Both are true: a number greater than 4 is greater than 2, and a number less than 2 is less than 4.
  2. (2) ¬q is “n is 7” and ¬p is “n is prime”, since negating a “not” removes it (double negation). The contrapositive is “if n is 7, then n is prime”. It is true, because the only factors of 7 are 1 and 7; so the original statement is true as well.

Answer: (1) “if x < 2, then x ≤ 4”; (2) “if n is 7, then n is prime”. In each case the statement and its contrapositive have the same truth value, as the Theorem says. In (2) the contrapositive is much easier to decide.

The converse error

Caution.

One of the most common errors in reasoning is to assume that the converse, or the inverse, of a conditional says the same as the conditional.⁠[12] A conditional must never be confused with its converse.⁠[13] A true “if p, then q” says nothing about whether q forces p.

Example (A common mistake: reasoning backwards).

A student argues: “Every multiple of 4 is even. 18 is even. So 18 is a multiple of 4.” Find the error.

  1. The first sentence is the true conditional “if n is a multiple of 4, then n is even”.
  2. The student uses it backwards: from the conclusion (18 is even) to the hypothesis (18 is a multiple of 4). That is the converse, “if n is even, then n is a multiple of 4”, which was never claimed.
  3. The converse is false, and 18 is a counterexample: 18 = 9 × 2 is even, but 18 = 4 × 4 + 2 is not a multiple of 4.

Answer: the argument assumes the converse. Knowing that the conclusion of a true conditional holds tells nothing about its hypothesis.

Example (An edge case: when the converse is also true).

Decide “if n is even, then n + 1 is odd” and its converse for whole numbers n, including n = 0.

  1. If n is even, n = 2 × k for a whole number k, so n + 1 = 2 × k + 1 is odd (Even and odd numbers). For n = 0: 0 = 0 × 2 is even and 1 = 0 × 2 + 1 is odd. The statement is true.
  2. Converse: “if n + 1 is odd, then n is even”. If n + 1 = 2 × k + 1, then n = 2 × k is even. The converse is true as well.

Answer: both are true. The converse of a true conditional may be true; what fails is the rule that it must be. Here its truth needed its own proof, step 2. A statement together with its true converse is a biconditional, the subject of lesson 1.7 (Biconditional statements).

Game

Name the relative

Round
1
Score
0
Streak
0

What is the second statement, compared with the first?

Statement
If n is a multiple of 4, then n is even.
Second statement
If n is odd, then n is not a multiple of 4.

Proving a conditional through its contrapositive

Because a conditional and its contrapositive always have the same truth value, proving one proves the other. Mathematicians use this often:⁠[14] when the contrapositive is easier to prove, they prove it instead, a method called proof by contraposition.⁠[15]

Example (Using the contrapositive).

Prove that for every whole number n: if n × n > 50, then n > 7.

  1. Starting from “n × n > 50” gives no direct way to reach a statement about n itself. The contrapositive negates both parts (Negation): the negation of n > 7 is n ≤ 7, and that of n × n > 50 is n × n ≤ 50. So the contrapositive is “if n ≤ 7, then n × n ≤ 50”.
  2. The whole numbers with n ≤ 7 are 0, 1, 2, 3, 4, 5, 6 and 7, only eight of them.
  3. Their products n × n are 0, 1, 4, 9, 16, 25, 36 and 49. Each is at most 49, so each is at most 50. The contrapositive is proved: it holds for every value of n that its hypothesis allows.

Answer: the contrapositive is true for every whole number n, so by the Theorem the statement is true for every n. Check with n = 8: 8 × 8 = 64 > 50 and 8 > 7. The statement is the converse of “if n > 7, then n × n > 50”, a statement from the first example of lesson 1.5. A converse needs a proof of its own; here the contrapositive turned that proof into a check of eight cases.

The contrapositive also explains “only if”. “p only if q” says that if q fails, p fails, which is ¬q → ¬p; by the Theorem this is p → q.⁠[16]

Caution.

The contrapositive is not the negation. The negation of p → q is “p and not q” (lesson 1.5), which is true exactly when the conditional is false. The contrapositive is true exactly when the conditional is true. For “if n is a multiple of 10, then n is a multiple of 5” the contrapositive is true for every n; the negation, “n is a multiple of 10 and not a multiple of 5”, is false for every n.

Example (The relatives of a statement about squares).

For integers x, decide “if x = −3, then x × x = 9”, its converse, its inverse and its contrapositive.

  1. The statement: (−3) × (−3) = 9 by the sign rules (Sign rules), so for x = −3 both parts are true; for every other x the hypothesis is false. True.
  2. Contrapositive: “if x × x ≠ 9, then x ≠ −3”. True, by the Theorem.
  3. Converse: “if x × x = 9, then x = −3”. False: x = 3 gives 3 × 3 = 9, but 3 ≠ −3.
  4. Inverse: “if x ≠ −3, then x × x ≠ 9”. False for the same x = 3, as the Proposition predicts.

Answer: true, false, false, true (statement, converse, inverse, contrapositive).

Looking ahead.

Proof by contraposition is one of the methods of the unit Proof, in the lesson “Proof by contrapositive”. The equivalence of a conditional and its contrapositive is one of the laws collected in lesson 1.10 of this unit, “The laws of logic”.

Exercises

Exercise .

Write the converse, the inverse and the contrapositive of “if a whole number is a multiple of 8, then it is even”, and decide all four statements.

▸ Show solution
  1. The statement is true: 8 × k = 2 × (4 × k) is even.
  2. Converse: “if a number is even, then it is a multiple of 8”. False: 2 is even and not a multiple of 8.
  3. Inverse: “if a number is not a multiple of 8, then it is not even”. False: 2 again.
  4. Contrapositive: “if a number is not even, then it is not a multiple of 8”, that is, “an odd number is not a multiple of 8”. True.
Exercise .

The converse of a conditional p → q is known to be false. What are the truth values of p → q, its inverse and its contrapositive?

▸ Show solution

The converse q → p is false only when q is true and p is false. Then p → q has a false hypothesis: true. The contrapositive ¬q → ¬p has the false hypothesis ¬q: true, as the Theorem requires. The inverse ¬p → ¬q has the true hypothesis ¬p and the false conclusion ¬q: false, like the converse, as part (1) of the Proposition requires.

Exercise .

For integers x, decide “if x × x = 16, then x = 4” and its converse, inverse and contrapositive.

▸ Show solution
  1. “If x × x = 16, then x = 4” is false: x = −4 gives (−4) × (−4) = 16 but −4 ≠ 4.
  2. Its contrapositive “if x ≠ 4, then x × x ≠ 16” is false for the same reason, x = −4.
  3. Its converse “if x = 4, then x × x = 16” is true: 4 × 4 = 16.
  4. Its inverse “if x × x ≠ 16, then x ≠ 4” is true, like the converse.
Exercise .

Prove, through its contrapositive, that for all whole numbers a and b: if a × b is odd, then a is odd.

▸ Show solution

The contrapositive is “if a is not odd, then a × b is not odd”, that is, for whole numbers, “if a is even, then a × b is even”. Suppose a = 2 × k for a whole number k. Then a × b = (2 × k) × b = 2 × (k × b), which is even.

So the contrapositive is true for all whole numbers a and b, and by the Theorem so is “if a × b is odd, then a is odd”. For example, 3 × 5 = 15 is odd and 3 is odd. The same argument with a and b exchanged shows that b is odd too.

Exercise .

What is the contrapositive of the contrapositive of p → q? What is the converse of its inverse?

▸ Show solution

The contrapositive of ¬q → ¬p swaps and negates its parts: ¬¬p → ¬¬q. By double negation (lesson 1.2) ¬¬p and ¬¬q have the truth values of p and q, so it says the same as p → q, the original.

The converse of the inverse ¬p → ¬q swaps its parts: ¬q → ¬p, the contrapositive of the original.

Exercise .

Find a conditional about whole numbers that is false although its converse is true. Explain why this does not contradict the Theorem.

▸ Show solution

For example “if n is even, then n is a multiple of 4”: it is false (n = 2), while its converse “if n is a multiple of 4, then n is even” is true. There is no contradiction: the Theorem says that the contrapositive always agrees with the conditional; the Proposition shows that the converse need not, in either direction.

Summary

  1. The converse of p → q is q → p, the inverse is ¬p → ¬q, and the contrapositive is ¬q → ¬p.
  2. The contrapositive always has the same truth value as the conditional: both are false exactly when p is true and q false.
  3. The converse and the inverse always agree with each other, but not with the conditional: when p is true and q false, they are true and the conditional is false.
  4. Assuming the converse is a common error: “every multiple of 4 is even” does not make every even number a multiple of 4.
  5. A conditional can be proved by proving its contrapositive. The contrapositive is not the negation, which is “p and not q”.

Sources

  1. 1.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Converse, Contrapositive, and Inverse”), p. 9 (the whole topic: pp. 9).
    “In particular, there are three related conditional statements that occur so often that they have special names. The proposition q → p is called the converse of p → q. The contrapositive of p → q is the proposition ¬q → ¬p. The proposition ¬p → ¬q is called the inverse of p → q.”
    Used for: three conditionals related to p → q occur so often that they have names; the definitions of the converse q → p, the inverse ¬p → ¬q and the contrapositive ¬q → ¬p.
  2. 2.
    Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).
    Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 49 (the whole topic: pp. 48–49).
    “The formula Q → P is called the converse of P → Q.”
    Used for: the converse of p → q is q → p.
  3. 3.
    Donna Kirk and others, Contemporary Mathematics (OpenStax, Rice University, 2023).
    Chapter 2, “Logic”, section 2.5, “Equivalent Statements”: “Compose the Converse, Inverse, and Contrapositive of a Conditional Statement”, p. 98 (the whole topic: pp. 98–100).
    “and it is formed by interchanging the hypothesis and the conclusion.”
    Used for: the converse is formed by interchanging the hypothesis and the conclusion.
  4. 4.
    Donna Kirk and others, Contemporary Mathematics (OpenStax, Rice University, 2023).
    Chapter 2, “Logic”, section 2.5, “Equivalent Statements”: “Compose the Converse, Inverse, and Contrapositive of a Conditional Statement”, p. 98 (the whole topic: pp. 98–100).
    “and it is formed by negating both the hypothesis and the conclusion.”
    Used for: the inverse is formed by negating both the hypothesis and the conclusion.
  5. 5.
    Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).
    Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 49 (the whole topic: pp. 49).
    “The contrapositive of P → Q is the formula ¬Q → ¬P, and it is equivalent to P → Q.”
    Used for: the contrapositive of p → q is ¬q → ¬p.
  6. 6.
    Donna Kirk and others, Contemporary Mathematics (OpenStax, Rice University, 2023).
    Chapter 2, “Logic”, section 2.5, “Equivalent Statements”: “Compose the Converse, Inverse, and Contrapositive of a Conditional Statement”, p. 98 (the whole topic: pp. 98–100).
    “and it is formed by interchanging and negating both the hypothesis and the conclusion.”
    Used for: the contrapositive is formed by interchanging and negating both the hypothesis and the conclusion.
  7. 7.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Converse, Contrapositive, and Inverse”), p. 9 (the whole topic: pp. 9).
    “We will see that of these three conditional statements formed from p → q, only the contrapositive always has the same truth value as p → q.”
    Used for: of the three relatives, only the contrapositive always has the same truth value as the conditional (also in the figure and the table).
  8. 8.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Converse, Contrapositive, and Inverse”), p. 9 (the whole topic: pp. 9).
    “The converse and the inverse of a conditional statement are also equivalent, as the reader can verify, but neither is equivalent to the original conditional statement.”
    Used for: the converse is equivalent to the inverse, but neither is equivalent to the conditional (also in the figure).
  9. 9.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Converse, Contrapositive, and Inverse”), p. 9 (the whole topic: pp. 9).
    “Note that when p is true and q is false, the original conditional statement is false, but the converse and the inverse are both true.”
    Used for: when p is true and q is false, the conditional is false but the converse and the inverse are true (part 2 of the Proposition; the table).
  10. 10.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Converse, Contrapositive, and Inverse”), p. 9 (the whole topic: pp. 9).
    “To see this, note that the contrapositive is false only when ¬p is false and ¬q is true, that is, only when p is true and q is false.”
    Used for: the proof of the Theorem: the contrapositive is false only when p is true and q is false.
  11. 11.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Converse, Contrapositive, and Inverse”), p. 9 (the whole topic: pp. 9).
    “When two compound propositions always have the same truth values, regardless of the truth values of its propositional variables, we call them equivalent. Hence, a conditional statement and its contrapositive are equivalent.”
    Used for: statements with the same truth value in every case are called equivalent; a conditional is equivalent to its contrapositive.
  12. 12.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Converse, Contrapositive, and Inverse”), p. 9 (the whole topic: pp. 9).
    “Take note that one of the most common logical errors is to assume that the converse or the inverse of a conditional statement is equivalent to this conditional statement.”
    Used for: one of the most common errors is to assume that the converse or the inverse says the same as the conditional.
  13. 13.
    Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).
    Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 49 (the whole topic: pp. 48–49).
    “It is very important to make sure you never confuse a conditional statement with its converse.”
    Used for: a conditional must never be confused with its converse.
  14. 14.
    Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).
    Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 49 (the whole topic: pp. 49).
    “The equivalence of conditional statements and their contrapositives is used often in mathematical reasoning.”
    Used for: mathematicians often use the equivalence of a conditional and its contrapositive.
  15. 15.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.7, “Introduction to Proofs” (1.7.6, “Proof by Contraposition”), p. 87 (the whole topic: pp. 87–89).
    “Proofs by contraposition make use of the fact that the conditional statement p → q is equivalent to its contrapositive, ¬q → ¬p. This means that the conditional statement p → q can be proved by showing that its contrapositive, ¬q → ¬p, is true.”
    Used for: a conditional can be proved by proving its contrapositive: proof by contraposition.
  16. 16.
    Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).
    Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 51 (the whole topic: pp. 51).
    “But by the contrapositive law, this is equivalent to P → Q.”
    Used for: “p only if q” says ¬q → ¬p, which by the contrapositive law is p → q (the source’s preceding sentence: “if you’re not a citizen, then you can’t run for president, or in other words ¬Q → ¬P”).