Proof by Contradiction

A proof by contradiction proves a statement by assuming it is false and showing that the assumption leads to something impossible, such as a number that is both even and odd. Since the assumption can’t hold, the statement must be true. Classic examples prove that √2 is irrational and that there are infinitely many primes.

Before this lesson: Direct Proof and Proof by Contrapositive

How proof by contradiction works

A contradiction is a statement that is always false, like r ∧ ¬r (“r and not r”). To prove a statement S, assume its negation ¬S. If valid steps from ¬S reach a contradiction, then ¬S can’t be true, so S is true.

S\lnot Sr \land \lnot r\lnot S \to (r \land \lnot r)
TFFT
FTFF

The last column matches S in both rows, so proving ¬S → (r ∧ ¬r) proves S. For a conditional “if P, then Q,” the negation is P ∧ ¬Q, so you assume P is true and Q is false at the same time.

\lnot(p \to q) \equiv p \land \lnot q

How to write a proof by contradiction

  1. Write the negation of the statement, using the rules for negating quantifiers when it says “for all” or “there exists.”
  2. Begin with “Suppose, for the sake of contradiction, that …” and the negation.
  3. Reason with definitions, algebra and known facts.
  4. Stop when you reach a contradiction: two statements that can’t both be true, or a statement known to be false, such as 1 = 0.
  5. Conclude that the assumption was false, so the original statement is true.
A flowchart of five boxes from top to bottom for the proof that the square root of 2 is irrational. Assume the opposite: root 2 = a/b in lowest terms. Reason: a squared = 2b squared, so a is even. Reason: a = 2c gives b squared = 2c squared, so b is even. Contradiction, in a dashed red box: a and b are both even, but a/b was in lowest terms. Conclude, in a green box: root 2 is irrational.
The proof that √2 is irrational assumes the opposite and reaches two facts that can’t both be true.

Proof by contradiction examples

Example 1: There is no greatest even integer

Prove that there is no greatest even integer.

N = 2k

Suppose, for the sake of contradiction, that N is the greatest even integer, with k an integer.

N + 2 = 2k + 2

Add 2 to N.

N + 2 = 2(k + 1)

Factor out 2; k + 1 is an integer, so N + 2 is even.

N + 2 \gt N

N + 2 is greater than N.

Answer: N + 2 is an even integer greater than N, which contradicts N being the greatest. So there is no greatest even integer.

Example 2: Handshakes (word problem)

At a meeting, can each of 15 people shake hands with exactly 3 of the others? Prove your answer.

h

Suppose it is possible, and let h be the number of handshakes.

15 \cdot 3 = 45

Count each person’s handshakes: 15 people with 3 each.

2h = 45

Every handshake involves 2 people, so it was counted twice.

2h \text{ is even},\ 45 \text{ is odd}

An even number can’t equal an odd number.

Answer: it is impossible. The total count must be even, but 15 · 3 = 45 is odd. The same idea, the handshaking lemma, returns in graph theory later in this course.

Example 3: An equation with no integer solutions

Prove that a2 − 4b ≠ 2 for all integers a and b.

a^2 - 4b = 2

Suppose, for the sake of contradiction, that some integers a and b satisfy this.

a^2 = 4b + 2

Add 4b to both sides.

a^2 = 2(2b + 1)

Factor out 2, so a² is even.

a = 2c

If a² is even, then a is even (proved in proof by contrapositive), with c an integer.

4c^2 = 4b + 2

Substitute a = 2c, since (2c)² = 4c².

2c^2 = 2b + 1

Divide both sides by 2.

2c^2 \text{ is even},\ 2b + 1 \text{ is odd}

An integer can’t be both even and odd.

Answer: the assumption leads to an even number equal to an odd number, so a2 − 4b ≠ 2 for all integers a and b.

Example 4: √2 is irrational

Prove that √2 is irrational.

\sqrt{2} = \dfrac{a}{b}

Suppose √2 is rational: a and b are integers, b ≠ 0, and the fraction is in lowest terms (every fraction can be reduced).

2 = \dfrac{a^2}{b^2}

Square both sides.

a^2 = 2b^2

Multiply both sides by b².

a = 2c

a² is even, so a is even, with c an integer.

