Posted in

Contrapositive Explained: A Guide to Mathematical Logic and Proof

The contrapositive is one of the most useful tools in mathematical proof — and one of the most frequently misunderstood. Students often confuse it with the converse, or know the definition without understanding when to use it. This guide explains what the contrapositive is, why it is logically equivalent to the original statement, how it differs from related logical forms, and how to use it strategically in proofs. It also covers where it appears in competition mathematics, particularly the Euclid Contest and COMC.


What Is the Contrapositive?

For a conditional statement of the form “If P, then Q” (written P → Q):

FormStatementExample
Original (conditional)If P, then QIf n is even, then n² is even
ConverseIf Q, then PIf n² is even, then n is even
InverseIf not P, then not QIf n is not even, then n² is not even
ContrapositiveIf not Q, then not PIf n² is not even, then n is not even

The contrapositive of “If P, then Q” is “If not Q, then not P.”

The key fact: a conditional statement and its contrapositive are logically equivalent. They always have the same truth value. Proving the contrapositive is exactly as valid as proving the original — and often significantly easier.

The converse and inverse are not logically equivalent to the original. Confusing the contrapositive with the converse is one of the most common errors in mathematical logic.


Why the Contrapositive Is Logically Equivalent

A conditional statement P → Q is false in exactly one situation: when P is true and Q is false.

Now consider the contrapositive: ¬Q → ¬P. This is false when ¬Q is true and ¬P is false — i.e., when Q is false and P is true. Exactly the same situation.

Truth table:

PQP → Q¬Q¬P¬Q → ¬P
TTTFFT
TFFTFF
FTTFTT
FFTTTT

The columns for P → Q and ¬Q → ¬P are identical. The statements are logically equivalent. ∎

This equivalence is not just a logical curiosity — it is the foundation of proof by contrapositive, one of the most powerful and elegant proof strategies in mathematics.


Proof by Contrapositive

When to use it:

Use it when the direct proof of P → Q is difficult or unclear, but the proof of ¬Q → ¬P is more tractable. This often happens when:

  • The negation of Q gives you something concrete to work with
  • The direct proof would require exhausting many cases
  • The hypothesis P in the original direction is hard to use algebraically

Structure:

  1. State the contrapositive: “We will prove the contrapositive: if not Q, then not P.”
  2. Assume ¬Q (the negation of the conclusion).
  3. Prove ¬P (the negation of the hypothesis) from this assumption.
  4. Conclude: “Since the contrapositive is true, the original statement is true.” □

Worked Examples

Example 1 — Classic Number Theory (Grade 11/12)

Claim: If n² is even, then n is even.

Direct proof attempt: Assume n² is even. So n² = 2k for some integer k. Now… how do we show n itself is even? This direction is tricky.

Proof by contrapositive: We prove: if n is not even (i.e., n is odd), then n² is not even (i.e., n² is odd).

Assume n is odd. Then n = 2m + 1 for some integer m.

n² = (2m + 1)² = 4m² + 4m + 1 = 2(2m² + 2m) + 1

This is odd. Therefore n² is odd. ∎

Since the contrapositive is proven, the original statement holds: if n² is even, then n is even.


Example 2 — Divisibility (Competition Level)

Claim: If 3 does not divide n, then 3 does not divide n².

Wait — this is the inverse of a true statement, not necessarily true itself. Let’s take the correct direction:

Claim: If 3 divides n², then 3 divides n.

Proof by contrapositive: Prove that if 3 does not divide n, then 3 does not divide n².

Assume 3 does not divide n. Then n ≡ 1 (mod 3) or n ≡ 2 (mod 3).

Case 1: n ≡ 1 (mod 3). Then n² ≡ 1 (mod 3). So 3 does not divide n².

Case 2: n ≡ 2 (mod 3). Then n² ≡ 4 ≡ 1 (mod 3). So 3 does not divide n².

In both cases, 3 does not divide n². The result is proven. Therefore: if 3 divides n², then 3 divides n. ∎


Example 3 — Irrationality Proof Ingredient (Euclid Level)

The classic proof that √2 is irrational uses proof by contradiction, but relies on the contrapositive result from Example 1 at a key step. Specifically: if p² is even, then p is even (and the same for q) — the exactly the contrapositive proven above.

