math.wiki
Logic, proof and discrete math › Logic › Conditionals, converse, inverse, contrapositive
Open on the map
Geometry

Conditionals, converse, inverse, contrapositive

Almost every theorem says “if this, then that”. What exactly does such a sentence promise, and which of the three ways of turning it around still makes the same promise?

Where you are 9 in Logic

Why this exists

Open any mathematics book at a theorem and you will almost always find the same shape underneath: if something holds, then something else holds. “If two angles are vertical angles, then they are equal.” “If a triangle has a right angle, then the squares on its two shorter sides add up to the square on the longest.” Even a sentence that does not look like one usually hides one: “every multiple of 4 is even” means if a whole number is a multiple of 4, then it is even.

Such a sentence is called a conditional, and two things have to be settled before it can be used safely. First, exactly what does it promise, and in which situations is it broken? Second, people turn conditionals around all the time, often without noticing. From “every multiple of 4 is even” it is tempting to slide to “every even number is a multiple of 4”, which is false, since 6 is even and not a multiple of 4. There are three natural ways to turn a conditional around, and only one of them is guaranteed to say the same thing as the original. Knowing which one is the difference between a correct proof and a convincing-looking wrong one.

Definition

For statements P and Q, the conditional “if P, then Q” is written P \to Q. The statement P after “if” is its hypothesis (also called the antecedent), and the statement Q after “then” is its conclusion (the consequent). Many books, especially in geometry, write the same arrow as P \Rightarrow Q.

A conditional is a promise: whenever P holds, Q holds too. It is false in exactly one case, when P is true and Q is false, and true in the other three:

RowPQP \to Q
1TTT
2TFF
3FTT
4FFT

Rows 1 and 2 are the promise kept and the promise broken. Rows 3 and 4, where the hypothesis is false, count as true because the promise asks nothing of them. They have to: “for every whole number n, if n is a multiple of 4, then n is even” is true, and a claim about every n is true only if it is true at each n. At n = 2 the hypothesis is false and the conclusion true (row 3); at n = 3 both are false (row 4). If either row held F, this true sentence would come out false. A conditional that is true because its hypothesis is false is called vacuously true. The full case for this table is made in the lesson on the truth table for the conditional.

The same conditional P \to Q can be said in many ways, and all of these mean exactly it:

  • if P, then Q
  • P implies Q
  • Q if P
  • Q whenever P
  • P only if Q
  • P is sufficient for Q
  • Q is necessary for P

A sentence of the form “every ... is a ...” is a conditional too: “every square is a rectangle” says if a shape is a square, then it is a rectangle.

“Only if” is the one that trips readers up. “P only if Q” says P cannot happen without Q, so it is P \to Q, not Q \to P: “you may board only if you have a ticket” means if you board, then you have a ticket. The words sufficient (the hypothesis is enough) and necessary (the conclusion cannot be done without) get their own full treatment in necessary and sufficient conditions.

Swapping the two parts, negating them (see statements and negation), or both, gives three new conditionals from the same P and Q:

NameStatementBuilt by
originalP \to Q
converseQ \to Pswap
inverse\neg P \to \neg Qnegate both
contrapositive\neg Q \to \neg Pswap, negate both

To swap is to exchange the hypothesis and the conclusion; to negate both is to replace each part by its negation.

Two statements are logically equivalent, written \equiv, when they have the same truth value in every possible case: their truth tables agree on every row. Logically equivalent statements are two ways of saying one thing, so either may replace the other anywhere. (More on this in logical equivalence.)

Intuition

Picture every possible case as a region, with the cases where P is true marked out as one patch and the cases where Q is true as another. The conditional P \to Q says there is no case with P true and Q false, so the P patch must sit wholly inside the Q patch.

P Q A B C every case
Figure 1“If P, then Q” puts the P circle inside the Q oval. A, B and C are the three kinds of case that can still happen; P true with Q false would need a point inside the circle and outside the oval, and there is none.

Now read each of the four statements the same way, by the single case it forbids. A conditional is false only when its hypothesis is true and its conclusion is false:

StatementIt is false only when
P \to QP is true and Q is false
Q \to PQ is true and P is false
\neg P \to \neg Q\neg P is true and \neg Q is false, so P is false and Q is true
\neg Q \to \neg P\neg Q is true and \neg P is false, so Q is false and P is true

