M5.8.2 Chapter 2

Proof by contradiction

How can you prove something is true by first pretending it is false?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

  • Prove that √2 is irrational
  • Prove that there are infinitely many primes

In chapter 1 a proof went from what we know to the claim. A proof by contradiction goes the other way round. It assumes that the claim is false. Then it takes valid steps until it reaches something impossible, a contradiction. If every step was valid, the only thing left to blame is the assumption. So the assumption is false, and the claim is true.

The plan of a proof by contradiction, in four numbered lines joined by arrows. Line 1 reads Assume the opposite of the claim.. Line 2 reads Take valid steps, one after another, from it.. Line 3 reads Reach something that cannot be true. a contradiction. Line 4 reads So the assumption was false, and the claim is true..1Assume the opposite ofthe claim.2Take valid steps, oneafter another, from it.3Reach something thatcannot be true.a contradiction4So the assumption wasfalse, and the claim is true.
The plan. The skill is in line 1: you must write the exact opposite of the claim.

A first example. Claim: there is no smallest positive fraction. Suppose there is one, and call it s. Then s ÷ 2 is also a positive fraction, and it is smaller than s. That contradicts the choice of s as the smallest. So the assumption was false, and there is no smallest positive fraction.

A chain of boxes holding 1, 1/2, 1/4, 1/8 and …, the sign that it goes on. Each arrow is labelled ÷ 2. Every term has a smaller term after it.1÷ 21/2÷ 21/4÷ 21/8÷ 2…
Whatever term you call the smallest, halving it gives a smaller one.

Worked example

Prove that there are no whole numbers m and n with 4m + 6n = 1001.

  1. Suppose there are whole numbers m and n with 4m + 6n = 1001.
  2. Take out the common factor 2: 4m + 6n = 2(2m + 3n). The left side is twice a whole number, so it is even.
  3. The right side is odd: 1001 = 2 × 500 + 1.
  4. So an even number equals an odd number. That is impossible.
  5. So the assumption was false, and no such whole numbers exist.

Answer: No such whole numbers exist. The left side is even and 1001 is odd.

Now a bigger example. A number is rational if it can be written as a fraction a/b of two integers, with b not 0, and irrational if it cannot. To show that √2 is irrational we need one fact first: if a² is even, then a is even. We prove it by the other direction. If a is odd, then a² is odd, since odd × odd is odd (chapter 1). So an odd a never has an even square. The table shows it for small cases.

A table of the squares of the whole numbers 1 to 8, and whether each square is even or odd. The heads are a and a² and a² is. The row reads 1 and 1 and odd. The row reads 2 and 4 and even. The row reads 3 and 9 and odd. The row reads 4 and 16 and even. The row reads 5 and 25 and odd. The row reads 6 and 36 and even. The row reads 7 and 49 and odd. The row reads 8 and 64 and even.aa²a² is11odd24even39odd416even525odd636even749odd864even
Every odd a has an odd square, and every even a has an even square. The table shows cases. The proof is the sentence above it.

Now the proof. We write the fraction in lowest terms, so that a and b have no common factor. The contradiction will be that they do have one.

A proof that √2 is irrational, in seven numbered lines joined by arrows. Line 1 reads Suppose √2 = a/b, where a/b is in lowest terms. a and b have no common factor. Line 2 reads Square both sides: 2 = a²/b², so a² = 2b².. Line 3 reads So a² is even, so a is even. an odd a has an odd a². Line 4 reads Write a = 2c. Then 4c² = 2b², so b² = 2c².. Line 5 reads So b² is even, so b is even.. Line 6 reads a and b are both even, so they share the factor 2. this breaks line 1. Line 7 reads So √2 is not a fraction. the assumption was false.1Suppose √2 = a/b, where a/bis in lowest terms.a and b have no common factor2Square both sides: 2 = a²/b²,so a² = 2b².3So a² is even, so a is even.an odd a has an odd a²4Write a = 2c. Then 4c² = 2b²,so b² = 2c².5So b² is even, so b is even.6a and b are both even, sothey share the factor 2.this breaks line 17So √2 is not a fraction.the assumption was false
Line 6 contradicts line 1. Nothing else was assumed, so line 1 must be false.

The same idea proves that there are infinitely many primes. Suppose not. Then all the primes can be listed, up to a last one. Multiply every prime on the list and add 1. Call the result N. Divide N by any prime on the list. The product part divides exactly, so the remainder is always 1. So no prime on the list divides N. But every number above 1 has a prime factor. That factor is a prime that is not on the list.

Worked example

