On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Sets & Logic · Grade 9-12

Contrapositive

The contrapositive of P→Q is ¬Q→¬P — negate both parts and reverse them.

(P→Q)⇔(¬Q→¬P)

Quick Answer

The contrapositive of P→Q is ¬Q→¬P — negate both parts and reverse them. Use it when proving 'if P then Q' directly is awkward but the reversed, negated form is easy. 'If n2 is even, then n is even' is hard to attack head-on, but its contrapositive, 'if n is odd, then n2 is odd', takes one line. A conditional and its contrapositive are always true together or false together, so proving one proves the other. The converse and the inverse do not share this property.

Why This Matters

The contrapositive is one of the main tools of proof: statements whose hypothesis gives you little to work with ('n2 is even') become easy once flipped ('n is odd, so n=2k+1'). It also keeps everyday reasoning honest: from 'every mammal is warm-blooded' you may conclude 'a cold-blooded animal is not a mammal', but not 'a warm-blooded animal is a mammal', since birds are warm-blooded too.

Intuitive Explanation

Start with a rule you trust: 'If a shape is a square, then it has four sides.' Suppose a shape does not have four sides, say a triangle. Could it be a square? No, because then it would have four sides. So 'if a shape does not have four sides, then it is not a square' must also be true. That second sentence is the contrapositive: negate both parts and swap their order, so P→Q becomes ¬Q→¬P.

The two forms always agree because they rule out the same situation. P→Q is false only when P is true and Q is false. ¬Q→¬P is false only when ¬Q is true and ¬P is false, which is the same situation. Their truth-table columns are identical, so you may prove whichever is easier. For 'if n2 is even, then n is even', prove instead 'if n is odd, then n2 is odd': (2k+1)2=4k2+4k+1=2(2k2+2k)+1, which is odd.

Doing only half of the move gives a different statement. Swap without negating and you get the converse, 'if it has four sides, then it is a square', which a non-square rectangle disproves. Negate without swapping and you get the inverse, 'if it is not a square, then it does not have four sides', which the same rectangle disproves. Only the full move, negate both and swap, keeps the truth value.

Think of it like this. The contrapositive is a security rule read backwards: 'everyone inside the lab wears a badge' means 'anyone without a badge is not inside the lab'. Both sentences forbid exactly one thing, a person inside without a badge, so they stand or fall together. 'Everyone with a badge is inside' forbids something else entirely.

Core idea. The contrapositive of if P then Q is if not Q then not P, always equivalent.


When to Use

Use the contrapositive when a conditional's hypothesis is hard to work with but its negated conclusion gives you something concrete, such as 'odd', 'not divisible by 3' or 'not equal'. It also checks arguments: from P→Q and not Q, conclude not P. If you need both directions, prove the conditional and its converse (a biconditional). If you only swapped or only negated, you have the converse or the inverse, which prove nothing.

Tip. Ask: Did I negate BOTH parts AND reverse their order, keeping the same truth value?

How to Recognize It

Before switching to the contrapositive, check that you start from a genuine if-then claim and that its negated conclusion gives you something you can work with.

  1. Is the claim in if-then form, or can it be rewritten that way, as 'all squares are rectangles' can?

    If yes, a contrapositive exists: 'if a shape is not a rectangle, then it is not a square'. If no, as with a plain 'and' or 'or' claim, there is no contrapositive; use negation and De Morgan's laws instead.

  2. Does the negated conclusion give you a usable form, such as 'n is odd' meaning n=2k+1?

    If yes, prove the contrapositive: start from ¬Q and reach ¬P. If no, and the hypothesis already hands you something concrete, a direct proof from P to Q is usually shorter.

  3. Are you told that the conclusion failed, and asked what that says about the hypothesis?

    If yes, the contrapositive is the tool: from P→Q and 'not Q', conclude 'not P'. If instead you are told the conclusion happened, nothing follows about P, and concluding P is the converse error.

  4. Do the parts already contain 'not', as in 'if x≠0, then x2≠0'?

    If yes, negating removes the 'not': the contrapositive is 'if x2=0, then x=0'. If no, add 'not' to each part as usual, and remember that negating 'all' gives 'at least one is not'.