The original and the contrapositive forbid the same case: P without Q. In the picture, the contrapositive says “outside the Q oval, you are outside the P circle”, which is the same nesting read from the outside in. The converse and the inverse also forbid a shared case, but a different one: Q without P, a point like B. In the picture they would need the Q oval inside the P circle, a different drawing altogether, and the original says nothing about whether that holds.

original
P \to Q
converse
Q \to P
inverse
\neg P \to \neg Q
contrapositive
\neg Q \to \neg P
swap swap negate both negate both
Figure 2Each side is one move, and the two statements it joins can differ in truth value. Each diagonal joins two statements that are always true together and false together.

So the four statements fall into two pairs. Members of a pair always agree. Across the pairs there is no such link: knowing the original is true does not tell you whether the converse is true.

Results

Contrapositive law. A conditional and its contrapositive are logically equivalent:

P \to Q \;\equiv\; \neg Q \to \neg P

Converse and inverse. The converse and the inverse are logically equivalent to each other:

Q \to P \;\equiv\; \neg P \to \neg Q

The converse is a different statement. P \to Q and Q \to P are not logically equivalent. They disagree in exactly the two cases where one of P and Q is true and the other false. The same holds for P \to Q and its inverse.

So of the three turnarounds, only the contrapositive can always stand in for the original. A theorem’s converse has to be proved separately, and it may be false.

Why it is true

Build the truth table of each pair. Negating flips each value: \neg P is F where P is T, and \neg Q is F where Q is T. Each arrow column is F only where its own hypothesis is T and its own conclusion is F. For the contrapositive that means \neg Q true and \neg P false, that is, Q false and P true, which is row 2.

RowPQP \to Q\neg Q \to \neg P
1TTTT
2TFFF
3FTTT
4FFTT

For the inverse, \neg P true and \neg Q false means P false and Q true, which is row 3:

RowPQQ \to P\neg P \to \neg Q
1TTTT
2TFTT
3FTFF
4FFTT

Read the columns in pairs. P \to Q and \neg Q \to \neg P both read T, F, T, T: they agree on every row, so they are logically equivalent. Q \to P and \neg P \to \neg Q both read T, T, F, T, so they are logically equivalent too. But P \to Q and Q \to P disagree on rows 2 and 3, so they are not. Four rows cover every possible pair of truth values for P and Q, so this is a check of every case there is, whatever P and Q say.

There is also a shorter way to see the second result once the first is known. The inverse \neg P \to \neg Q is the contrapositive of the converse: take Q \to P, swap its parts and negate both, and you get \neg P \to \neg Q. By the contrapositive law, a statement and its contrapositive are equivalent, so the converse and the inverse are equivalent.

Finally, taking the contrapositive twice returns the original: the contrapositive of \neg Q \to \neg P is \neg\neg P \to \neg\neg Q, and a double negation cancels, giving P \to Q.

Worked examples

Example 1

Finding the if-then inside a sentence

Write each sentence as “if ..., then ...”, and name its hypothesis and conclusion.

(a) Every multiple of 10 ends in the digit 0.

(b) You may board the train only if you have a ticket.

(c) x^2 = 49 whenever x = 7.

(d) For a triangle, having two equal sides is necessary for having three equal sides.

Solution

(a) “Every multiple of 10 ...” makes a claim about each whole number that is a multiple of 10, so that condition goes after “if”: if a whole number is a multiple of 10, then it ends in the digit 0. Hypothesis: the number is a multiple of 10. Conclusion: it ends in 0.

(b) “Only if” introduces what boarding cannot happen without, so the ticket is the conclusion: if you board the train, then you have a ticket. It does not say that having a ticket gets you on board; a canceled train leaves ticket holders on the platform without breaking the rule.

(c) “Whenever” introduces the hypothesis, even though it comes second in the sentence: if x = 7, then x^2 = 49.

(d) A necessary condition is the conclusion. Having three equal sides cannot happen without having two, so: if a triangle has three equal sides, then it has two equal sides. Hypothesis: three equal sides. Conclusion: two equal sides.

Example 2

Which row is it in?

Decide whether each conditional is true or false.