Suppose the only primes were 2, 3, 5, 7, 11 and 13. Find N, and show that the list is not complete.

  1. Multiply the primes: 2 × 3 × 5 × 7 × 11 × 13 = 30030.
  2. Add 1: N = 30030 + 1 = 30031.
  3. Each prime on the list leaves remainder 1 when it divides N, so none of them divides N.
  4. But N has a prime factor. Here 30031 = 59 × 509.
  5. 59 and 509 are primes that are not on the list, so the list was not complete.

Answer: N = 30031 = 59 × 509, and 59 and 509 are not on the list.

A table of the remainder when N = 30031 is divided by each prime on the list. The heads are prime and remainder. The row reads 2 and 1. The row reads 3 and 1. The row reads 5 and 1. The row reads 7 and 1. The row reads 11 and 1. The row reads 13 and 1.primeremainder21315171111131
Every remainder is 1, so no prime on the list divides 30031.
A table with the number of primes used, N, and the smallest prime factor of N. The heads are k and N and factor. The row reads 2 and 7 and 7. The row reads 3 and 31 and 31. The row reads 4 and 211 and 211. The row reads 5 and 2311 and 2311. The row reads 6 and 30031 and 59.kNfactor27733131421121152311231163003159
N is the product of the first k primes, plus 1. The last column is its smallest prime factor. It is never one of the k primes.
A proof that there are infinitely many primes, in seven numbered lines joined by arrows. Line 1 reads Suppose there are finitely many primes. List them all.. Line 2 reads Let N be their product plus 1.. Line 3 reads Dividing N by a listed prime leaves remainder 1.. Line 4 reads So no listed prime divides N.. Line 5 reads N is more than 1, so it has a prime factor.. Line 6 reads That prime is not listed. Contradiction.. Line 7 reads So there are infinitely many primes..1Suppose there are finitelymany primes. List them all.2Let N be their productplus 1.3Dividing N by a listed primeleaves remainder 1.4So no listed primedivides N.5N is more than 1, so it hasa prime factor.6That prime is not listed.Contradiction.7So there are infinitely manyprimes.
The proof in full. Notice that N itself need not be prime. Only its prime factor is needed.

See it three ways

With things

Cut a strip of paper. Fold it in half and tear off one half. Fold what is left in half again, and tear again. Paper runs out after a few tears, but a number can always be halved again, so no fraction is the smallest.

As a picture

A chain of boxes holding 1, 1/2, 1/4, 1/8 and …, the sign that it goes on. Each arrow is labelled ÷ 2. Every piece has a smaller piece after it.1÷ 21/2÷ 21/4÷ 21/8÷ 2…

In words

Assume there is a smallest piece. Halving it gives a smaller piece, which is impossible. So the assumption was false, and there is no smallest piece.

In symbols

s ÷ 2 is less than s, so s was not the smallest.

Try it

Fold a strip again and again

You need: a long strip of paper, a ruler, a pencil.

  1. Draw a line along the strip and mark its length. Call the length 1.
  2. Fold the strip in half. Mark the fold and tear off one half.
  3. Fold the piece that is left in half. Mark the fold and tear off one half.
  4. Do it a few more times. Write the length of the piece after each fold.

What you will see: Each piece is half of the last. Pieces of 1/2, 1/4, 1/8 and 1/16 of the strip come off, and a piece always remains. There is no smallest piece.

If you cannot try it, this is what happens.
A strip split into pieces of 1/2, 1/4 and 1/8, with a dotted part left over. Above it, a bracket reads 3 pieces add to 7/8. Below it, a bracket reads the whole strip is 1, and a label reads left: 1/8.1/21/41/83 pieces add to 7/8the whole strip is 1left: 1/8

A wrong idea many people have

In the proof that there are infinitely many primes, N is always a prime number.

Why it feels right: N is not divisible by any prime on the list, which looks like what a prime is.

The test that breaks it: Take the primes 2, 3, 5, 7, 11 and 13. Then N = 30031 = 59 × 509, which is not prime.

What is true: N has a prime factor that is not on the list. That factor may be N itself, or it may be a smaller prime, such as 59 here. Either way it is a prime that was missing.

A wrong idea many people have

The opposite of "there are infinitely many primes" is "there are no primes".

Why it feels right: The words "infinitely many" and "none" look like two ends of a scale.

The test that breaks it: There are primes: 2, 3 and 5 are three of them. So "there are no primes" is false, yet the claim could still be false for another reason. It is not the exact opposite.

What is true: The exact opposite is "there are finitely many primes". That is why the proof starts by listing all the primes.

Key words

proof by contradiction
a proof that assumes the opposite of the claim and reaches something impossible.
contradiction
a result that cannot be true, such as an even number equal to an odd number.
rational
a number that can be written as a fraction a/b of two integers, with b not 0.
irrational
a number that cannot be written as a fraction of two integers. √2 is one.
lowest terms
a fraction a/b where a and b have no common factor above 1.