Contrapositive compared with Converse, Inverse, and Original conditional

The contrapositive, converse, inverse and original conditional all rearrange the same two parts. Ask what was done to them: swapped and both negated (contrapositive, same truth value), only swapped (converse), only negated (inverse), or left alone (the original).

Contrapositive

Meaning
Use this when a conditional is hard to prove directly but its negated, reversed form is straightforward.
Key test
Did I negate BOTH parts AND reverse their order, keeping the same truth value?
Formula
(P→Q)⇔(¬Q→¬P)
Example
State the contrapositive of 'If n is even, then n2 is even.'

Converse

Meaning
Reverses only, without negating; NOT equivalent.
Key test
Use to state the reversed claim, not to prove the original.
Formula
Q→P
Example
Converse of P→Q is Q→P

Inverse

Meaning
Negates only, without reversing; NOT equivalent.
Key test
Recognize it as the easy mistake, not a valid proof route.
Formula
¬P→¬Q
Example
Inverse of P→Q is ¬P→¬Q

Original conditional

Meaning
The starting statement the contrapositive is equivalent to.
Key test
Use directly when a forward proof is easy.
Formula
P→Q
Example
'if even then divisible by 2'

Formula & Notation

(P→Q)⇔(¬Q→¬P)
(P→Q)⇔(¬Q→¬P); both have identical truth tables in all four rows

How to read it: ∼Q→∼P is the contrapositive of P→Q

Worked Examples

Example 1 — Write the contrapositive

Easy

State the contrapositive of 'If n is even, then n2 is even.'
Show the steps and the answer
  1. Label the parts: P = 'n is even', Q = 'n2 is even'.

    The contrapositive is built from these two pieces.

  2. Negate each: ¬Q = 'n2 is not even', ¬P = 'n is not even'.

    Both parts get negated, not just one.

  3. Swap the order: ¬Q→¬P reads 'if n2 is not even, then n is not even'.

    The negated conclusion becomes the new hypothesis.

  4. Rewrite for whole numbers: 'not even' means odd, giving 'if n2 is odd, then n is odd'.

    For integers, 'odd' and 'not even' say the same thing, so the cleaner wording is allowed.

Answer: 'If n2 is odd, then n is odd'

Takeaway: Negate both parts and swap them; for integers, 'not even' can be written as 'odd'.

Example 2 — The inverse trap

Standard

Is 'If n is not even, then n2 is not even' the contrapositive of 'If n is even, then n2 is even'?
Show the steps and the answer
  1. Compare the sentence with the original: both parts are negated, but 'n' still comes first and 'n2' second.

    Negating without swapping produces the inverse ¬P→¬Q.

  2. Test the inverse form on another true rule: 'if n is a multiple of 4, then n is even'. Its inverse, 'if n is not a multiple of 4, then n is not even', fails at n=6.

    An equivalent form would have to stay true whenever the original is true, and the inverse does not.

  3. Note that this particular inverse happens to be true, since odd numbers have odd squares, but for an unrelated reason.

    An inverse always has the same truth value as the converse, and that has to be proved separately.

  4. Write the real contrapositive: 'if n2 is not even, then n is not even'.

    Negating and swapping keeps the truth value of the original every time.

Answer: No — that is the inverse, not equivalent

Takeaway: The inverse negates without swapping and is not equivalent to the original, even when it happens to be true; the contrapositive must swap as well.

Example 3 — Find the mistake: swapping without negating

Application

A theorem says: 'If a quadrilateral is a rectangle, then its diagonals are equal.' Kim wants the contrapositive and writes: "If a quadrilateral's diagonals are equal, then it is a rectangle." Find the mistake and correct it.
Show the steps and the answer
  1. Label the parts: P = 'it is a rectangle', Q = 'its diagonals are equal'. Kim wrote Q→P.

    She swapped the parts but did not negate them, which gives the converse.

  2. Test the converse: an isosceles trapezoid has equal diagonals but is not a rectangle.

    One counterexample makes the converse false while the theorem stays true, so the two are not equivalent.

  3. Negate both parts and swap: ¬Q→¬P.

    Only the full move keeps the truth value of the theorem.

  4. Write it out: 'If a quadrilateral's diagonals are not equal, then it is not a rectangle.'

    This must be true, because a rectangle with unequal diagonals would break the theorem.

