Skip to content
Family Table Math
Auto

Proof by Contradiction and Counterexample

Some statements are hard to prove head-on. How could you directly show that 2\sqrt{2} can never be written as a fraction, when there are infinitely many fractions to rule out? Proof by contradiction takes a sneaky route: suppose the statement is false, and show that this leads to something impossible. And when a statement is false, you don’t need a proof at all, just one example where it fails: a counterexample.

To prove a statement SS:

  1. Assume the opposite: suppose SS is false.
  2. Reason logically from that assumption, using correct steps.
  3. Reach a contradiction: something that can’t be true, like 1=01 = 0, or a number that is both odd and even, or a fraction in lowest terms that can still be simplified.
  4. Conclude: the assumption must be wrong, so SS is true.

Here’s a short example. Claim: there is no largest even number.

Suppose, for a contradiction, that there is a largest even number; call it NN. Then N=2mN = 2m for some integer mm. But N+2=2(m+1)N + 2 = 2(m + 1) is also even, and N+2>NN + 2 \gt N. So NN is not the largest even number, which contradicts our assumption. Therefore there is no largest even number. ■\blacksquare

A number is rational if it can be written as pq\dfrac{p}{q} where pp and qq are integers and q≠0q \ne 0 (see number systems). Every rational number can be written in lowest terms, where pp and qq have no common factor other than 11. Irrationality proofs use this.

You’ll also need this fact: if p2p^2 is even, then pp is even. Why: if pp were odd, p=2n+1p = 2n + 1, then p2=4n2+4n+1=2(2n2+2n)+1p^2 = 4n^2 + 4n + 1 = 2(2n^2 + 2n) + 1 would be odd. The same reasoning works for cubes: if p3p^3 is even, then pp is even.

A statement that claims something is true for all cases is false if there is even one case where it fails. That case is a counterexample.

It is not enough to just state the counterexample. You must show why it is one: substitute it in and explain why the statement fails for it.

For example, the claim ”x2≥xx^2 \ge x for every real number xx” is false. Take x=12x = \tfrac{1}{2}: then x2=14x^2 = \tfrac{1}{4}, and 14<12\tfrac{1}{4} \lt \tfrac{1}{2}, so x2≥xx^2 \ge x is not true for this value.

Notice the asymmetry: one counterexample disproves a “for all” statement, but no number of examples can prove one.

The statement…Try…
can be reached directly with algebra (an identity, a result about 2n2n or 2n+12n + 1)a deductive proof
is about every positive integer nn, and case k+1k + 1 builds on case kk (sums, divisibility, nnth derivatives)proof by induction
says something is impossible or not true: “is irrational”, “there is no largest…”, “there are infinitely many…”, “has no solutions”proof by contradiction
claims to be true “for all” cases, but you suspect it’s falselook for a counterexample

Show that each statement is not always true.

  • (a) “For every positive integer nn, 2n+12^n + 1 is prime.”
  • (b) “If a>ba \gt b, then a2>b2a^2 \gt b^2.”

Solution.

(a) Take n=3n = 3: 23+1=9=3×32^3 + 1 = 9 = 3 \times 3. Since 99 has the factor 33, it is not prime. So the statement is false for n=3n = 3, and it is not true for every positive integer.

(b) Take a=1a = 1 and b=−2b = -2. Then a>ba \gt b, since 1>−21 \gt -2. But a2=1a^2 = 1 and b2=4b^2 = 4, so a2<b2a^2 \lt b^2. The statement is false for these values.

In both parts, the explanation (why 99 isn’t prime, why 1<41 \lt 4 breaks the claim) is what earns the marks.

Prove that 2\sqrt{2} is irrational.

Solution. Suppose, for a contradiction, that 2\sqrt{2} is rational. Then

2=pq\sqrt{2} = \frac{p}{q}

where pp and qq are positive integers with no common factor (the fraction is in lowest terms). Square both sides and rearrange:

2=p2q2⇒p2=2q22 = \frac{p^2}{q^2} \quad\Rightarrow\quad p^2 = 2q^2

So p2p^2 is even, which means pp is even. Write p=2mp = 2m for some integer mm:

(2m)2=2q2⇒4m2=2q2⇒q2=2m2(2m)^2 = 2q^2 \quad\Rightarrow\quad 4m^2 = 2q^2 \quad\Rightarrow\quad q^2 = 2m^2

So q2q^2 is even, which means qq is even.

Now pp and qq are both even, so they have a common factor of 22. This contradicts the assumption that pq\dfrac{p}{q} was in lowest terms. Therefore 2\sqrt{2} is irrational. ■\blacksquare

Prove that log⁡23\log_2 3 is irrational.

Solution. Suppose, for a contradiction, that log⁡23\log_2 3 is rational. Since 3>13 \gt 1, log⁡23>0\log_2 3 \gt 0, so we can write

log⁡23=pq\log_2 3 = \frac{p}{q}

where pp and qq are positive integers. By the definition of a logarithm,

