Sometimes the hypothesis gives you very little to work with. “If n 2 n^2 n 2 is even, then n n n is even”: knowing n 2 = 2 k n^2 = 2k n 2 = 2 k does not easily tell you about n n n . Turning the statement around often makes the proof easy. This is the first of two indirect methods.
Definition 2.11 · Proof by contrapositive
A proof by contrapositive proves p → q p \to q p → q by giving a direct proof of its contrapositive ¬ q → ¬ p \neg q \to \neg p ¬ q → ¬ p : assume q q q is false and show that p p p must then be false.
It is correct because p → q ≡ ¬ q → ¬ p p \to q \equiv \neg q \to \neg p p → q ≡ ¬ q → ¬ p (Unit 1): proving one proves the other.
Intuition
A shop’s rule says: “If you have a receipt, you can return the item.” The manager checks it the other way round: “Every time a return was refused, the customer had no receipt.” Both sentences say the same thing. When the second one is easier to check, check that one.
When to use it
Situation Better method The hypothesis gives a usable equation (e.g. ”n n n is odd” gives n = 2 k + 1 n = 2k+1 n = 2 k + 1 ) direct proof The hypothesis is about n 2 n^2 n 2 , x y xy x y , f ( x ) f(x) f ( x ) … but the conclusion is about n n n , x x x , y y y contrapositive The conclusion is a “not” statement (e.g. ”x x x is not rational”) contrapositive or contradiction
Example 2.12 If n² is even, then n is even
Goal. Prove for every integer n n n : if n 2 n^2 n 2 is even, then n n n is even (this is E8).
Step. Write the contrapositive: if n n n is not even (i.e. odd), then n 2 n^2 n 2 is not even (i.e. odd).
Step. Assume n n n is odd: n = 2 k + 1 n = 2k + 1 n = 2 k + 1 for some integer k k k .
Step. Then n 2 = 4 k 2 + 4 k + 1 = 2 ( 2 k 2 + 2 k ) + 1 n^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1 n 2 = 4 k 2 + 4 k + 1 = 2 ( 2 k 2 + 2 k ) + 1 , which is odd.
Step. We have proved ¬ q → ¬ p \neg q \to \neg p ¬ q → ¬ p , which is equivalent to p → q p \to q p → q .
Result. For every integer n n n , if n 2 n^2 n 2 is even, then n n n is even.
Example 2.13 If 5n + 3 is even, then n is odd
Goal. Prove for every integer n n n : if 5 n + 3 5n + 3 5 n + 3 is even, then n n n is odd.
Step. A direct proof starts with 5 n + 3 = 2 k 5n + 3 = 2k 5 n + 3 = 2 k , which is awkward to solve for n n n . Use the contrapositive: if n n n is even, then 5 n + 3 5n + 3 5 n + 3 is odd.
Step. Assume n n n is even: n = 2 k n = 2k n = 2 k for some integer k k k .
Step. Then 5 n + 3 = 10 k + 3 = 2 ( 5 k + 1 ) + 1 5n + 3 = 10k + 3 = 2(5k + 1) + 1 5 n + 3 = 10 k + 3 = 2 ( 5 k + 1 ) + 1 , which is odd because 5 k + 1 5k + 1 5 k + 1 is an integer.
Result. The contrapositive is true, so the original statement is true: if 5 n + 3 5n + 3 5 n + 3 is even, then n n n is odd.
Correction · Integer written with a natural number in Example 4
Study material says: In Example 4 (§2.3), to prove “if x y xy x y is odd, then x x x and y y y are odd” by contrapositive, it assumes x x x is even and writes ”x = 2 n x = 2n x = 2 n for some n ∈ N n \in \mathbf{N} n ∈ N ”, and then stops after this one case.
Correct version: Write x = 2 n x = 2n x = 2 n for some n ∈ Z n \in \mathbb{Z} n ∈ Z (an integer — x x x may be 0 0 0 or negative). Then x y = 2 ( n y ) xy = 2(ny) x y = 2 ( n y ) is even. The other case, y y y even, is the same with the roles of x x x and y y y swapped; so if x x x or y y y is even, x y xy x y is even, which is the contrapositive.
Why: For x = 0 x = 0 x = 0 or x = − 4 x = -4 x = − 4 there is no natural number n n n with x = 2 n x = 2n x = 2 n . The negation of “both odd” is ”x x x is even or y y y is even”, so both cases must be covered (one can say “without loss of generality” because the cases are symmetric).
Common mistake
Using the converse instead of the contrapositive. To prove “if n 2 n^2 n 2 is even, then n n n is even”, proving “if n n n is even, then n 2 n^2 n 2 is even” proves the converse , which is a different statement.
Common mistake
Negating “both” wrongly. The negation of ”x x x and y y y are both odd” is ”x x x is even or y y y is even”, not ”x x x and y y y are both even”.
Key idea
To prove p → q p \to q p → q by contrapositive, assume ¬ q \neg q ¬ q and prove ¬ p \neg p ¬ p . It is valid because p → q ≡ ¬ q → ¬ p p \to q \equiv \neg q \to \neg p p → q ≡ ¬ q → ¬ p , and it helps when ¬ q \neg q ¬ q gives a better starting equation than p p p .
TEE Exam note
Write: “We prove the contrapositive: if (not q q q ), then (not p p p ).” Then give a direct proof of that. E7 (correct answer): the contrapositive of “If f f f is a one-one function from a finite set X X X into itself, then f f f is onto (surjective)” is “If f : X → X f: X \to X f : X → X (X X X finite) is not onto, then f f f is not one-one.” E8: see the first example above.
Key takeaways
Proof by contrapositive: prove ¬ q → ¬ p \neg q \to \neg p ¬ q → ¬ p instead of p → q p \to q p → q .
It works because a conditional and its contrapositive are logically equivalent.
Choose it when the negated conclusion gives a better starting equation.
Do not confuse it with the converse q → p q \to p q → p .
Practice questions Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 1 · multiple choice To prove “if n 2 n^2 n 2 is odd, then n n n is odd” by contrapositive, what do you assume?
Check answer
Show answer Answer: C. n n n is even
The contrapositive is “if n n n is not odd (even), then n 2 n^2 n 2 is not odd (even)”, so you assume n n n is even. Option 4 is tempting, but that is the conclusion you must reach, not the assumption.
Question 2 · multiple choice Why is a proof by contrapositive a correct proof of p → q p \to q p → q ?
Check answer
Show answer Answer: A. Because p → q ≡ ¬ q → ¬ p p \to q \equiv \neg q \to \neg p p → q ≡ ¬ q → ¬ p
A conditional is logically equivalent to its contrapositive. Options 2 and 3 are the converse and the inverse, which are not equivalent to p → q p \to q p → q .
Question 3 · multiple choice What is the correct negation of ”x x x and y y y are both odd”?
Check answer
Show answer Answer: D. x x x is even or y y y is even
By De Morgan, ¬ ( A ∧ B ) ≡ ¬ A ∨ ¬ B \neg(A \land B) \equiv \neg A \lor \neg B ¬ ( A ∧ B ) ≡ ¬ A ∨ ¬ B . Option 1 is tempting, but it is much stronger than the negation.
Question 4 · multiple choice In the contrapositive proof of “if 5 n + 3 5n + 3 5 n + 3 is even, then n n n is odd”, what is 5 n + 3 5n + 3 5 n + 3 when n = 2 k n = 2k n = 2 k ?
Check answer
Show answer Answer: B. 2 ( 5 k + 1 ) + 1 2(5k + 1) + 1 2 ( 5 k + 1 ) + 1
5 ( 2 k ) + 3 = 10 k + 3 = 10 k + 2 + 1 = 2 ( 5 k + 1 ) + 1 5(2k) + 3 = 10k + 3 = 10k + 2 + 1 = 2(5k + 1) + 1 5 ( 2 k ) + 3 = 10 k + 3 = 10 k + 2 + 1 = 2 ( 5 k + 1 ) + 1 , which is odd. Option 1 wrongly treats + 3 +3 + 3 as + 6 +6 + 6 .
Question 5 · multiple choice In Example 4 of the study material, why should we write x = 2 n x = 2n x = 2 n with n ∈ Z n \in \mathbb{Z} n ∈ Z rather than n ∈ N n \in \mathbb{N} n ∈ N ?
Check answer
Show answer Answer: C. Because x x x may be 0 0 0 or negative, and then no natural n n n works
For x = − 4 x = -4 x = − 4 we need n = − 2 n = -2 n = − 2 , which is an integer but not a natural number. Option 4 is tempting, but the proof must cover every integer x x x .
Question 6 · short answer
Prove by contrapositive: for every integer n n n , if n 2 n^2 n 2 is not divisible by 3, then n n n is not divisible by 3.
Show worked answer The contrapositive is: if n n n is divisible by 3, then n 2 n^2 n 2 is divisible by 3. Assume 3 ∣ n 3 \mid n 3 ∣ n ; then n = 3 k n = 3k n = 3 k for some integer k k k . So n 2 = 9 k 2 = 3 ( 3 k 2 ) n^2 = 9k^2 = 3(3k^2) n 2 = 9 k 2 = 3 ( 3 k 2 ) , and 3 k 2 3k^2 3 k 2 is an integer, so 3 ∣ n 2 3 \mid n^2 3 ∣ n 2 . The contrapositive is true, hence the original statement is true.