Proof by Contradiction and Contrapositive
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn the two main indirect proof techniques: proof by contrapositive and proof by contradiction. You’ll see how each one is set up, why each is logically valid, and how to tell which one a problem is asking for.
The Concept
Section titled “The Concept”Some statements resist a direct attack. If you assume the hypothesis and get stuck immediately, that’s usually a signal to try an indirect approach.
Proof by contrapositive
Section titled “Proof by contrapositive”Recall from the conditionals lesson:
The contrapositive is logically equivalent to the original, so proving it proves the original. Not “almost,” not “close enough.” It is the same claim.
The setup:
- State that you’ll prove the contrapositive.
- Assume .
- Derive directly.
- Conclude that follows.
When to use it: when the negation of the conclusion is more useful than the hypothesis. This happens a lot. “If is even, then is even” gives you almost nothing to work with, because ” is even” means and you can’t take a clean square root of that. But the contrapositive assumes is odd, which hands you and you’re immediately doing algebra.
Rule of thumb: if the hypothesis is about a squared or composed quantity and the conclusion is about the raw quantity, try the contrapositive.
Proof by contradiction
Section titled “Proof by contradiction”Also called reductio ad absurdum. The idea: assume your statement is false, and show that assumption forces an impossibility. Since the assumption leads to something that cannot be, the assumption must be wrong, so the statement is true.
To prove a statement :
- Assume .
- Reason until you reach a contradiction, meaning something and its own negation are both true.
- Conclude is impossible, so holds.
For an implication , the negation is . So you assume the hypothesis holds and the conclusion fails, and hunt for the impossibility.
When to use it: proving something does not exist, proving something is irrational, proving uniqueness, or any time the claim is hard to build toward but easy to break.
The contradiction you land on can be anything absurd: , a number both even and odd, a fraction in lowest terms that isn’t, a smallest element that has something smaller.
How the two techniques differ
Section titled “How the two techniques differ”They look similar and they’re often confused.
| Contrapositive | Contradiction | |
|---|---|---|
| What you assume | only | and together |
| What you aim for | , a specific target | any contradiction at all |
| Applies to | implications only | any statement |
| Feels like | a direct proof, relabeled | a trap you set for yourself |
Contrapositive is more constrained, which is usually an advantage. You know exactly what you’re trying to reach. Contradiction is more flexible but you have to notice the absurdity when you hit it.
If a problem is an implication and you can see how would give you traction, use the contrapositive. It’s cleaner and easier to check.
Worked Examples
Section titled “Worked Examples”Example 1: Contrapositive.
Claim. For any integer , if is even, then is even.
Proof by contrapositive. The contrapositive is: if is odd, then is odd.
Assume is odd, so for some integer . Then
Since is an integer, is odd.
The contrapositive holds, so the original claim holds. ∎
Try the direct route to feel the difference. Assume . Now what? You’d need to argue about square roots of a form you don’t control. The contrapositive is a two-line proof.
Example 2: Contrapositive with a sum.
Claim. If is odd, then and have opposite parity (one even, one odd).
Proof by contrapositive. The contrapositive: if and have the same parity, then is even.
Case 1: both even. , , so , even.
Case 2: both odd. , , so
which is even.
Same parity forces an even sum, so the original claim holds. ∎
Example 3: Contradiction with a bound.
Claim. There is no largest even integer.
Proof by contradiction. Suppose there is a largest even integer. Call it .
Consider . Since is even, , so is also even. And .
So is an even integer larger than , contradicting the assumption that was the largest.
The assumption is impossible, so no largest even integer exists. ∎
This is the standard shape for “no largest / no smallest” claims: assume one exists, then construct something bigger or smaller.
Example 4: The classic. is irrational.
Proof by contradiction. Suppose is rational. Then it can be written as a fraction in lowest terms:
where and are integers, , and share no common factor.
Square both sides:
So is even. By Example 1, must be even. Write :
So is even, and by Example 1 again, is even.
But now and are both even, so they share a factor of 2. That contradicts “lowest terms.”
The assumption is impossible, so is irrational. ∎
This proof is roughly 2,500 years old and reportedly caused a crisis among the Pythagoreans, who had built a worldview on the idea that all quantities were ratios of whole numbers. Notice it leans on Example 1, which is why we proved that first.
Example 5: Contradiction with primes.
Claim. There are infinitely many prime numbers. (Euclid, around 300 BCE.)
Proof by contradiction. Suppose there are finitely many primes. List them all:
Construct
is larger than every prime in the list, so is not on the list, so is not prime. Every integer greater than 1 has a prime factor, so some from the list divides .
But divides the product , so dividing by leaves a remainder of 1. So does not divide .
We have both dividing and not dividing . Contradiction.
Therefore there are infinitely many primes. ∎
Example 6: Contradiction with a rational and an irrational.
Claim. If is rational and is irrational, then is irrational.
Proof by contradiction. Assume is rational, is irrational, and is rational.
Write and with integers and . Then
The numerator and denominator are integers and , so is rational.
But was assumed irrational. Contradiction, so must be irrational. ∎
Real-World Applications
Section titled “Real-World Applications”Contradiction is the everyday tool of debugging, whether or not anyone calls it that. “If the cache were working, this response would be fast. It’s slow. So the cache isn’t working.” You assume the thing you doubt, follow it to an observation that conflicts with reality, and eliminate it.
Impossibility results in computer science are all contradiction proofs. The halting problem is undecidable because assuming a halting-detector exists lets you build a program that must both halt and not halt. Similar arguments prove lower bounds on sorting and the impossibility of certain distributed-systems guarantees. These results save enormous effort, because they tell you to stop looking.
Cryptography depends on this style of reasoning. Security proofs are typically of the form “if an attacker could break this scheme, they could also solve a problem believed to be intractable.”
Legal and scientific reasoning use it too. A reductio argument in court (“if the defendant were at the scene, the timestamps would overlap, and they don’t”) is exactly this technique. And in science, the falsification model is contradiction-shaped: derive a consequence from the hypothesis, test it, and if it fails, the hypothesis goes.
Retrying will remove your ✅ checkmark until you pass again.