This is the kind of proof connectivity that Euclid Part C questions reward: recognising that proving one lemma enables a larger result.


Example 4 — Geometry (AMC 10 / Cayley Level)

Claim: If a quadrilateral is not a parallelogram, then its diagonals do not bisect each other.

Contrapositive: If the diagonals of a quadrilateral bisect each other, then it is a parallelogram.

This is a standard geometry result — the contrapositive form is actually more natural to prove than the original. The proof uses congruent triangles formed by the bisecting diagonals.

Why this matters: Many geometry theorems are naturally stated and proved in this form. Recognising which direction is easier to prove is a mark of mathematical maturity that pays dividends in competitions.


Example 5 — Contrapositive in Algebra

Claim: If x² ≠ y², then x ≠ y.

Contrapositive: If x = y, then x² = y².

The contrapositive is trivial — squaring both sides of x = y gives x² = y². So the original is proven. ∎

This example illustrates a key use case: when the original direction seems hard to prove but the contrapositive is obvious, use it.


Contrapositive vs Converse vs Inverse: The Critical Distinction

This is where most students go wrong. Get this clear:

FormLogically equivalent to original?Common mistake
Contrapositive (¬Q → ¬P)YesConfusing with converse
Converse (Q → P)NoAssuming true because original is true
Inverse (¬P → ¬Q)NoAssuming true because original is true

The converse error is the most dangerous. Students who have proved P → Q sometimes conclude that Q → P is also true. It is not — not in general. The contrapositive is the only related form that is automatically equivalent.

Concrete example of the failure:

Original: “If it is raining, then the ground is wet.” (True)

Converse: “If the ground is wet, then it is raining.” (False — the ground could be wet from a hose)

Contrapositive: “If the ground is not wet, then it is not raining.” (True — equivalent to the original)

The converse is not equivalent. The contrapositive always is.


The Contrapositive and Proof by Contradiction

Proof by contrapositive: Assume ¬Q. Prove ¬P directly. No contradiction required.

Proof by contradiction: Assume both P and ¬Q. Derive a contradiction. Conclude Q must be true.

Proof by contrapositive is a special case — it is cleaner when it applies because it does not require deriving a contradiction, only establishing ¬P from ¬Q. When this approach works, it is generally preferred over proof by contradiction for elegance and clarity.

For more on proof by contradiction — including worked examples at the Euclid and COMC level — see our proof by contradiction guide.


Where the Contrapositive Appears in Contests

The contrapositive appears in competition mathematics in two distinct ways: as a tool within a proof, and as the subject of a question about logical reasoning.

COMC (Canadian Open Mathematics Competition): Part C of the COMC includes full-solution proofs where identifying the right proof strategy — including when to switch direction — is part of the problem. Number theory problems asking students to prove divisibility results (like Example 2 above) frequently yield most easily to contrapositive proofs. See our COMC math contest guide.

Euclid Contest (CEMC, Grade 12): Part C of the Euclid is where proof technique is most directly tested. Questions involving integer properties, divisibility, and number theory — which appear most years in some form — regularly reward students who know when to switch to the contrapositive. A student who attempts a direct proof of a contrapositive-friendly theorem loses time and often fails to complete the proof; a student who recognises the structure solves it cleanly. See our Euclid math contest guide.

AMC 10 and Cayley Contest (Grades 9–10): Logical reasoning questions — “which of the following is equivalent to the statement…” or “which statement is the contrapositive of…” — appear in the multiple choice sections. These require knowing the definitions precisely: the contrapositive is ¬Q → ¬P, not Q → P, not ¬P → ¬Q.

Canadian Senior Mathematics Contest (CSMC): Full solution problems at this level regularly involve proof, and this technique is a standard part of the toolkit. See our Canadian Senior Math Contest guide.

Understanding when to apply this technique — not just what it is — is the mark of a student who has genuinely developed proof-writing fluency. Think Academy’s competition mathematics programmes build this fluency systematically across the Gauss through Euclid pathway. For the full contest landscape, see our math competitions in Canada guide.



Practice Problems

Set A — Identifying the contrapositive

Write the contrapositive of each statement:

  1. If x > 0, then x² > 0.
  2. If a triangle is equilateral, then all its angles are equal.
  3. If n is divisible by 6, then n is divisible by 2.
  4. If the discriminant is negative, then the quadratic has no real roots.
  5. If two lines are parallel, then they do not intersect.

