Proof by Contradiction: Infinitely Many Primes

Category: Logic and Proof   Level: 201

N = p1· p2· … · pk + 1 has a prime factor missing from the list

Assume the opposite of the claim and follow it to something impossible. If the primes were a finite list, multiplying them and adding 1 builds a number no prime on the list divides.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Assume the opposite

To prove there are infinitely many primes, suppose there are only finitely many. For a small picture, pretend the whole list is 2, 3, 5, and 7.

primes = {p1, p2, …, pk}

Step 1: Assume the opposite

Step 2: Build a new number

Multiply every prime on the list and add 1. Here the product is 210, so N is 211.

N = p1· p2· … · pk + 1

Step 2: Build a new number

Step 3: Divide by each listed prime

Each prime divides the product 210, shown as a blue dot. N sits one step past it, so every division leaves remainder 1. No prime on the list divides N.

211 ÷ p leaves remainder 1

Step 3: Divide by each listed prime

Step 4: Reach the contradiction

Every whole number above 1 has a prime factor. N has one, but it cannot be on the list. So the list was missing a prime, which breaks the assumption.

211 is prime, and 211 ∉ {2, 3, 5, 7}

Step 4: Reach the contradiction

Step 5: Conclude for every list

The same move defeats any finite list. With six primes, N = 30031 splits into primes 59 and 509, again missing from the list. The primes never run out.

no finite list holds every prime

Step 5: Conclude for every list

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render proof-by-contradiction --out /tmp/proof-by-contradiction

Source: svgmath/diagrams/proofs.py