Proof by Contrapositive
If n² is even, then n is even
Prove: for every integer $n$, if $n^2$ is even, then $n$ is even.
Write the contrapositive: Negate both parts and swap them: "if $n$ is not even, then $n^2$ is not even" = If $n$ is odd, then $n^2$ is odd
Assume the negated conclusion: Assume $n$ is odd, so $n = 2k + 1$ for some integer $k$ = $n = 2k + 1$
Square and expand: $n^2 = (2k + 1)^2 = 4k^2 + 4k + 1$ = $n^2 = 4k^2 + 4k + 1$
Bring it into the form 2m + 1: $n^2 = 2(2k^2 + 2k) + 1$, and $m = 2k^2 + 2k$ is an integer = $n^2$ is odd
Conclude: We proved "$n$ odd $\Rightarrow$ $n^2$ odd", the contrapositive of the statement = If $n^2$ is even, then $n$ is even
Answer: The contrapositive (if $n$ is odd, then $n^2$ is odd) is true, so the original statement is true. Q.E.D.
If n² is odd, then n is odd
Prove: for every integer $n$, if $n^2$ is odd, then $n$ is odd.
Write the contrapositive: Not odd means even, for the conclusion and for the hypothesis = If $n$ is even, then $n^2$ is even
Assume the negated conclusion: Assume $n$ is even, so $n = 2k$ for some integer $k$ = $n = 2k$
Square: $n^2 = (2k)^2 = 4k^2 = 2(2k^2)$ = $n^2 = 2(2k^2)$
Conclude: $2k^2$ is an integer, so $n^2$ is even: we reached $\neg p$ = The contrapositive is proven
Answer: Since "$n$ even $\Rightarrow$ $n^2$ even" is true, "$n^2$ odd $\Rightarrow$ $n$ odd" is true. Q.E.D.
If xy is odd, then x and y are odd
Prove: for all integers $x$ and $y$, if $xy$ is odd, then $x$ and $y$ are both odd.
Negate the conclusion carefully: The negation of "$x$ is odd and $y$ is odd" is "$x$ is even or $y$ is even" (and becomes or) = $\neg q$: $x$ is even or $y$ is even
Write the contrapositive: If $x$ is even or $y$ is even, then $xy$ is not odd = If $x$ or $y$ is even, then $xy$ is even
Case 1: x is even: $x = 2k$, so $xy = 2ky = 2(ky)$, and $ky$ is an integer = $xy$ is even
Case 2: y is even: $y = 2j$, so $xy = 2xj = 2(xj)$, and $xj$ is an integer = $xy$ is even
Conclude: In both cases $xy$ is even, so the contrapositive holds = If $xy$ is odd, then $x$ and $y$ are odd
Answer: Every case of the negated conclusion leads to $xy$ even, so the original statement is true. Q.E.D.
If x + y ≥ 10, then x ≥ 5 or y ≥ 5
Prove: for all real numbers $x$ and $y$, if $x + y \geq 10$, then $x \geq 5$ or $y \geq 5$.
Negate the conclusion: The negation of "$x \geq 5$ or $y \geq 5$" is "$x < 5$ and $y < 5$" (or becomes and, $\geq$ becomes $<$) = $\neg q$: $x < 5$ and $y < 5$
Negate the hypothesis: The negation of $x + y \geq 10$ is $x + y < 10$ = $\neg p$: $x + y < 10$
Assume the negated conclusion: Assume $x < 5$ and $y < 5$ = Two inequalities
Add the inequalities: $x + y < 5 + 5 = 10$ = $x + y < 10$
Conclude: We reached $\neg p$ from $\neg q$ = The original statement is true
Answer: If $x < 5$ and $y < 5$, then $x + y < 10$. That is the contrapositive, so $x + y \geq 10$ forces $x \geq 5$ or $y \geq 5$. Q.E.D.
Choosing the method: n² - 6n + 5
Prove: for every integer $n$, if $n^2 - 6n + 5$ is even, then $n$ is odd.
Try the direct way first: Assuming "$n^2 - 6n + 5$ is even" gives an equation $n^2 - 6n + 5 = 2m$ that tells us little about $n$ = Direct proof is awkward
Write the contrapositive: If $n$ is even, then $n^2 - 6n + 5$ is odd = $\neg q \to \neg p$
Assume n is even and substitute: $n = 2k$, so $n^2 - 6n + 5 = 4k^2 - 12k + 5$ = $4k^2 - 12k + 5$
Bring it into the form 2m + 1: $4k^2 - 12k + 5 = 2(2k^2 - 6k + 2) + 1$ = The expression is odd
Check with a number: $k = 5$, $n = 10$: $100 - 60 + 5 = 45 = 2 \cdot 22 + 1$ = Odd, as predicted
Answer: If $n$ is even, then $n^2 - 6n + 5$ is odd. This is the contrapositive, so the original statement is true. Q.E.D.
Mistake: Proving the converse instead of the contrapositive: for "if $n^2$ is even, then $n$ is even", assuming $n$ is even and showing $n^2$ is even
Why: That proves $q \to p$, the converse, which is a different statement. A statement and its converse are not equivalent.
Correct: Negate both parts and swap them: assume $n$ is odd ($\neg q$) and show $n^2$ is odd ($\neg p$).
Mistake: Negating "$x$ and $y$ are odd" as "$x$ and $y$ are even"
Why: The conclusion fails as soon as one of the numbers is even. "Both even" covers only part of the cases, so the proof would be incomplete.
Correct: "Not ($a$ and $b$)" is "not $a$ or not $b$": $x$ is even or $y$ is even. Then prove every case.
Mistake: Negating $x \geq 5$ as $x \leq 5$
Why: The value $x = 5$ satisfies both $x \geq 5$ and $x \leq 5$, so $x \leq 5$ is not the opposite of $x \geq 5$.
Correct: The negation of $x \geq 5$ is $x < 5$, and the negation of $x > 5$ is $x \leq 5$.
Mistake: Assuming $\neg q$ and then hunting for "some contradiction"
Why: That mixes two methods. In a proof by contrapositive there is no contradiction: you have one clear target.
Correct: Assume $\neg q$ and work until you reach exactly $\neg p$. The search for any contradiction belongs to proof by contradiction.
Quality Control
Inspectors use contrapositive reasoning to rule out cases without weighing every item twice.
Rule: if a pack of 4 boxes weighs at least 2000 g, then at least one box weighs at least 500 g. Contrapositive: if every box weighs less than 500 g, the pack weighs less than 2000 g.
Testing Software
Programmers test code with the contrapositive: if the code is correct, a test gives the right output, so a wrong output proves a bug.
A function should compute $f(n) = 3n + 2$. We proved: if $f(n)$ is odd, then $n$ is odd. Contrapositive: an even $n$ must give an even result.
Check Digits in Codes
Many codes use a simple rule to catch typing errors. The contrapositive tells you when a code is certainly wrong.
Rule: if a code is valid, then the sum of its digits is divisible by 9. Contrapositive: if the digit sum is not divisible by 9, the code is not valid.
A proof by contrapositive proves $p \to q$ by proving $\neg q \to \neg p$
It works because a statement and its contrapositive are logically equivalent (identical truth table columns)
Plan: assume the conclusion is false, work forward, reach the hypothesis being false
Choose it when the negated conclusion is concrete, for example "$n$ is odd" gives $n = 2k + 1$
Negate carefully: "and" becomes "or", "or" becomes "and", $\geq$ becomes $<$
Unlike proof by contradiction, you assume only $\neg q$ and aim at one target, $\neg p$
Q: Why does proving the contrapositive prove the original statement?
A: Because they are logically equivalent: in the truth table, $p \to q$ and $\neg q \to \neg p$ are false in exactly the same row ($p$ true, $q$ false) and true in all others. Proving one proves the other.
Q: How do I know when to use contrapositive instead of a direct proof?
A: Look at the hypothesis. If it is hard to use (a statement about $n^2$, a product, a sum) while the negated conclusion gives you a formula ($n = 2k$, $n = 2k + 1$, $x < 5$ and $y < 5$), the contrapositive is usually shorter.
Q: What is the difference from proof by contradiction?
A: In proof by contradiction you assume $p$ and $\neg q$ and look for any impossible situation. In proof by contrapositive you assume only $\neg q$ and must reach the specific statement $\neg p$. Every proof by contrapositive can be rewritten as a contradiction proof, but not every contradiction proof is a contrapositive.
Q: If I prove the contrapositive, is the converse also true?
A: Not automatically. The converse $q \to p$ is a separate statement. For example, "if $n^2$ is even, then $n$ is even" and its converse "if $n$ is even, then $n^2$ is even" are both true, but each needs its own proof.
Proof by Contrapositive
1 / 14
Proof by Contrapositive
Prove an if-then statement by assuming its conclusion is false and showing that its hypothesis must be false too.