[todo: make Number Theory a parent of this]
[summary: The Fundamental Theorem of Arithmetic is a statement about the natural numbers; it says that every natural number may be decomposed as a product of primes, and this expression is unique up to reordering the factors. It is an extremely important theorem, and it is the basis of the field of [-number_theory].]
The Fundamental Theorem of Arithmetic states that every Natural number (greater than or equal to 2) may be expressed as a product of prime numbers, and the product is unique up to reordering.
This theorem is one of the main reasons 1 is not considered to be prime: indeed, if it were prime then 3×5 could be factorised into primes as 3×5×1, but these would be two different factorisations of the number 15. The FTA's statement is much cleaner if 1 is not thought of as prime.
In a more general context, the FTA says precisely that the ring Z is a Unique factorisation domain; there is therefore a much more abstract proof than the elementary one we will present further on in this article:
- Z is a [euclidean_domain Euclidean domain] (with Euclidean function given by "take the modulus");
- Therefore Z is a Principal ideal domain (proof);
- And principal ideal domains are unique factorisation domains ([principal_ideal_domain_has_unique_factorisation proof]).
Examples
- The FTA does not talk about 0 or 1; this is because these numbers are conventionally considered neither prime nor composite.
- Even if we haven't bothered to calculate 17×23×23, we can immediately say that it is odd. Indeed, by the FTA, 2 cannot divide 17×232, because the complete list of prime factors of this number is {17,23,23}, and 2 is prime.
Proof
Timothy Gowers has an excellent article about the proof of the FTA.
The FTA consists of two parts: we must show that every number can be decomposed as primes, and also that every number can be decomposed uniquely.
Every number can be written as a product of primes
This part is the easier, and it uses [-strong_induction] (a version of proof by induction).
Clearly 2 can be written as a product of primes, because it is prime; so it can be written as just itself.
Now, for n bigger than 2, if n is prime then we are immediately done (just write it as itself). Otherwise, n is not prime, so it can be written as a×b, say, with a and b both less than n.
But by the inductive hypothesis, we can express a and b each as products of primes, so we can express n as the combined product of the two sets of factors of a and b.
%%hidden(Example): Consider n=1274. We have two options: n is prime or n is composite.
It turns out that n is actually equal to 49×26, so it's not prime.
By the inductive hypothesis, we can factor 49 as a product of primes (indeed, it's 72); and we can factor 26 as a product of primes (indeed, it's 2×13); so we can factor 1274 as 2×72×13.
(If you like, you can view this as just "start again at 49 instead of at 1274, and spit out what you get; then start again at 26 instead of 1274, and spit out what you get; and finally combine the spittings-out"; no mention of a spooky "inductive hypothesis" at all.)
Note that at this point, we haven't any guarantee at all that this is the only prime factorisation; all we assert so far is that it is a prime factorisation. %%
Every number can be decomposed uniquely as a product of primes
For this, we will need a basic (but non-obvious and important) fact about the behaviour of prime numbers: Euclid's lemma, which states that if a prime p divides a product ab, then p divides at least one of a and b.
We will work by induction on n again. If n=2 then the result is immediate: a number can only be divided by numbers which are not larger than it, but 1 and 2 are the only such numbers.
Suppose n can be written as both p1p2…pr and q1q2…qs, where each pi and qj is prime (but there might be repeats: maybe p1=p2=q3=q7, for instance). We need to show that r=s and that (possibly after reordering the lists) pi=qi for each i.
Certainly p1 divides n, because it divides p1p2…pr. Therefore it divides q1q2…qs, and hence it divides one of q1 or q2…qs, by Euclid's lemma. Therefore either it divides q1, or it divides one of q2 or q3…qs; by induction, p1 divides some qi. Because we don't care about the ordering of the list, let us reorder the list if necessary so that in fact i=1: put the factor qi at the start of the list.
Now, q1 is prime, and p1 is not equal to 1 but it divides q1; hence p1=q1.
Dividing through by p1, then, we obtain p2…pr=q2…qs, a strictly smaller number; so by the inductive hypothesis, r−1=s−1 (so r=s) and the unordered list of pi is the same as the unordered list of qi for i≥2.
This proves the theorem.
Why is this not obvious?
Timothy Gowers has a good piece on why this result is not just obvious. Of course, what is "obvious" and what is not "obvious" varies heavily depending on who you're talking to. For this author personally, the true reason it's not obvious is Gowers's reason number 4: because there are very similar structures which do not have the property of unique factorisation. (Gowers uses Z[√−5]; on the page on irreducibles, we show that Z[√−3] could be used just as well.)