In mathematics, the fundamental theorem of arithmetic, also called the unique factorization theorem and prime factorization theorem, states that every integer greater than 1 can be represented uniquely as a product of prime numbers, up to the order of the factors. For example,
1200=24 ⋅ 31 ⋅ 52=(2 ⋅ 2 ⋅ 2 ⋅ 2) ⋅ 3 ⋅ (5 ⋅ 5)=5 ⋅ 2 ⋅ 5 ⋅ 2 ⋅ 3 ⋅ 2 ⋅ 2=\ldots
The theorem says two things about this example: first, that 1200 be represented as a product of primes, and second, that no matter how this is done, there will always be exactly four 2s, one 3, two 5s, and no other primes in the product.
The requirement that the factors be prime is necessary: factorizations containing composite numbers may not be unique (for example,
12=2 ⋅ 6=3 ⋅ 4
This theorem is one of the main reasons why 1 is not considered a prime number: if 1 were prime, then factorization into primes would not be unique; for example,
2=2 ⋅ 1=2 ⋅ 1 ⋅ 1=\ldots
The theorem generalizes to other algebraic structures that are called unique factorization domains and include principal ideal domains, Euclidean domains, and polynomial rings over a field. However, the theorem does not hold for algebraic integers.[1] This failure of unique factorization is one of the reasons for the difficulty of the proof of Fermat's Last Theorem. The implicit use of unique factorization in rings of algebraic integers is behind the error of many of the numerous false proofs that have been written during the 358 years between Fermat's statement and Wiles's proof.
The fundamental theorem can be derived from Book VII, propositions 30, 31 and 32, and Book IX, proposition 14 of Euclid's Elements.
(In modern terminology: if a prime p divides the product ab, then p divides either a or b or both.) Proposition 30 is referred to as Euclid's lemma, and it is the key in the proof of the fundamental theorem of arithmetic.
(In modern terminology: every integer greater than one is divided evenly by some prime number.) Proposition 31 is proved directly by infinite descent.
Proposition 32 is derived from proposition 31, and proves that the decomposition is possible.
(In modern terminology: a least common multiple of several prime numbers is not a multiple of any other prime number.) Book IX, proposition 14 is derived from Book VII, proposition 30, and proves partially that the decomposition is unique – a point critically noted by André Weil.[2] Indeed, in this proposition the exponents are all equal to one, so nothing is said for the general case.
While Euclid took the first step on the way to the existence of prime factorization, Kamāl al-Dīn al-Fārisī took the final step[3] and stated for the first time the fundamental theorem of arithmetic.[4]
Article 16 of Gauss's Disquisitiones Arithmeticae is an early modern statement and proof employing modular arithmetic.
Every positive integer can be represented in exactly one way as a product of prime powers
n=
n1 | |
p | |
1 |
n2 | |
p | |
2 |
…
nk | |
p | |
k |
=
k | |
\prod | |
i=1 |
ni | |
p | |
i |
,
This representation is called the canonical representation of, or the standard form of n. For example,
999 = 33×37,
1000 = 23×53,
1001 = 7×11×13.
Factors may be inserted without changing the value of (for example,). In fact, any positive integer can be uniquely represented as an infinite product taken over all the positive prime numbers, as
n1 | |
n=2 |
n2 | |
3 |
n3 | |
5 |
n4 | |
7 |
infty | |
… =\prod | |
i=1 |
ni | |
p | |
i |
,
Allowing negative exponents provides a canonical form for positive rational numbers.
The canonical representations of the product, greatest common divisor (GCD), and least common multiple (LCM) of two numbers a and b can be expressed simply in terms of the canonical representations of a and b themselves:
\begin{alignat}{2} a ⋅ b&=
a1+b1 | |
2 |
a2+b2 | |
3 |
a3+b3 | |
5 |
a4+b4 | |
7 |
… &&=\prod
ai+bi | |
p | |
i |
,\\ \gcd(a,b)&=
min(a1,b1) | |
2 |
min(a2,b2) | |
3 |
min(a3,b3) | |
5 |
min(a4,b4) | |
7 |
… &&=\prod
min(ai,bi) | |
p | |
i |
,\\ \operatorname{lcm}(a,b)&=
max(a1,b1) | |
2 |
max(a2,b2) | |
3 |
max(a3,b3) | |
5 |
max(a4,b4) | |
7 |
… &&=\prod
max(ai,bi) | |
p | |
i |
. \end{alignat}
However, integer factorization, especially of large numbers, is much more difficult than computing products, GCDs, or LCMs. So these formulas have limited use in practice.
See main article: article and Arithmetic function.
Many arithmetic functions are defined using the canonical representation. In particular, the values of additive and multiplicative functions are determined by their values on the powers of prime numbers.
The proof uses Euclid's lemma (Elements VII, 30): If a prime divides the product of two integers, then it must divide at least one of these integers.
It must be shown that every integer greater than is either prime or a product of primes. First, is prime. Then, by strong induction, assume this is true for all numbers greater than and less than . If is prime, there is nothing more to prove. Otherwise, there are integers and, where, and . By the induction hypothesis, and are products of primes. But then is a product of primes.
Suppose, to the contrary, there is an integer that has two distinct prime factorizations. Let be the least such integer and write, where each and is prime. We see that divides, so divides some by Euclid's lemma. Without loss of generality, say divides . Since and are both prime, it follows that . Returning to our factorizations of, we may cancel these two factors to conclude that . We now have two distinct prime factorizations of some integer strictly smaller than, which contradicts the minimality of .
The fundamental theorem of arithmetic can also be proved without using Euclid's lemma. The proof that follows is inspired by Euclid's original version of the Euclidean algorithm.
Assume that
s
s
1
\begin{align} s &=p1p2 … pm\\ &=q1q2 … qn. \end{align}
Every
pi
qj.
pi=qj,
t=s/pi=s/qj
p1<q1,
Setting
P=p2 … pm
Q=q2 … qn,
s=p1P=q1Q.
p1<q1,
Q<P.
s-p1Q=(q1-p1)Q=p1(P-Q)<s.
As the positive integers less than have been supposed to have a unique prime factorization,
p1
q1-p1
p1
qj.
p1
q1-p1,
q1,
p1
q1
Therefore, there cannot exist a smallest integer with more than a single distinct prime factorization. Every positive integer must either be a prime number itself, which would factor uniquely, or a composite that also factors uniquely into primes, or in the case of the integer
1
The first generalization of the theorem is found in Gauss's second monograph (1832) on biquadratic reciprocity. This paper introduced what is now called the ring of Gaussian integers, the set of all complex numbers a + bi where a and b are integers. It is now denoted by
Z[i].
Similarly, in 1844 while working on cubic reciprocity, Eisenstein introduced the ring
Z[\omega]
\omega3=1
\pm1,\pm\omega,\pm\omega2
However, it was also discovered that unique factorization does not always hold. An example is given by
Z[\sqrt{-5}]
6= 2 ⋅ 3= \left(1+\sqrt{-5}\right)\left(1-\sqrt{-5}\right).
Examples like this caused the notion of "prime" to be modified. In
Z\left[\sqrt{-5}\right]
Z\left[\sqrt{-5}\right]
Z\left[\sqrt{-5}\right]
Z\left[\sqrt{-5}\right]
Z.
Z
Z[i]
Z[\omega],
Z[\sqrt{-5}].
The rings in which factorization into irreducibles is essentially unique are called unique factorization domains. Important examples are polynomial rings over the integers or over a field, Euclidean domains and principal ideal domains.
In 1843 Kummer introduced the concept of ideal number, which was developed further by Dedekind (1876) into the modern theory of ideals, special subsets of rings. Multiplication is defined for ideals, and the rings in which they have unique factorization are called Dedekind domains.
There is a version of unique factorization for ordinals, though it requires some additional conditions to ensure uniqueness.
Any commutative Möbius monoid satisfies a unique factorization theorem and thus possesses arithmetical properties similar to those of the multiplicative semigroup of positive integers. Fundamental Theorem of Arithmetic is, in fact, a special case of the unique factorization theorem in commutative Möbius monoids.
The Disquisitiones Arithmeticae has been translated from Latin into English and German. The German edition includes all of his papers on number theory: all the proofs of quadratic reciprocity, the determination of the sign of the Gauss sum, the investigations into biquadratic reciprocity, and unpublished notes.
The two monographs Gauss published on biquadratic reciprocity have consecutively numbered sections: the first contains §§ 1–23 and the second §§ 24–76. Footnotes referencing these are of the form "Gauss, BQ, § n". Footnotes referencing the Disquisitiones Arithmeticae are of the form "Gauss, DA, Art. n".
These are in Gauss's Werke, Vol II, pp. 65–92 and 93–148; German translations are pp. 511–533 and 534–586 of the German edition of the Disquisitiones.
"Even in Euclid, we fail to find a general statement about the uniqueness of the factorization of an integer into primes; surely he may have been aware of it, but all he has is a statement (Eucl.IX.I4) about the l.c.m. of any number of given primes."