Key idea of this section
Every integer n ≥ 2 can be written as n = p₁e₁ p₂e₂ ⋯ pₖeₖ, uniquely up to the order of the factors.
Primes and irreducibles
An integer p ≥ 2 is prime if its only positive divisors are 1 and p. In a general ring one distinguishes two properties that coincide in ℤ: an element is irreducible if it has no non-trivial factorisation, and prime if whenever it divides a product it divides one of the factors. The definition above is irreducibility; the fact that it implies primality is the heart of the subject.
Lemma 2.1 (Euclid's lemma). If p is prime and p | ab, then p | a or p | b.
Proof. If p ∤ a then gcd(p, a) = 1, because the only positive divisors of p are 1 and p. By Corollary 1.4, p | b. ∎
By induction, if p divides a product a₁a₂⋯aₘ then p divides some aᵢ.
Theorem 2.2 (Fundamental theorem of arithmetic). Every integer n ≥ 2 is a product of primes, and this product is unique apart from the order of the factors.
Proof. Existence, by strong induction: if n is prime we are done; otherwise n = ab with 1 < a, b < n, and a, b are products of primes by the induction hypothesis. Uniqueness: suppose n = p₁p₂⋯pᵣ = q₁q₂⋯qₛ with all pᵢ, qⱼ prime, and suppose n is the least integer with two different factorisations. Then p₁ divides q₁⋯qₛ, so by Lemma 2.1 p₁ | qⱼ for some j, and since qⱼ is prime, p₁ = qⱼ. Cancelling gives a smaller integer n/p₁ with two different factorisations (or, if n/p₁ = 1, both sides were the single prime p₁), contradicting minimality. ∎
For n ∈ ℤ ∖ {0} and a prime p, write vₚ(n) for the exponent of p in n (the p-adic valuation), so that |n| = ∏ pvₚ(n). Then vₚ(ab) = vₚ(a) + vₚ(b), and a | b if and only if vₚ(a) ≤ vₚ(b) for all p.
Uniqueness is not automatic
The importance of Theorem 2.2 is best seen where it fails. In the ring ℤ[√−5] = {a + b√−5 : a, b ∈ ℤ}, with norm N(a + b√−5) = a² + 5b², we have
6 = 2 · 3 = (1 + √−5)(1 − √−5).
The norms of 2, 3, 1 ± √−5 are 4, 9, 6, 6. No element has norm 2 or 3 (a² + 5b² = 2 or 3 has no solutions), so all four factors are irreducible, and since the only units are ±1 the two factorisations are genuinely different. Thus 2 is irreducible but not prime in ℤ[√−5]: it divides (1 + √−5)(1 − √−5) without dividing either factor. Kummer's attempt to repair this failure in cyclotomic rings led him to ideal numbers, and Dedekind's reformulation in terms of ideals created modern algebraic number theory. In the rings of integers of number fields, ideals still factor uniquely into prime ideals; the failure of unique factorisation of elements is measured by a finite abelian group, the ideal class group.
Infinitely many primes
Theorem 2.3 (Euclid). There are infinitely many primes.
Proof. Given primes p₁, …, pₖ, the number N = p₁p₂⋯pₖ + 1 is ≥ 2, so it has a prime factor p. If p were some pᵢ it would divide N − p₁⋯pₖ = 1. So there is a prime outside every finite list. ∎
Euclid's argument gives a weak quantitative statement: if pₙ is the n-th prime then pₙ₊₁ ≤ p₁⋯pₙ + 1, whence pₙ ≤ 22n−1 by induction. Much better bounds come in Lesson 10. Two other proofs are worth knowing because they generalise. Euler's proof (1737) observes that for s > 1
∑ₙ₌₁∞ 1/nˢ = ∏ₚ (1 − p⁻ˢ)⁻¹,
an analytic restatement of unique factorisation; as s → 1⁺ the left side tends to ∞, so the product cannot be finite. Fürstenberg's proof (1955) puts a topology on ℤ whose basic open sets are the arithmetic progressions; the set ℤ ∖ {±1} is the union of the closed sets pℤ, and if there were finitely many primes it would be closed, so {±1} would be open, which it is not because non-empty open sets are infinite.
Divisor functions in terms of factorisations
If n = ∏ pᵢeᵢ then the divisors of n are exactly the numbers ∏ pᵢfᵢ with 0 ≤ fᵢ ≤ eᵢ. Hence the number of divisors τ(n) and their sum σ(n) are
τ(n) = ∏ (eᵢ + 1), σ(n) = ∏ (pᵢeᵢ+1 − 1)/(pᵢ − 1).
For example 720 = 2⁴ · 3² · 5, so τ(720) = 5 · 3 · 2 = 30 and σ(720) = 31 · 13 · 6 = 2418. These are the first examples of multiplicative functions, studied systematically in Lesson 9.
The irrationality of √2, and much more, is a direct consequence of unique factorisation: if a² = 2b² then v₂(a²) is even while v₂(2b²) is odd. The same argument shows that the n-th root of a positive integer m is rational only when m is a perfect n-th power.
Exercise
- (a)Find the prime factorisation of 10! and use it to compute τ(10!).
- (b)Prove that if p is prime and 1 ≤ k ≤ p − 1, then p divides the binomial coefficient C(p, k).
- (c)Show that 3 is irreducible but not prime in ℤ[√−5].
Show solution
Answers: (a) 10! = 3628800 = 2⁸ · 3⁴ · 5² · 7 (Legendre's formula: v₂ = 5 + 2 + 1 = 8, v₃ = 3 + 1 = 4, v₅ = 2, v₇ = 1), so τ(10!) = 9 · 5 · 3 · 2 = 270. (b) k! (p − k)! C(p, k) = p!, and p divides the right side but not k! (p − k)! (all its factors are less than p), so by Euclid's lemma p | C(p, k). (c) N(3) = 9; a factorisation 3 = αβ into non-units would need N(α) = 3, and a² + 5b² = 3 has no solutions, so 3 is irreducible. But 3 divides 6 = (1 + √−5)(1 − √−5), while (1 ± √−5)/3 is not in ℤ[√−5], so 3 is not prime.