Set B — Identifying converse, inverse, contrapositive

For the statement “If it is a square, then it is a rectangle”:

  1. Write the converse.
  2. Write the inverse.
  3. Write the contrapositive.
  4. Which of the above are logically equivalent to the original?

Set C — Proof by contrapositive

  1. Prove: If n² is odd, then n is odd.
  2. Prove: If the product mn is odd, then both m and n are odd.
  3. Prove: If x + y is irrational, then x is irrational or y is irrational.
  4. Prove: If n is not divisible by 3, then n² is not divisible by 3.

Answers:

Set A:

  1. If x² ≤ 0, then x ≤ 0
  2. If not all angles are equal, then the triangle is not equilateral
  3. If n is not divisible by 2, then n is not divisible by 6
  4. If the quadratic has a real root, then the discriminant is non-negative
  5. If two lines intersect, then they are not parallel

Set B: 6) Converse: If it is a rectangle, then it is a square (False — rectangles need not be squares) 7) Inverse: If it is not a square, then it is not a rectangle (False — same reason) 8) Contrapositive: If it is not a rectangle, then it is not a square (True) 9) Only the contrapositive is logically equivalent to the original

Set C outlines:

  1. Contrapositive: If n is even (n = 2k), then n² = 4k² = 2(2k²), which is even. ∎
  2. Contrapositive: If m is even or n is even, prove mn is even.
  • If m = 2a: mn = 2an, which is even. ✓
  • If n = 2b: mn = 2mb, which is even. ✓ Either case gives mn even. ∎
  1. Contrapositive: If x is rational and y is rational, then x + y is rational. Let x = p/q and y = r/s (integers p, q, r, s with q, s ≠ 0). Then x + y = (ps + rq)/(qs), a ratio of integers. Rational. ∎
  2. Contrapositive: If 3 does not divide n, then 3 does not divide n². If 3 ∤ n: n ≡ 1 or 2 (mod 3). n ≡ 1: n² ≡ 1 (mod 3), so 3 ∤ n². n ≡ 2: n² ≡ 4 ≡ 1 (mod 3), so 3 ∤ n². ∎

Frequently Asked Questions

What is the contrapositive in math? The contrapositive of the conditional statement “If P, then Q” is “If not Q, then not P.” The contrapositive is always logically equivalent to the original statement — proving one proves the other.

What is the difference between the contrapositive and the converse? The converse of “If P, then Q” is “If Q, then P.” The converse is not logically equivalent to the original — a true statement can have a false converse. The contrapositive (“If not Q, then not P”) is always equivalent to the original. This is the most important distinction in mathematical logic at the high school level.

When should I use proof by contrapositive instead of direct proof? When the direct proof is unclear or requires many cases, but the contrapositive direction gives you something concrete to work with. If assuming ¬Q gives you a strong algebraic starting point, try the contrapositive. If assuming P directly gives you a clear path to Q, use the direct proof.

Is the inverse equivalent to the original statement? No. The inverse of “If P, then Q” is “If not P, then not Q.” The inverse is equivalent to the converse — not to the original. Only the contrapositive is equivalent to the original.

Does the contrapositive appear on the Euclid Contest? Yes. Proof by contrapositive is a standard technique in Euclid Part C — the full-solution proof section. Number theory and divisibility proofs particularly often yield to contrapositive arguments. Students who know when to use the contrapositive complete these proofs more efficiently and more cleanly than those who attempt only direct proofs.

What is the relationship between proof by contrapositive and proof by contradiction? Both are indirect proof methods. Proof by contrapositive assumes ¬Q and proves ¬P directly. Proof by contradiction assumes both P and ¬Q and derives a contradiction. When proof by contrapositive applies, it is generally cleaner — no contradiction needs to be derived, only a direct proof in the contrapositive direction.


See our related guides: proof by contradiction guide · math induction proof guide · Euclid math contest guide · COMC math contest guide · Canadian Senior Math Contest guide · Euclid mathematics contest guide · math competitions in Canada · MCR3U complete guide · MHF4U Advanced Functions guide


Proof technique is the skill that separates a good contest result from a great one. Build it before the contest, not during it.

contrapositive free trial cta

Leave a Reply

Your email address will not be published. Required fields are marked *