2p/q=3⇒(2p/q)q=3q⇒2p=3q2^{p/q} = 3 \quad\Rightarrow\quad \left(2^{p/q}\right)^q = 3^q \quad\Rightarrow\quad 2^p = 3^q

Since p≥1p \ge 1, 2p2^p is even. But 3q3^q is a product of odd numbers, so it is odd. An even number can’t equal an odd number, which is a contradiction. Therefore log⁡23\log_2 3 is irrational. ■\blacksquare

The step ”pp and qq are positive” matters: if pp were 00, then 2p=12^p = 1 would be odd, and the argument would fall apart.

Example 4: There are infinitely many primes

Section titled “Example 4: There are infinitely many primes”

Prove that there are infinitely many prime numbers.

Solution. This proof goes back to Euclid, about 2300 years ago.

Suppose, for a contradiction, that there are only finitely many primes. List all of them: p1,p2,p3,…,pkp_1, p_2, p_3, \dots, p_k. Now build the number

N=p1×p2×p3×⋯×pk+1N = p_1 \times p_2 \times p_3 \times \dots \times p_k + 1

NN is bigger than 11, so it has at least one prime factor. That prime must be one of p1,p2,…,pkp_1, p_2, \dots, p_k, since the list contains every prime. But dividing NN by any pip_i leaves a remainder of 11, because NN is one more than a multiple of pip_i. So none of the primes in the list divides NN.

That means NN has a prime factor that isn’t on the list, which contradicts the assumption that the list contained every prime. Therefore there are infinitely many primes. ■\blacksquare

Careful: the proof does not say NN itself is prime. For example, 2×3×5×7×11×13+1=30031=59×5092 \times 3 \times 5 \times 7 \times 11 \times 13 + 1 = 30031 = 59 \times 509. What it says is that NN has a prime factor missing from the list.

Stating a counterexample without explaining it. Writing "n=3n = 3" isn’t enough. Show the calculation (23+1=9=3×32^3 + 1 = 9 = 3 \times 3) and say why it breaks the statement (it isn’t prime).

Trying to prove a “for all” statement with examples. Checking 2≠75\sqrt{2} \ne \tfrac{7}{5}, 2≠1712\sqrt{2} \ne \tfrac{17}{12}, and so on doesn’t prove 2\sqrt{2} is irrational. There are infinitely many fractions; you need a proof.

Forgetting “in lowest terms”. The contradiction in the 2\sqrt{2} proof comes from pp and qq both being even. That’s only a contradiction if you said at the start that pq\dfrac{p}{q} has no common factor.

Thinking Euclid’s N must be prime. N=p1p2⋯pk+1N = p_1 p_2 \cdots p_k + 1 is not always prime (30031=59×50930031 = 59 \times 509). The proof only needs NN to have a prime factor that isn’t on the list.

Skipping the reason that p is even. ”p2p^2 is even, so pp is even” needs a justification the first time you use it: if pp were odd, p2p^2 would be odd.

Not saying what was contradicted. End by naming the contradiction (“this contradicts pq\dfrac{p}{q} being in lowest terms”) and stating the conclusion (“so 2\sqrt{2} is irrational”).

1. (Warm-up) Find a counterexample to show that this statement is false: “If a2>b2a^2 \gt b^2, then a>ba \gt b.”

Solution

Take a=−3a = -3 and b=1b = 1. Then a2=9a^2 = 9 and b2=1b^2 = 1, so a2>b2a^2 \gt b^2. But a=−3<1=ba = -3 \lt 1 = b, so a>ba \gt b is false. The statement fails for these values.

(Any negative aa with ∣a∣>∣b∣|a| \gt |b| works.)

2. (Warm-up) Find a counterexample to show that this statement is false: “The sum of two irrational numbers is always irrational.”

Solution

Take 2\sqrt{2} and −2-\sqrt{2}. Both are irrational (−2-\sqrt{2} is irrational because if it equalled a fraction pq\dfrac{p}{q}, then 2\sqrt{2} would equal −pq\dfrac{-p}{q}). But

2+(−2)=0=01\sqrt{2} + \left(-\sqrt{2}\right) = 0 = \frac{0}{1}

which is rational. So the sum of two irrational numbers is not always irrational.

3. (Warm-up) Prove by contradiction that there is no smallest positive rational number.

Solution

Suppose, for a contradiction, that there is a smallest positive rational number, qq. Then q2\dfrac{q}{2} is also rational (if q=abq = \dfrac{a}{b}, then q2=a2b\dfrac{q}{2} = \dfrac{a}{2b}), it is positive, and q2<q\dfrac{q}{2} \lt q. So qq is not the smallest positive rational number, which contradicts the assumption. Therefore there is no smallest positive rational number. ■\blacksquare

4. (Core) Prove that 3\sqrt{3} is irrational. You may use the fact that if p2p^2 is a multiple of 33, then pp is a multiple of 33.

Solution

