01 / 21

Proof by
Contrapositive

Master the elegant technique of proving \( P \Rightarrow Q \) by showing \( \neg Q \Rightarrow \neg P \). Learn when and how to flip and negate your way to a valid proof.

Discrete Math

What Is a Conditional Statement?

Every mathematical proof begins with understanding the conditional statement \( P \Rightarrow Q \), read as "if \( P \), then \( Q \)." Here \( P \) is the hypothesis and \( Q \) is the conclusion.

\( P \) : Hypothesis
The assumption you start with: the "if" part of the statement.
\( Q \) : Conclusion
What must follow: the "then" part of the statement.

The Contrapositive Idea

The contrapositive of \( P \Rightarrow Q \) is the statement \( \neg Q \Rightarrow \neg P \). Instead of proving the original implication directly, you prove: "if \( Q \) is false, then \( P \) must also be false."

\(P\)
implies
\(Q\)
Original
\(\neg Q\)
implies
\(\neg P\)
Contrapositive
\(\equiv\)
logically equivalent

Why Are They Equivalent?

We can verify the logical equivalence with a truth table. Notice that the columns for \( P \Rightarrow Q \) and \( \neg Q \Rightarrow \neg P \) are identical in every row.

\( P \) \( Q \) \( P \Rightarrow Q \) \( \neg Q \Rightarrow \neg P \)
TTTT
TFFF
FTTT
FFTT

The Contrapositive Principle

Assume \(P\)
derive
Conclude \(Q\)
Direct Proof OR equivalently
Assume \(\neg Q\)
derive
Conclude \(\neg P\)
Contrapositive Proof
Both prove \(P \Rightarrow Q\) ✓

When to Use the Contrapositive

Proof by contrapositive is especially useful when the negation of the conclusion gives you something concrete to work with, while the original hypothesis is hard to use directly.

1
The conclusion involves "not" or inequality. Negating it gives a positive, usable assumption.
2
Direct proof hits a dead end. You assumed \( P \) but can't reach \( Q \): try flipping direction.
3
The statement involves divisibility or parity. Negating "even" to "odd" often opens algebraic paths.

Contrapositive vs Converse vs Inverse

Students often confuse three related forms of a conditional. Only the contrapositive is logically equivalent to the original.

Form Statement Equivalent to Original?
Original \( P \Rightarrow Q \) —
Converse \( Q \Rightarrow P \) No
Inverse \( \neg P \Rightarrow \neg Q \) No
Contrapositive \( \neg Q \Rightarrow \neg P \) Yes ✓

Step-by-Step Method

1
Identify \( P \) and \( Q \). Write the statement clearly as "if \( P \), then \( Q \)."
2
Form the contrapositive. Negate both and swap: "if \( \neg Q \), then \( \neg P \)."
3
Assume \( \neg Q \). State your assumption clearly at the start of the proof.
4
Derive \( \neg P \). Use definitions, algebra, or known theorems to reach the negation of the hypothesis.
5
Conclude. State that the contrapositive is proved, so the original \( P \Rightarrow Q \) holds.

Example 1: Parity of Squares

Identify: \( P \): "\( n^2 \) is even" and \( Q \): "\( n \) is even."
Contrapositive: If \( n \) is odd, then \( n^2 \) is odd.

1
Assume \( \neg Q \): Suppose \( n \) is odd. Then \( n = 2k + 1 \) for some integer \( k \).
2
Compute \( n^2 \): \( n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1 \).
3
Conclude \( \neg P \): Since \( n^2 = 2m + 1 \) where \( m = 2k^2 + 2k \), \( n^2 \) is odd. ✓

Example 2: Parity of Products

Identify: \( P \): "\( ab \) is even" and \( Q \): "\( a \) is even or \( b \) is even."
Contrapositive: If \( a \) is odd and \( b \) is odd, then \( ab \) is odd.

1
Assume \( \neg Q \): Suppose \( a \) is odd and \( b \) is odd. Then \( a = 2k+1 \) and \( b = 2m+1 \) for some integers \( k, m \).
2
Compute \( ab \): \( ab = (2k+1)(2m+1) = 4km + 2k + 2m + 1 = 2(2km+k+m) + 1 \).
3
Conclude \( \neg P \): Since \( ab \) is of the form \( 2j+1 \), \( ab \) is odd. ✓

Example 3: Real Analysis Flavour

Contrapositive: If \( x \geq 0 \), then \( x^2 + 2x \geq 0 \).

1
Assume \( x \geq 0 \).
2
Factor: \( x^2 + 2x = x(x + 2) \).
3
Analyse signs: Since \( x \geq 0 \), we have \( x \geq 0 \) and \( x + 2 \geq 2 > 0 \). The product of two non-negative numbers is non-negative.
4
Conclude: \( x^2 + 2x \geq 0 \), so the contrapositive holds. ✓

Negation Cheat Sheet

Forming the contrapositive requires correctly negating each part. Here are the most common negation patterns:

Statement Negation
\( n \) is even\( n \) is odd
\( x > 0 \)\( x \leq 0 \)
\( a \mid b \)\( a \nmid b \)
\( \forall x,\; P(x) \)\( \exists x,\; \neg P(x) \)
\( \exists x,\; P(x) \)\( \forall x,\; \neg P(x) \)
\( P \land Q \)\( \neg P \lor \neg Q \)
\( P \lor Q \)\( \neg P \land \neg Q \)

Proof Flow Diagram

Want to prove \(P \Rightarrow Q\)
Direct proof difficult? Yes
Form contrapositive: \(\neg Q \Rightarrow \neg P\)
Assume \(\neg Q\), derive \(\neg P\)
Done! \(P \Rightarrow Q\) is proved ✓
No Use direct proof

Contrapositive vs Contradiction

Both are indirect proof techniques, but they work differently. The contrapositive proves a logically equivalent statement, while contradiction derives an impossibility.

Contrapositive
Assume \( \neg Q \), derive \( \neg P \). You prove the equivalent statement directly: no contradiction needed.
Contradiction
Assume \( P \land \neg Q \), derive a logical impossibility (e.g., \( R \land \neg R \)). More powerful, but often messier.

Common Mistakes

✕ Proving the Converse
Writing \( Q \Rightarrow P \) instead of \( \neg Q \Rightarrow \neg P \). The converse is not equivalent to the original.
✕ Incorrect Negation
Negating "\( x > 0 \)" as "\( x < 0 \)" instead of "\( x \leq 0 \)." Always flip the inequality and include equality.
✕ Forgetting De Morgan's
Negating "\( P \land Q \)" as "\( \neg P \land \neg Q \)." The correct negation is "\( \neg P \lor \neg Q \)": "and" becomes "or."

Proof Techniques Summary

Technique You Assume You Derive When to Use
Direct \( P \) \( Q \) Straightforward chain of logic
Contrapositive \( \neg Q \) \( \neg P \) Negation is easier to work with
Contradiction \( P \land \neg Q \) Impossibility No direct path, need a "trap"

Question 1 of 5

What is the contrapositive of the statement
"If it rains, then the ground is wet"?

Question 2 of 5

To prove "\( n^2 \) is odd \( \Rightarrow \) \( n \) is odd" by contrapositive, what do you assume?

Question 3 of 5

Which of the following is not logically equivalent to \( P \Rightarrow Q \)?

Question 4 of 5

What is the correct negation of "\( \forall x,\; x^2 \geq 0 \)"?

Question 5 of 5

You want to prove: "If \( 3 \nmid n \), then \( 3 \nmid n^2 \)." By contrapositive, what do you assume and what do you derive?