(a) If 7 is odd, then 7^2 = 49.

(b) If 6 is odd, then 6^2 = 49.

(c) If 2 is even, then 2 is not prime.

(d) If 5 > 8, then 5 < 8.

Solution

Work out the truth value of each part, then find the row.

(a) 7 is odd, and 7^2 = 49. Hypothesis true, conclusion true: row 1. True.

(b) 6 is even, so the hypothesis is false. That alone settles it: with a false hypothesis the statement is in row 3 or row 4, and both are true. (In fact 6^2 = 36, so the conclusion is false too, which puts it in row 4.) True, vacuously.

(c) 2 is even, so the hypothesis is true. 2 is prime (its only factors are 1 and 2), so “2 is not prime” is false. Hypothesis true, conclusion false: row 2. False.

(d) 5 > 8 is false and 5 < 8 is true: row 3. True.

Only (c) breaks its promise. Notice that in (b) and (d) the hypothesis does nothing to bring the conclusion about; in (d) it even contradicts it. The table asks only which row a statement is in, not whether its parts are connected.

Example 3

All four for a fact about multiples

For whole numbers n, take the statement “if n is a multiple of 6, then n is a multiple of 3.” Write its converse, inverse and contrapositive, and decide which of the four are true.

Solution

The hypothesis P is “n is a multiple of 6” and the conclusion Q is “n is a multiple of 3.”

  • Original: if n is a multiple of 6, then n is a multiple of 3. True: if n = 6k for a whole number k, then n = 3(2k), a multiple of 3.
  • Converse: if n is a multiple of 3, then n is a multiple of 6. False: n = 9 is a multiple of 3, but 9 \div 6 = 1.5 is not a whole number.
  • Inverse: if n is not a multiple of 6, then n is not a multiple of 3. False: n = 9 again, which is not a multiple of 6 but is a multiple of 3.
  • Contrapositive: if n is not a multiple of 3, then n is not a multiple of 6. True: if such an n were a multiple of 6, the original would make it a multiple of 3.

The pattern matches the Results: the original and the contrapositive are true together, the converse and the inverse are false together, and one number, 9, breaks both of the false ones. It breaks both because it is the case they share: Q true and P false.

Example 4

An everyday promise

Take “if Ana lives in Madrid, then she lives in Spain.” Write the other three, say which are true, and decide what follows from each piece of news: (i) Ana lives in Spain; (ii) Ana does not live in Spain; (iii) Ana does not live in Madrid.

Solution
  • Converse: if Ana lives in Spain, then she lives in Madrid. False as a general rule: someone in Seville lives in Spain and not in Madrid.
  • Inverse: if Ana does not live in Madrid, then she does not live in Spain. False for the same reason: the person in Seville does not live in Madrid but does live in Spain.
  • Contrapositive: if Ana does not live in Spain, then she does not live in Madrid. True, since Madrid is in Spain.

(i) “She lives in Spain” matches the converse’s hypothesis, and the converse is not available, so nothing follows; she may live in Madrid, Seville or anywhere else in Spain. Concluding “so she lives in Madrid” is the mistake of using the converse. (ii) “She does not live in Spain” is the contrapositive’s hypothesis, so she does not live in Madrid. This step is modus tollens. (iii) “She does not live in Madrid” is the inverse’s hypothesis, and again nothing follows: she may still live in Spain.

Example 5

Clearing the negations away

For real numbers x, decide whether “if x^2 \ne 9, then x \ne 3” is true, and do the same for its converse.

Solution

A statement full of \ne signs is awkward to think about directly. Its contrapositive swaps the parts and negates both, and the negation of x \ne 3 is x = 3, while the negation of x^2 \ne 9 is x^2 = 9. So the contrapositive is

\text{if } x = 3, \text{ then } x^2 = 9

which is plainly true, since 3^2 = 9. The contrapositive is true, so the original is true.

The converse is “if x \ne 3, then x^2 \ne 9.” Try to break it: a counterexample needs x \ne 3 with x^2 = 9, and x = -3 does it, since (-3)^2 = 9. So the converse is false. Its equivalent partner, the inverse “if x^2 = 9, then x = 3”, fails at the same x = -3.

Example 6

A theorem whose converse also holds