Back to your guess

The answer is C: A proof assumes the opposite of a claim and reaches something impossible, such as 1 = 2. That shows the opposite is false, so the claim is true.

If every step is valid, an impossible result can only come from the assumption. So the assumption is false. Its opposite, the claim, is then true. This is how we prove that √2 is not a fraction.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. Suppose √5 = a/b in lowest terms. Squaring gives a² = 5b². Which statement follows in one step from a² = 5b²?

    Tap your answer.
    1. Yes, that is right. a² = 5 × b², which is 5 times a whole number. The proof continues as for √2: 5 divides a² so it divides a, and then 5 also divides b, which breaks lowest terms.

    2. Not this one. That was the case for a² = 2b². Here a² = 5b², and 5b² is odd when b is odd, so a² need not be even. Read this page again. Try another.

    3. Not this one. Nothing in a² = 5b² says that. In lowest terms, a and b share no factor. Read this page again. Try another.

    4. Not this one. Squaring a = 5b gives a² = 25b², not 5b². Read this page again. Try another.

    See the answer

    a² is a multiple of 5

    a² = 5 × b², which is 5 times a whole number. The proof continues as for √2: 5 divides a² so it divides a, and then 5 also divides b, which breaks lowest terms.

    • If you chose B: That was the case for a² = 2b². Here a² = 5b², and 5b² is odd when b is odd, so a² need not be even. Read this page again.
    • If you chose C: Nothing in a² = 5b² says that. In lowest terms, a and b share no factor. Read this page again.
    • If you chose D: Squaring a = 5b gives a² = 25b², not 5b². Read this page again.
  2. This proof that there are infinitely many primes goes wrong at one line. Which is the first wrong line?

    A proof that there are infinitely many primes with one wrong line, in seven numbered lines. Line 1 reads Suppose there are finitely many primes. List them all.. Line 2 reads Let N be their product plus 1.. Line 3 reads Dividing N by a listed prime leaves remainder 0.. Line 4 reads No listed prime divides N.. Line 5 reads N is more than 1, so it has a prime factor.. Line 6 reads That factor is not listed. Contradiction.. Line 7 reads So there are infinitely many primes..1Suppose there are finitelymany primes. List them all.2Let N be their productplus 1.3Dividing N by a listed primeleaves remainder 0.4No listed primedivides N.5N is more than 1, so ithas a prime factor.6That factor is not listed.Contradiction.7So there are infinitely manyprimes.
    Tap your answer.
    1. Not this one. Line 2 defines N as the product plus 1. For the primes 2, 3, 5, 7, 11, 13 and 17 that is 510510 + 1 = 510511. It is correct. Read this page again. Try another.

    2. Not this one. Every whole number above 1 has a prime factor, so line 5 is true. Read this page again. Try another.

    3. Not this one. Line 6 is true: for the primes 2, 3, 5, 7, 11, 13 and 17 the factor 19 of 510511 is not on the list. Read this page again. Try another.

    4. Yes, that is right. The product divides exactly by each listed prime, so adding 1 leaves a remainder of 1, not 0. For the primes 2, 3, 5, 7, 11, 13 and 17, N = 510511 and 510511 ÷ 17 leaves 1.

    See the answer

    Line 3

    The product divides exactly by each listed prime, so adding 1 leaves a remainder of 1, not 0. For the primes 2, 3, 5, 7, 11, 13 and 17, N = 510511 and 510511 ÷ 17 leaves 1.

    • If you chose A: Line 2 defines N as the product plus 1. For the primes 2, 3, 5, 7, 11, 13 and 17 that is 510510 + 1 = 510511. It is correct. Read this page again.
    • If you chose B: Every whole number above 1 has a prime factor, so line 5 is true. Read this page again.
    • If you chose C: Line 6 is true: for the primes 2, 3, 5, 7, 11, 13 and 17 the factor 19 of 510511 is not on the list. Read this page again.
  3. What is the exact opposite of "there are infinitely many primes", the statement to assume at the start of the proof?

    Tap your answer.
    1. Not this one. That is false, and it is not the opposite. For example, 4 is not prime. Read this page again. Try another.

    2. Yes, that is right. The claim says the primes never run out. The exact opposite says they do run out, so all of them can be listed.

    3. Not this one. 2 is a prime, so this is false. It is not the exact opposite either. Read this page again. Try another.

    4. Not this one. 2 is an even prime. This is not the opposite of the claim. Read this page again. Try another.

    See the answer

    There are finitely many primes.

    The claim says the primes never run out. The exact opposite says they do run out, so all of them can be listed.

    • If you chose A: That is false, and it is not the opposite. For example, 4 is not prime. Read this page again.
    • If you chose C: 2 is a prime, so this is false. It is not the exact opposite either. Read this page again.
    • If you chose D: 2 is an even prime. This is not the opposite of the claim. Read this page again.
  4. Which of these equations has no solution in whole numbers x and y (zero allowed)?

    Tap your answer.
    1. Not this one. 10x + 15y = 2010 has solutions, such as x = 0 and y = 134. The left side is a multiple of 5, and so is the right side. Read this page again. Try another.

    2. Yes, that is right. 10x + 15y = 5(2x + 3y) is always a multiple of 5. 2013 ends in 3, so it is not one. Suppose a solution exists, and a multiple of 5 equals a number that is not a multiple of 5. That is a contradiction.

    3. Not this one. 2015 is a multiple of 5, as the left side always is. It has solutions. Read this page again. Try another.

    4. Not this one. 2025 is a multiple of 5, as the left side always is. It has solutions. Read this page again. Try another.

    See the answer

    10x + 15y = 2013

    10x + 15y = 5(2x + 3y) is always a multiple of 5. 2013 ends in 3, so it is not one. Suppose a solution exists, and a multiple of 5 equals a number that is not a multiple of 5. That is a contradiction.

    • If you chose A: 10x + 15y = 2010 has solutions, such as x = 0 and y = 134. The left side is a multiple of 5, and so is the right side. Read this page again.
    • If you chose C: 2015 is a multiple of 5, as the left side always is. It has solutions. Read this page again.
    • If you chose D: 2025 is a multiple of 5, as the left side always is. It has solutions. Read this page again.
  5. From an earlier chapter

    A claim says that n² + n + 17 is prime for every whole number n from 0 up. Which value of n is a counterexample?

    Tap your answer.
    1. Not this one. 3² + 3 + 17 = 29, which is prime. A counterexample must give a number that is not prime. Go to M5.8.1. Try another.

    2. Yes, that is right. n = 16 gives 16² + 16 + 17 = 289, which is 17 × 17. So it is not prime. One failure is enough.

    3. Not this one. 5² + 5 + 17 = 47, which is prime. This case works. Go to M5.8.1. Try another.

    4. Not this one. 8² + 8 + 17 = 89, which is prime. This case works. Go to M5.8.1. Try another.

    See the answer

    n = 16

    n = 16 gives 16² + 16 + 17 = 289, which is 17 × 17. So it is not prime. One failure is enough.

    • If you chose A: 3² + 3 + 17 = 29, which is prime. A counterexample must give a number that is not prime. Go to M5.8.1.
    • If you chose C: 5² + 5 + 17 = 47, which is prime. This case works. Go to M5.8.1.
    • If you chose D: 8² + 8 + 17 = 89, which is prime. This case works. Go to M5.8.1.
  6. Let N be the product of the primes 2, 3, 5 and 7, plus 1. What is N?

    See the answer

    211

    2 × 3 × 5 × 7 = 210, and adding 1 gives 211.

  7. Take the primes 2, 5, 7, 11 and 13. Then N = 2 × 5 × 7 × 11 × 13 + 1 = 10011. What is the smallest prime factor of N?

    See the answer

    3

    None of 2, 5, 7, 11 and 13 divides 10011, as each leaves remainder 1. Trying 3: 10011 = 3 × 3337. So the smallest prime factor is 3, a prime that was not on the list.

  8. In the proof that √2 is irrational, which fact takes us from "a² is even" to "a is even"?

    Tap your answer.
    1. Not this one. That fact goes the other way. We need: if a² is even, then a is even. Read this page again. Try another.

    2. Not this one. That is a true fact, but it is about sums. The proof needs a fact about squares. Read this page again. Try another.

    3. Yes, that is right. If a were odd, a² would be odd. So a² even rules out a odd, and a must be even.

    4. Not this one. That is false. 6 is even and is not a multiple of 4. Read this page again. Try another.

    See the answer

    The square of an odd number is odd.

    If a were odd, a² would be odd. So a² even rules out a odd, and a must be even.

    • If you chose A: That fact goes the other way. We need: if a² is even, then a is even. Read this page again.
    • If you chose B: That is a true fact, but it is about sums. The proof needs a fact about squares. Read this page again.
    • If you chose D: That is false. 6 is even and is not a multiple of 4. Read this page again.

Keep it

Copy this into your exercise book.

Contradiction: assume the opposite, reach something impossible, so the assumption is false. √2 = a/b in lowest terms gives a² = 2b², a and b both even. Product of primes plus 1 has a new prime factor.

Draw: Four boxes joined by arrows: assume the opposite, valid steps, impossible, so the claim is true.

Reading with a child? A short page for the adult: what this chapter teaches and three questions to ask.

No internet tomorrow? Save the whole book as one file (961 KB). It opens on any phone.