Suppose, for a contradiction, that 3=pq\sqrt{3} = \dfrac{p}{q} where pp and qq are positive integers with no common factor. Then

3=p2q2⇒p2=3q23 = \frac{p^2}{q^2} \quad\Rightarrow\quad p^2 = 3q^2

so p2p^2 is a multiple of 33, and therefore pp is a multiple of 33. Write p=3mp = 3m:

9m2=3q2⇒q2=3m29m^2 = 3q^2 \quad\Rightarrow\quad q^2 = 3m^2

so q2q^2 is a multiple of 33, and therefore qq is a multiple of 33.

Now pp and qq have a common factor of 33, contradicting the assumption that pq\dfrac{p}{q} is in lowest terms. Therefore 3\sqrt{3} is irrational. ■\blacksquare

(Why the given fact is true: if pp is not a multiple of 33, then p=3n+1p = 3n + 1 or p=3n+2p = 3n + 2, and p2=9n2+6n+1p^2 = 9n^2 + 6n + 1 or 9n2+12n+4=3(3n2+4n+1)+19n^2 + 12n + 4 = 3(3n^2 + 4n + 1) + 1. Either way, p2p^2 leaves a remainder of 11 when divided by 33.)

5. (Core) Let aa be a rational number and bb an irrational number. Prove by contradiction that a+ba + b is irrational.

Solution

Suppose, for a contradiction, that a+ba + b is rational. Write a=mna = \dfrac{m}{n} and a+b=pqa + b = \dfrac{p}{q}, where m,n,p,qm, n, p, q are integers and n,q≠0n, q \ne 0. Then

b=(a+b)−a=pq−mn=pn−mqqnb = (a + b) - a = \frac{p}{q} - \frac{m}{n} = \frac{pn - mq}{qn}

Here pn−mqpn - mq and qnqn are integers, and qn≠0qn \ne 0, so bb is rational. This contradicts bb being irrational. Therefore a+ba + b is irrational. ■\blacksquare

6. (Core) Prove that log⁡35\log_3 5 is irrational.

Solution

Suppose, for a contradiction, that log⁡35\log_3 5 is rational. Since 5>15 \gt 1, log⁡35>0\log_3 5 \gt 0, so log⁡35=pq\log_3 5 = \dfrac{p}{q} with pp and qq positive integers. Then

3p/q=5⇒3p=5q3^{p/q} = 5 \quad\Rightarrow\quad 3^p = 5^q

Since p≥1p \ge 1, 3p3^p is a multiple of 33. But 5q5^q is a product of 55‘s, and 33 is prime and doesn’t divide 55, so 5q5^q is not a multiple of 33. This is a contradiction. Therefore log⁡35\log_3 5 is irrational. ■\blacksquare

7. (Core) Show that this statement is false: “For every positive integer nn, n2+3n+1n^2 + 3n + 1 is prime.”

Solution

Try values in turn: n=1,2,3,4,5n = 1, 2, 3, 4, 5 give 5,11,19,29,415, 11, 19, 29, 41, which are all prime. But for n=6n = 6:

62+3(6)+1=36+18+1=55=5×116^2 + 3(6) + 1 = 36 + 18 + 1 = 55 = 5 \times 11

5555 is not prime, so n=6n = 6 is a counterexample, and the statement is false.

8. (Challenge) Prove that 23\sqrt[3]{2} is irrational.

Solution

Suppose, for a contradiction, that 23=pq\sqrt[3]{2} = \dfrac{p}{q} where pp and qq are positive integers with no common factor. Cube both sides:

2=p3q3⇒p3=2q32 = \frac{p^3}{q^3} \quad\Rightarrow\quad p^3 = 2q^3

So p3p^3 is even. Then pp must be even (if pp were odd, p3p^3 would be a product of odd numbers, so odd). Write p=2mp = 2m:

8m3=2q3⇒q3=4m3=2(2m3)8m^3 = 2q^3 \quad\Rightarrow\quad q^3 = 4m^3 = 2(2m^3)

So q3q^3 is even, and by the same reasoning qq is even.

Now pp and qq are both even, contradicting the assumption that pq\dfrac{p}{q} is in lowest terms. Therefore 23\sqrt[3]{2} is irrational. ■\blacksquare

9. (Challenge) Prove by contradiction that there are no integers xx and yy with x2−y2=6x^2 - y^2 = 6.

Solution

Suppose, for a contradiction, that there are integers xx and yy with x2−y2=6x^2 - y^2 = 6. Factor:

(x−y)(x+y)=6(x - y)(x + y) = 6

The two factors x−yx - y and x+yx + y differ by 2y2y, which is even, so they are both even or both odd.

  • If both are odd, their product is odd. But 66 is even. Contradiction.
  • If both are even, each is a multiple of 22, so their product is a multiple of 44. But 66 is not a multiple of 44. Contradiction.

Either way we reach a contradiction, so there are no integers xx and yy with x2−y2=6x^2 - y^2 = 6. ■\blacksquare