(2c)^2 = 2b^2

Substitute a = 2c.

4c^2 = 2b^2

Square 2c (power of a product).

b^2 = 2c^2

Divide both sides by 2.

b = 2d

b² is even, so b is even, with d an integer.

\gcd(a, b) \ge 2

Both a and b are even, so 2 is a common factor.

Answer: a/b has the common factor 2, which contradicts lowest terms. So √2 is irrational, as stated in rational and irrational numbers.

Example 5: There are infinitely many primes

Prove that there are infinitely many prime numbers.

p_1, p_2, \dots, p_n

Suppose there are only finitely many primes, and list all of them.

N = p_1 p_2 \cdots p_n + 1

Build a new number: multiply all the primes and add 1.

N \gt 1

N is at least 2 + 1 = 3, since 2 is on the list.

q \mid N

Every integer greater than 1 has a prime factor q (prime factorization).

q \mid p_1 p_2 \cdots p_n

q is one of the listed primes, so it divides their product.

q \mid N - p_1 p_2 \cdots p_n

If q divides two numbers, it divides their difference.

q \mid 1

The difference is 1.

Answer: no prime divides 1, so the list can’t contain every prime. There are infinitely many primes. Note that N itself need not be prime: 2 · 3 · 5 · 7 · 11 · 13 + 1 = 30,031 = 59 · 509.

Common mistakes

MistakeExample of the errorFix
Negating “for all” as “for all”To prove “every prime greater than 2 is odd,” starting with “Suppose every prime greater than 2 is even”The negation is “some prime greater than 2 is even.” Switch ∀ to ∃.
Assuming only ¬Q for a conditionalProving “if P, then Q” by assuming ¬Q and never using PThat is a contrapositive proof. For contradiction, assume P and ¬Q together.
Stopping before a real contradictionEnding with “so a² = 2b², which seems unlikely”Keep going until two facts clash, such as “a/b is in lowest terms” and “2 divides a and b.”
Claiming p₁p₂⋯pₙ + 1 is prime“2 · 3 · 5 · 7 · 11 · 13 + 1 is a new prime”30,031 = 59 · 509. The proof only needs some prime factor of N.
Forgetting why lowest terms is allowedAssuming lowest terms with no reasonSay that every fraction can be reduced to lowest terms.
Contradicting something you never assumedReaching “b is odd” when nothing said b is evenPoint to the exact assumption or known fact that the new statement breaks.

Related ideas

Cantor’s diagonal argument, which shows that the real numbers are uncountable, is a famous proof by contradiction; see countable and uncountable sets.

A proof by contrapositive is a special case: assuming P and ¬Q and reaching ¬P contradicts P. The next lesson, Strong Induction, extends mathematical induction, and its proofs are often written as a “smallest counterexample” contradiction. The logic behind it is modus tollens.

Practice problems

  1. Write the starting assumption for a proof by contradiction that √3 is irrational.
  2. Write the starting assumption for a proof by contradiction that there is no largest prime number.
  3. Write the starting assumption for a proof by contradiction of “for every integer n, if n2 is odd, then n is odd.”
  4. Prove that there is no smallest positive rational number.
  5. Prove that there is no greatest odd integer.
  6. Prove that 2a + 4b ≠ 7 for all integers a and b.
  7. Prove that the sum of a rational number and an irrational number is irrational.
  8. Prove that √3 is irrational. You may use: if 3 | a2, then 3 | a.
  9. Prove that a2 − 4b ≠ 3 for all integers a and b.
  10. Can each of 9 students in a club shake hands with exactly 5 of the others? Prove your answer.
Show answers

1.

\sqrt{3} = \dfrac{a}{b}

Assume √3 is rational, with a and b integers, b ≠ 0, in lowest terms.

Answer: Suppose √3 = a/b for integers a and b with b ≠ 0 and no common factor greater than 1.

2.

P \ge p \text{ for every prime } p

Assume there is a largest prime P.

Answer: Suppose there is a largest prime number P.

3.

n^2 \text{ odd} \land n \text{ even}

The negation of p → q is p ∧ ¬q.

Answer: Suppose n² is odd and n is even for some integer n.

4.

r \gt 0

Suppose r is the smallest positive rational number.