Answer: 'If a quadrilateral's diagonals are not equal, then it is not a rectangle.'

Takeaway: Swapping alone gives the converse, which can be false; the contrapositive needs the swap and both negations.

Where You'll See It

  • Tracking down a software fault

    A programmer knows: if the input file is valid, the program prints a report. One morning no report appears. By the contrapositive, the input file was not valid (as long as the rule holds), so that is the first place to look, rather than rewriting the report code.

  • A building inspector's reasoning

    Building codes say: if a room is used as a bedroom, it must have a window. An inspector who finds a windowless room concludes, by the contrapositive, that it may not be used as a bedroom. Finding a room with a window tells the inspector nothing about its use; that would be the converse trap.

Common Mistakes

  1. The slip: Negating without reversing, giving the inverse ¬P→¬Q

    Instead: the contrapositive must reverse too.

  2. The slip: Reversing without negating, giving the converse Q→P

    Instead: neither is equivalent to the original.

  3. The slip: Forgetting the equivalence

    Instead: the contrapositive always shares the original's truth value, so proving it proves the original.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Write the contrapositive of "If a number is divisible by 10, then it ends in 0."

    Hint: Negate both parts and swap their order.

  2. Write the contrapositive of "If x>4, then x2>16."

    Hint: What is the negation of >? Then swap the parts.

  3. "If a shape is a triangle, then its angles sum to 180∘" is true. Without checking anything, what is the truth value of its contrapositive?

    Hint: How is a contrapositive's truth value related to the original's?

  4. To prove "If 3n+1 is even, then n is odd," a student proves the contrapositive instead. What does she prove? Check it with n=4.

    Hint: Negate both parts: not odd is even, not even is odd.

  5. For "If it snows, then school is closed," which is the contrapositive: (a) "If school is closed, then it snows", (b) "If it does not snow, then school is open", (c) "If school is open, then it is not snowing"?

    Hint: Which choice both negates and reverses the parts?

  6. For "If x=3, then x2=9," Jo writes the contrapositive as "If x≠3, then x2≠9." Correct Jo.

    Hint: Did Jo reverse the order of the parts? Test x=−3.

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

What is the contrapositive of the contrapositive?

It is the original statement. Starting from ¬Q→¬P\neg Q \to \neg P, swap the parts and negate both again: you get ¬¬P→¬¬Q\neg\neg P \to \neg\neg Q, which simplifies to P→QP \to Q. So a conditional and its contrapositive form a matched pair, each one the contrapositive of the other. Applying the move twice never takes you anywhere new.

Is proof by contrapositive the same as proof by contradiction?

They are close relatives but not the same. In a contrapositive proof you assume ¬Q\neg Q and aim for one specific target, ¬P\neg P. In a proof by contradiction you assume PP and ¬Q\neg Q together and aim for any impossibility at all. Every contrapositive proof can be rewritten as a proof by contradiction, but the contrapositive is often cleaner, because you know exactly where you are heading.

Do people use contrapositive reasoning outside math?

Constantly. In the Sherlock Holmes story Silver Blaze, a dog that would bark at any stranger stayed silent during a night-time theft, so Holmes concluded that the thief was no stranger. That is the contrapositive: from 'stranger →\to bark' and 'no bark', conclude 'no stranger'. Reading a silent smoke alarm as 'no smoke reached it' works the same way, provided the alarm works.

Can the contrapositive help me spot a false conditional?

Yes, because a counterexample to one is a counterexample to the other: both fail in the same situation, PP true with QQ false. If you suspect that 'if n2>25n^2 > 25, then n>5n > 5' is false, look at its contrapositive, 'if n≤5n \le 5, then n2≤25n^2 \le 25'. The value n=−6n = -6 breaks both, since 36>2536 > 25 but −6≤5-6 \le 5.

Learning Path

Contrapositive

You are here

You need Conditional Statement (when P→Q is false) and Negation (how to write 'not Q' correctly, including with 'all' and 'some'). The contrapositive adds an equivalent form of every conditional. Next, Proof Techniques use it as proof by contrapositive, a close relative of proof by contradiction.

See Also