The Pythagorean theorem says: if a triangle has a right angle, and c is the side opposite it, then a^2 + b^2 = c^2, where a and b are the other two sides. Its converse, proved separately in the converse of the Pythagorean theorem, says: if a^2 + b^2 = c^2, then the angle opposite c is a right angle. Use the right statement to decide whether a triangle with sides (a) 7, 24, 25 and (b) 6, 7, 9 has a right angle.

Solution

(a) 7^2 + 24^2 = 49 + 576 = 625, and 25^2 = 625. The hypothesis of the converse holds with c = 25, so the angle opposite the side 25 is a right angle. The theorem itself would be no help here: its hypothesis is the right angle, which is what we are trying to find out.

(b) Here the tool is the contrapositive of the theorem: if a^2 + b^2 \ne c^2, then the angle opposite c is not a right angle. Any of the three sides could be the one opposite a right angle, so test each:

  • opposite 9: 6^2 + 7^2 = 36 + 49 = 85, and 9^2 = 81
  • opposite 7: 6^2 + 9^2 = 36 + 81 = 117, and 7^2 = 49
  • opposite 6: 7^2 + 9^2 = 49 + 81 = 130, and 6^2 = 36

The two sides of the equation never match, so by the contrapositive no angle of this triangle is a right angle. The theorem and its converse together say that a triangle has a right angle opposite c exactly when a^2 + b^2 = c^2; when a converse holds like this, the two directions combine into a biconditional.

Example 7

Proving a statement through its contrapositive

Prove that for every whole number n: if n^2 is even, then n is even.

Solution

A direct start, “suppose n^2 = 2m”, gives a fact about n^2 and no obvious way back to n. The contrapositive starts from something concrete instead. The negation of “n is even” is “n is odd”, and the negation of “n^2 is even” is “n^2 is odd”, so the contrapositive is: if n is odd, then n^2 is odd.

Suppose n is odd, so n = 2k + 1 for a whole number k. Then

n^2 = (2k + 1)^2 = 4k^2 + 4k + 1

and 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1 is one more than an even number, so it is odd. The contrapositive holds for every n, and a statement and its contrapositive are equivalent, so the original holds for every n. Proving a conditional this way is the method of proof by contraposition.

Here the converse is true as well: if n is even, n = 2k and n^2 = 4k^2 = 2(2k^2) is even. So n is even exactly when n^2 is even.

Check. n = 7: 49 is odd and 7 is odd. n = 10: 100 is even and 10 is even.

Boundaries

The arrow claims no cause and no order in time. P \to Q asks only whether the case “P true, Q false” occurs. It does not say P brings Q about, or comes first, or is even about the same subject. Example 2(d) is true even though its hypothesis contradicts its conclusion.

A conditional says nothing about the cases where its hypothesis fails. When P is false, P \to Q is true whatever Q is. That is exactly why the inverse does not follow: the original has made no promise at all about what happens without P.

Everyday “if” is often looser than the mathematical one. “If you finish your homework, you can watch a film” is usually heard as “only if” as well, a promise in both directions. In mathematics, “if” means one direction only, and a second direction has to be stated and proved on its own, as in converses and biconditional definitions. The one standing exception is a definition: “a triangle is isosceles if it has two equal sides” is meant both ways, by convention.

Claims about every value keep their “for every”. “For every x, if P(x) then Q(x)” has contrapositive “for every x, if not Q(x) then not P(x)”. Only the two parts are negated, never the “for every”; negating that too gives a different statement, the subject of negating a quantified statement. Such a claim is false as soon as one value of x makes P(x) true and Q(x) false, and that value is a counterexample.

The contrapositive is not the negation. The negation of P \to Q is “P and not Q”, true in exactly the one row where P \to Q is false. The contrapositive has the same truth value as P \to Q; the negation always has the opposite one. Why the negation takes that form is shown in saying a conditional without if-then.

Negating a part that contains “and” or “or” flips the connective. The negation of “x > 0 and y > 0” is “x \le 0 or y \le 0”, by De Morgan’s laws. Get that wrong and the “contrapositive” is a different statement.

Everything here assumes each statement is true or false. The four-row table needs it. Some logics drop that assumption, and in one of them, intuitionistic logic, P \to Q still gives \neg Q \to \neg P, but the step back from \neg Q \to \neg P to P \to Q is no longer allowed.

