The theorem "if n^2 is even, then n is even" is the textbook example for proof by contrapositive — not because the claim is tricky, but because the choice of direction matters enormously. The direct route starts cleanly and then hits a wall. The contrapositive route starts cleanly and stays clean, finishing in a single computation.
This page lines up the two attempts side by side so you can see exactly where the direct proof stalls and exactly how the flip unblocks it.
The claim
For any integer n: if n^2 is even, then n is even.
Set P = "n^2 is even" and Q = "n is even." The original statement is P \Rightarrow Q. The contrapositive is \lnot Q \Rightarrow \lnot P, which becomes: "if n is odd, then n^2 is odd."
The direct attempt, step by step
Step 1. Assume P: n^2 is even. By the definition of even, n^2 = 2m for some integer m.
Step 2. You want to show n = 2k for some integer k. Can you extract such a k from n^2 = 2m?
Take square roots: n = \sqrt{2m}. For this to be an integer at all, 2m must be a perfect square. Even if it is, the integer \sqrt{2m} has no obvious factor of 2 — it just has to square to something even.
Step 3. You are stuck. You would need something like "an integer whose square is even must itself be even," which is exactly the theorem you are trying to prove.
Why the direct route stalls: the definition of "even" as "divisible by 2" gives you an expression for n^2, not for n. To get an expression for n, you would need to un-square, and un-squaring an even number does not drop cleanly into a factor of 2.
The contrapositive attempt
Step 1. Rewrite the claim as its contrapositive: "if n is odd, then n^2 is odd."
Step 2. Assume n is odd: n = 2k + 1 for some integer k.
Step 3. Compute n^2 directly:
This is of the form 2m + 1 with m = 2k^2 + 2k, which is an integer. So n^2 is odd.
Step 4. Done. By the contrapositive equivalence, the original — "if n^2 is even, then n is even" — is established. \blacksquare
Why the contrapositive works: starting from n (first power) and squaring is algebraically trivial — the identity (2k + 1)^2 = 4k^2 + 4k + 1 lands you in the required form with no rearrangement. The direct route demanded un-squaring, which is where it got stuck.
Side-by-side comparison
What the side-by-side teaches
Every theorem has more than one valid route. The skill is not to memorise one route; it is to recognise when the direct route runs out of lines and to switch to the contrapositive without panicking. The cue here is shape: the hypothesis involves a square (n^2) and the conclusion involves a first power (n). The direct route demands un-squaring; the contrapositive demands squaring. Squaring is the easy direction — always.
A rule of thumb: when the hypothesis is a higher power and the conclusion is a lower power, consider the contrapositive. This pattern repeats throughout elementary number theory. "n^3 divisible by 2 \Rightarrow n divisible by 2," "n^2 divisible by 3 \Rightarrow n divisible by 3," and "n^2 divisible by 5 \Rightarrow n divisible by 5" are all contrapositive proofs. You will see them used as lemmas in the classical irrationality proofs — including the proof that \sqrt{2} is irrational.
The general pattern
Whenever a direct proof demands you invert an operation — take a square root, take a logarithm, undo a composition — flip to the contrapositive. The contrapositive will often let you apply the operation in the forward direction, which is typically much cleaner. In Proof by Contrapositive, this is called "work in the easy direction," and it is the single most productive heuristic in the first chapter of any proof textbook.
Related: Proof by Contrapositive · Mathematical Proof — Direct Proof · Truth-Table Highlighter — P → Q and ¬Q → ¬P Row by Row · The Contrapositive of p → q Is ¬q → ¬p — Logically Equivalent, Use When Direct Is Hard