The Timpson Lyceum · Discrete Math (2025)
Fundamental Theorem of Arithmetic - Lecture 21 (Discrete Math)
Overview
This lecture proves the Fundamental Theorem of Arithmetic: every positive integer has a unique prime factorization. The argument has two halves — existence (every integer factors into primes) and uniqueness (it factors in only one way) — and both run by way of contradiction using the well-ordering principle and the smallest counterexample. With that theorem secured, the lecture closes with two classic "for fun" applications that depend on it: Euclid's proof that there are infinitely many primes, and the proof that is irrational. Together these show how a single structural fact about the integers powers some of the oldest and most famous results in mathematics.
Key Concepts
Prime factorization. Writing a positive integer as a product of prime numbers, e.g. . A prime has no positive divisors other than and ; a composite is an integer greater than that is not prime, so it can be written as with .
Edge cases.
- has a prime factorization: the empty product, which equals (just as the empty sum equals ). So factors uniquely with no prime factors at all.
- A prime is its own factorization: the single factor .
Fundamental Theorem of Arithmetic. Every positive integer has a prime factorization, and that factorization is unique up to the order of the factors.
Key lemma (proved previously, used in uniqueness). If a prime divides a product of primes , then must equal one of those primes . This is Euclid's lemma, and it is the hinge of the uniqueness argument.
Well-ordering principle. Every nonempty subset of the positive integers has a least element. This is what licenses the "smallest counterexample" technique: assume the set of counterexamples is nonempty, take its smallest member, and derive a contradiction — forcing the set to be empty.
Existence — proof strategy. Let . Note and no prime is in . Suppose ; by well-ordering it has a least element . Since is not prime it is composite, so with . Because is the smallest integer lacking a factorization, both and do factor into primes. Multiplying those factorizations gives a prime factorization of — contradicting . Hence .
Uniqueness — proof strategy. Let . Suppose with least element , written two ways: . No can equal any — otherwise dividing out that common prime would produce a smaller integer with two factorizations, contradicting minimality of . But , so by Euclid's lemma equals some — a shared prime. Contradiction. Hence : every integer factors in exactly one way.
Infinitude of primes (Euclid). Suppose there are finitely many primes, with largest prime . Form . Dividing by any prime in the list leaves remainder , so no known prime divides . But has a prime factorization, so has a prime factor larger than — contradicting that was largest. This also gives a prime-generating procedure: multiply known primes and add to always uncover a new prime (it skips many, but never fails).
Irrationality of . Suppose with integers . Then . Counting the power of the prime : in it appears an even number of times, while in it appears an odd number of times. Since the integer has one unique factorization, the count of 's must agree — even cannot equal odd. Contradiction, so is irrational. The Greeks found this shocking: a line segment they could construct (the diagonal of a unit square) corresponds to no ratio of integers, meaning no common unit ever measures both the side and the diagonal of a square.
Worked Example
Claim: is irrational.
Assume for contradiction that for integers . Squaring and clearing the denominator gives . Let denote the number of times the prime appears in a number's factorization. Squaring doubles every exponent, so (even) while (odd). Unique factorization forces these counts to be equal:
No integer is both even and odd, so the equation is impossible. Therefore no such exist, and is irrational.
Summary
- The Fundamental Theorem of Arithmetic says every positive integer has a prime factorization, and it is unique up to order.
- Both halves are proved by minimal counterexample: assume a nonempty set of bad integers, take its least element via well-ordering, and derive a contradiction.
- Existence uses that a smallest non-factorable number would have to be composite, whose two smaller factors already factor — building the missing factorization.
- Uniqueness relies on Euclid's lemma () to force a shared prime between two supposedly disjoint factorizations of the smallest offender.
- Euclid's proof of infinitely many primes: is divisible by no listed prime, yet must have a prime factor — so the list can never be complete.
- is irrational: counting the exponent of in gives odd even, an impossibility guaranteed by unique factorization.