Where this goes next

The table in the Definition is worked out in full, with the reasons for its two vacuous rows, in the truth table for the conditional. The words “sufficient” and “necessary”, and what happens when a conditional and its converse both hold, are developed in necessary and sufficient conditions and the biconditional. The contrapositive law gets its own lesson in a conditional and its contrapositive, and the fact that P \to Q can be rewritten as “not P, or Q” is the subject of saying a conditional without if-then.

In geometry, theorems arrive with converses that may or may not hold, so each direction needs its own proof (converses and biconditional definitions). Using a conditional to draw a conclusion is modus ponens (from P \to Q and P, conclude Q), and using its contrapositive is modus tollens (from P \to Q and \neg Q, conclude \neg P); both lessons also name the two fallacies that come from leaning on the converse or the inverse.

Proofs are built from exactly these if-then steps. A direct proof of P \to Q assumes P and reaches Q; a two-column proof is a chain of conditionals with a reason for each link; and proof by contraposition proves the contrapositive instead, as Example 7 did.

Exercises

Naming the parts

  1. Name the hypothesis and the conclusion of “if a whole number ends in 5, then it is divisible by 5.”
  2. Write as an if-then statement, and say whether it is true: “every prime number greater than 2 is odd.”
  3. Write as an if-then statement: “a triangle is equilateral only if it is isosceles.”
  4. Write as an if-then statement, and say whether it is true: “for a whole number to be divisible by 9, it is necessary that it be divisible by 3.”

True or false

  1. True or false: “if 9 is odd, then 9 is prime.”
  2. True or false: “if 9 is even, then 9 is prime.”
  3. True or false: “if 4 + 5 = 9, then 4 \times 5 = 20.”
  4. A conditional P \to Q is false. Find the truth values of P, Q, its converse, its inverse and its contrapositive.

Writing the three relatives

  1. Write the converse, inverse and contrapositive of “if a polygon is a hexagon, then it has six sides.” Which of the four are true?
  2. For real x, write the converse, inverse and contrapositive of “if x = -2, then x^2 = 4.” Which of the four are true?
  3. For real x, write the converse, inverse and contrapositive of “if x = -2, then x^3 = -8.” Which of the four are true?
  4. In symbols, write the converse, inverse and contrapositive of P \to \neg Q, simplifying any double negation.

Deciding all four

For each statement, decide which of the original, converse, inverse and contrapositive are true, and give a counterexample to each false one.

  1. For whole numbers n: if n is divisible by 4, then n is even.
  2. For real x: if x > 2, then x > 5.
  3. For real x: if x^2 < 1, then x < 1.
  4. For whole numbers n: if n ends in the digit 0, then n is divisible by 5.

Using the contrapositive

  1. Prove that for every whole number n: if n^2 is odd, then n is odd.
  2. Prove that for whole numbers a and b: if a + b is odd, then a \ne b.
  3. For real x, decide whether “if x^3 \ne 8, then x \ne 2” is true, and whether its converse is true.

Reasoning

  1. Without a truth table, explain why a conditional’s converse and its inverse always have the same truth value.
  2. Show that P \to Q and its converse Q \to P can never both be false.
  3. A parent says: “If you tidy your room, you can go out.” The room stays untidy, and the child goes out anyway. Did the parent’s statement turn out false? What should the parent have said to rule this out?
  4. A claim about every real x has the form “if P(x), then Q(x).” Explain why any value of x that is a counterexample to its converse is also a counterexample to its inverse.