\dfrac{r}{2} = \dfrac{a}{2b}

If r = a/b, then r/2 = a/(2b) is rational (dividing a fraction by 2).

0 \lt \dfrac{r}{2} \lt r

Half of a positive number is positive and smaller.

Answer: r/2 is a smaller positive rational, a contradiction; so no smallest positive rational exists

5.

N = 2k + 1

Suppose N is the greatest odd integer, with k an integer.

N + 2 = 2k + 3

Add 2.

N + 2 = 2(k + 1) + 1

Write 3 as 2 + 1 and factor 2 out of 2k + 2; so N + 2 is odd.

N + 2 \gt N

It is larger than N.

Answer: N + 2 is a greater odd integer, a contradiction; so no greatest odd integer exists

6.

2a + 4b = 7

Suppose some integers a and b satisfy this.

2(a + 2b) = 7

Factor out 2 (factoring out the GCF); the left side is even.

7 = 2 \cdot 3 + 1

7 is odd.

Answer: an even number can’t equal 7, a contradiction; so 2a + 4b ≠ 7

7.

r + x = s

Let r be rational and x irrational, and suppose the sum s is rational.

x = s - r

Subtract r from both sides.

s - r = \dfrac{a}{b} - \dfrac{c}{d}

Write s = a/b and r = c/d with integers and b, d ≠ 0.

s - r = \dfrac{ad - bc}{bd}

Subtract over the common denominator bd (subtracting fractions); bd ≠ 0.

Answer: x = (ad − bc)/(bd) is rational, which contradicts x being irrational; so r + x is irrational

8.

\sqrt{3} = \dfrac{a}{b}

Suppose √3 is rational, in lowest terms with b ≠ 0.

a^2 = 3b^2

Square both sides and multiply by b².

a = 3c

3 | a², so 3 | a, with c an integer.

9c^2 = 3b^2

Substitute a = 3c.

b^2 = 3c^2

Divide both sides by 3.

b = 3d

3 | b², so 3 | b, with d an integer.

Answer: 3 divides both a and b, which contradicts lowest terms; so √3 is irrational

9.

a^2 = 4b + 3

Suppose a² − 4b = 3 for some integers a and b; add 4b to both sides.

a = 2c:\ 4c^2 = 4b + 3

Case 1: a is even. Substitute a = 2c.

4(c^2 - b) = 3

Subtract 4b and factor out 4; 3 is not a multiple of 4, a contradiction.

a = 2c + 1:\ 4c^2 + 4c + 1 = 4b + 3

Case 2: a is odd. Expand (2c + 1)² (square of a binomial).

4(c^2 + c - b) = 2

Subtract 4b + 1 and factor out 4; 2 is not a multiple of 4, a contradiction.

Answer: both cases are impossible, so a² − 4b ≠ 3 for all integers a and b

10.

9 \cdot 5 = 45

Suppose it is possible; count each student’s handshakes.

2h = 45

Each handshake is counted twice.

Answer: impossible; 2h is even but 45 is odd

Proof by contradiction FAQ

What is proof by contradiction?

It is a method that assumes the statement you want to prove is false and shows that this leads to something impossible. The assumption must be wrong, so the statement is true.

How do you start a proof by contradiction?

Write “Suppose, for the sake of contradiction,” followed by the exact negation of the statement. For “if P, then Q,” assume P and not Q.

What is the difference between proof by contradiction and proof by contrapositive?

A contrapositive proof assumes ¬Q and proves ¬P directly. A proof by contradiction assumes P and ¬Q and can end with any impossible statement.

How do you prove √2 is irrational?

Assume √2 = a/b in lowest terms. Squaring gives a2 = 2b2, which forces both a and b to be even, so the fraction was not in lowest terms after all.

Summary

  • To prove S by contradiction, assume ¬S and reach a statement that is always false.
  • For “if P, then Q,” assume P and ¬Q together.
  • Common contradictions: a number both even and odd, a fraction not in lowest terms, or a prime dividing 1.
  • √2 and √3 are irrational, and there are infinitely many primes, by contradiction.
  • Write the negation carefully and name the exact facts that clash.

Previous lesson: Proof by Contrapositive

Next lesson: Strong Induction

Back to the Discrete Math Index