Proof by Contradiction
Learn to prove a statement by assuming it is false and showing that this leads to something impossible, with classic proofs such as the irrationality of the square root of 2.
Definition
- 1.Assume the negation: the first line is "Assume, for contradiction, that ."
- 2.Reason with definitions and known facts, exactly as in a direct proof.
- 3.Reach a contradiction: a statement and its opposite both hold (for example " is in lowest terms" and " and are both even"), or a known fact is broken (like ).
- 4.Conclude: the assumption was false, so is true.
- " is irrational" becomes " is rational"
- "There are infinitely many primes" becomes "There are only finitely many primes"
- "There is no largest even number" becomes "There is a largest even number"
- "" becomes ""
- "Every ... has the property" becomes "At least one ... does not have the property"
Try it now
Worked Examples
Prove that there is no largest even number.
Write the negation as the first line
Assume, for contradiction, that there is a largest even number → Assumption: is even and every even number
Use the definition of even
for some integer , so → is even
Compare the two numbers
→ An even number larger than exists
Spot the contradiction and conclude
is the largest even number, yet is a larger even number → The assumption is false
Answer: The assumption leads to a contradiction, so there is no largest even number. QED
Common Mistakes
Negating "There are infinitely many primes" as "There are no primes"
Why it's wrong: The opposite of "infinitely many" is not "none". The negation must cover every case where the statement fails, and that is "only finitely many".
Correct: Assume "There are only finitely many primes". In the same way, the negation of "every prime is odd" is "at least one prime is not odd", not "every prime is even".
Negating as
Why it's wrong: The case is forgotten. If the proof only rules out , the number is still possible.
Correct: The negation of is , and the negation of is .
Forgetting "in lowest terms" in the proof that is irrational
Why it's wrong: Without that condition, finding that and are both even is no contradiction at all: has an even numerator and denominator.
Correct: Write in lowest terms. Every fraction can be reduced, so this costs nothing, and it is exactly the fact the proof later breaks.
Calling a surprising result a contradiction
Why it's wrong: A result that looks strange (a very large number, a fraction you did not expect) is not impossible. A contradiction must clash with the assumption or with a known fact.
Correct: Name the two statements that clash, for example " is the smallest" and "", and then write the conclusion.
Interactive Visual
Truth Table
| P | Q | P ∧ Q |
|---|---|---|
| F | F | F |
| F | T | F |
| T | F | F |
| T | T | T |
T= TrueF= False
Interactive Sandbox
Expression Calculator
Try these:
History
No calculations yet
Practice Problems
18 problemsYou want to prove by contradiction that is irrational. What is the correct first line?
Why It Matters
- Irrational numbers: the Greeks proved that is not a fraction about 2,500 years ago, which changed how people thought about numbers
- Prime numbers: Euclid's proof that the primes never run out is still used in every number theory course
- Computer science: the pigeonhole principle explains why two files can get the same short fingerprint (a hash collision) and why perfect compression of every file is impossible
- Puzzles: solving a Sudoku often means saying "if this cell were 5, two 5s would end up in the same row, so it is not 5"
- Everyday reasoning: detectives and doctors rule out possibilities by showing that they lead to something impossible
Real World Applications
Matching Socks in the Dark
The pigeonhole principle, proved by contradiction, tells you the smallest number of items that guarantees a repeat.
Example:
A drawer holds black, white and grey socks. If you could take 4 socks that were all different colors, you would need 4 colors, but there are only 3. So 4 socks always contain a matching pair.
A drawer holds loose socks in 5 different colors, and it is too dark to see them.
How many socks must you take to be sure that two have the same color?
Step 1: Write the mathematical expression
Number of colors plus one:
Hash Collisions in Computer Science
Computers give files short codes called hashes. Because there are more possible files than codes, two different files must sometimes share a code.
Example:
A system gives every file a code from 00 to 99. Among 101 files, assuming all codes are different would need 101 codes, but there are only 100, so two files share a code.
A system gives every file a 3-digit code from 000 to 999.
How many files guarantee that two of them have the same code?
Step 1: Write the mathematical expression
Number of codes plus one:
Why Calculators Never Show the Exact Square Root of 2
Because $\sqrt{2}$ is irrational, its decimal expansion never ends and never repeats. Any decimal on a screen is only an approximation, which engineers must keep in mind when they compute diagonals.
Example:
A square tile with side 1 m has a diagonal of m. The value 1.4142 is close, but not exact.
A calculator shows .
Check that 1.4142 is not exactly the square root of 2.
Step 1: Write the mathematical expression
Square the decimal:
Key Takeaways
- 1A proof by contradiction assumes the statement is false and shows that this leads to something impossible
- 2The first line is the correct negation: "infinitely many" becomes "only finitely many", becomes , "every" becomes "at least one ... not"
- 3A contradiction means two statements that cannot both be true, such as , which is false in every row of a truth table
- 4Classic results proved this way: is irrational, there are infinitely many primes, there is no largest even number and no smallest positive rational number
- 5The pigeonhole principle: if more than objects go into boxes, some box holds at least two objects
- 6Proof by contrapositive proves "if not q, then not p" directly, while proof by contradiction assumes the whole statement is false and looks for any impossibility
Frequently Asked Questions
Glossary
- Proof by contradiction
- A proof that assumes the statement is false and derives an impossibility, so the statement must be true (also called indirect proof)
- Contradiction
- A pair of statements that cannot both be true, such as and ; the statement is always false
- Negation
- The opposite of a statement, written ; it is true exactly when is false
- Irrational number
- A real number that cannot be written as a fraction of integers, for example
- Pigeonhole principle
- If more than objects are placed into boxes, at least one box contains two or more objects
Formula Card
Proof by contradiction
If assuming not P leads to a contradiction, then P is true
A contradiction is always false
A statement and its negation can never both be true
Pigeonhole principle
At least one box receives two or more objects