Answers
  1. Hypothesis: the whole number ends in 5. Conclusion: it is divisible by 5.
  2. If a number is prime and greater than 2, then it is odd. True: an even number greater than 2 has 2 as a factor besides 1 and itself, so it is not prime.
  3. If a triangle is equilateral, then it is isosceles. “Only if” introduces the conclusion.
  4. If a whole number is divisible by 9, then it is divisible by 3. True: n = 9k gives n = 3(3k). The necessary condition is the conclusion.
  5. False. 9 is odd, so the hypothesis is true, but 9 = 3 \times 3 is not prime: row 2.
  6. True. 9 is not even, so the hypothesis is false and the statement is vacuously true, whatever its conclusion says.
  7. True. Both parts are true, 4 + 5 = 9 and 4 \times 5 = 20: row 1.
  8. P \to Q is false only in row 2, so P is true and Q is false. Then the converse Q \to P is true (false hypothesis), the inverse \neg P \to \neg Q is true (false hypothesis), and the contrapositive \neg Q \to \neg P is false, matching the original.
  9. Converse: if a polygon has six sides, then it is a hexagon. Inverse: if a polygon is not a hexagon, then it does not have six sides. Contrapositive: if a polygon does not have six sides, then it is not a hexagon. All four are true, because a hexagon is defined as a polygon with six sides, so the converse holds as well as the original.
  10. Converse: if x^2 = 4, then x = -2. Inverse: if x \ne -2, then x^2 \ne 4. Contrapositive: if x^2 \ne 4, then x \ne -2. The original and the contrapositive are true, since (-2)^2 = 4. The converse and the inverse are false, both broken by x = 2, since 2^2 = 4.
  11. Converse: if x^3 = -8, then x = -2. Inverse: if x \ne -2, then x^3 \ne -8. Contrapositive: if x^3 \ne -8, then x \ne -2. All four are true: (-2)^3 = -8, and x = -2 is the only real number whose cube is -8, since a larger real number always has a larger cube.
  12. Converse: \neg Q \to P. Inverse: \neg P \to \neg\neg Q, which is \neg P \to Q. Contrapositive: \neg\neg Q \to \neg P, which is Q \to \neg P.
  13. Original and contrapositive (if n is odd, then n is not divisible by 4) are true: n = 4k gives n = 2(2k). Converse (if n is even, then n is divisible by 4) and inverse (if n is not divisible by 4, then n is odd) are false: n = 2 is even and not divisible by 4.
  14. Original and contrapositive (if x \le 5, then x \le 2) are false: x = 3 has 3 > 2 but 3 \le 5. Converse (if x > 5, then x > 2) and inverse (if x \le 2, then x \le 5) are true.
  15. Original and contrapositive (if x \ge 1, then x^2 \ge 1) are true: x^2 < 1 means -1 < x < 1. Converse (if x < 1, then x^2 < 1) and inverse (if x^2 \ge 1, then x \ge 1) are false: x = -2 has -2 < 1 but (-2)^2 = 4.
  16. Original and contrapositive (if n is not divisible by 5, then n does not end in 0) are true: a number ending in 0 is a multiple of 10, so of 5. Converse (if n is divisible by 5, then it ends in 0) and inverse (if n does not end in 0, then it is not divisible by 5) are false: n = 15.
  17. Contrapositive: if n is even, then n^2 is even. With n = 2k, n^2 = 4k^2 = 2(2k^2), which is even. So the original holds.
  18. Contrapositive: if a = b, then a + b is even. With a = b, a + b = 2a, which is even. So the original holds.
  19. Both are true. Contrapositive of the original: if x = 2, then x^3 = 8, true since 2^3 = 8. The converse, “if x \ne 2, then x^3 \ne 8”, has contrapositive “if x^3 = 8, then x = 2”, true because x = 2 is the only real cube root of 8. Unlike Example 5, no negative number spoils it, since (-2)^3 = -8.
  20. The inverse is the contrapositive of the converse: swap the parts of Q \to P and negate both, and you get \neg P \to \neg Q. A statement and its contrapositive always share a truth value.
  21. P \to Q is false only when P is true and Q is false. Q \to P is false only when Q is true and P is false. Those two cases cannot happen at once, so on every row of the table at least one of the two is true: the columns read T, F, T, T and T, T, F, T, and no row has F in both.
  22. No. The statement promised something only about a tidy room; with the hypothesis false it is vacuously true, whatever the child does. To rule this out the parent needed the converse: “you can go out only if you tidy your room”, that is, if you go out, then you have tidied your room.
  23. A counterexample to the converse “if Q(x), then P(x)” is a value with Q(x) true and P(x) false. At that value \neg P(x) is true and \neg Q(x) is false, which is exactly the case that breaks the inverse “if \neg P(x), then \neg Q(x)”.
kg1128 · updated 2026-10-02 · CC-BY-SA-4.0