Inmathematics, thefundamental theorem of arithmetic, also called theunique factorization theorem andprime factorization theorem, states that everyinteger greater than 1 is either prime or can be represented uniquely as a product ofprime numbers,up to the order of the factors.[3][4][5] For example,
The theorem says two things about this example: first, that 1200can 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 containingcomposite numbers may not be unique (for example,).
Using the standard conventions for theproduct of a sequence (the value of theempty product is1 and the product of a single factor is the factor itself), the theorem is often stated as:every positive integer can be represented uniquely as a product of prime numbers, up to the order of the factors.
(In modern terminology: if a primep divides the productab, thenp divides eithera orb or both.) Proposition 30 is referred to asEuclid's lemma, and it is the key in the proof of the fundamental theorem of arithmetic.
Any composite number is measured by some prime number.
(In modern terminology: aleast 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 byAndré Weil.[b] Indeed, in this proposition the exponents are all equal to one, so nothing is said for the general case.
WhileEuclid 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[c] and stated for the first time the fundamental theorem of arithmetic.[d]
Every positive integern > 1 can be represented in exactly one way as a product of prime powers
wherep1 <p2 < ... <pk are primes and theni are positive integers. This representation is commonly extended to all positive integers, including 1, by the convention that theempty product is equal to 1 (the empty product corresponds tok = 0).
This representation is called thecanonical representation[6] ofn, or thestandard form[7][8] ofn. For example,
999 = 33×37,
1000 = 23×53,
1001 = 7×11×13.
Factorsp0 = 1 may be inserted without changing the value ofn (for example,1000 = 23×30×53). In fact, any positive integer can be uniquely represented as aninfinite product taken over all the positive prime numbers, as
where a finite number of theni are positive integers, and the others are zero.
Allowing negative exponents provides a canonical form for positiverational numbers.
The canonical representations of the product,greatest common divisor (GCD), andleast common multiple (LCM) of two numbersa andb can be expressed simply in terms of the canonical representations ofa andb themselves:
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.
Many arithmetic functions are defined using the canonical representation. In particular, the values ofadditive andmultiplicative functions are determined by their values on the powers of prime numbers.
The proof of uniqueness usesEuclid's lemma (Elements VII, 30): If a primedivides the product of two integers, then it must divide at least one of these integers.
It must be shown that every integer greater than1 is either prime or a product of primes. Letn be an integer greater than1 and make theinductive assumption that every integer greater than1 and less thann is either prime or a product of primes. Ifn is prime, there is nothing more to prove. Otherwise, there are integersa andb, wheren =a b, and1 <a ≤b <n. By the inductive hypothesis,a =p1p2 ⋅⋅⋅pj andb =q1q2 ⋅⋅⋅qk are products of primes. But thenn =a b =p1p2 ⋅⋅⋅pjq1q2 ⋅⋅⋅qk is a product of primes.
Suppose, to the contrary, there is an integer that has two distinct prime factorizations. Letn be the least such integer and writen =p1p2 ...pj =q1q2 ...qk, where eachpi andqi is prime. We see thatp1 dividesq1q2 ...qk, sop1 divides someqi byEuclid's lemma. Without loss of generality, sayp1 dividesq1. Sincep1 andq1 are both prime, it follows thatp1 =q1. Returning to our factorizations ofn, we may cancel these two factors to conclude thatp2 ...pj =q2 ...qk. We now have two distinct prime factorizations of some integer strictly smaller thann, which contradicts the minimality ofn.
The fundamental theorem of arithmetic can also be proved without using Euclid's lemma.[9] The proof that follows is inspired by Euclid's original version of theEuclidean algorithm.
Assume that is the smallest positive integer which is the product of prime numbers in two different ways. Incidentally, this implies that, if it exists, must be acomposite number greater than. Now, say
Every must be distinct from every Otherwise, if say then there would exist some positive integer that is smaller thans and has two distinct prime factorizations. One may also suppose that by exchanging the two factorizations, if needed.
Setting and one hasAlso, since one hasIt then follows that
As the positive integers less thans have been supposed to have a unique prime factorization, must occur in the factorization of either orQ. The latter case is impossible, asQ, being smaller thans, must have a unique prime factorization, and differs from every The former case is also impossible, as, if is a divisor of it must be also a divisor of which is impossible as and are distinct primes.
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, not factor into any prime.
The first generalization of the theorem is found in Gauss's second monograph (1832) onbiquadratic reciprocity. This paper introduced what is now called thering ofGaussian integers, the set of allcomplex numbersa +bi wherea andb are integers. It is now denoted by He showed that this ring has the four units ±1 and ±i, that the non-zero, non-unit numbers fall into two classes, primes and composites, and that (except for order), the composites have unique factorization as a product of primes (up to the order and multiplication by units).[10]
However, it was also discovered that unique factorization does not always hold. An example is given by. In this ring one has[11]
Examples like this caused the notion of "prime" to be modified. In it can be proven that if any of the factors above can be represented as a product, for example, 2 =ab, then one ofa orb must be a unit. This is the traditional definition of "prime". It can also be proven that none of these factors obeys Euclid's lemma; for example, 2 divides neither (1 +) nor (1 -) even though it divides their product 6. Inalgebraic number theory 2 is calledirreducible in (only divisible by itself or a unit) but notprime in (if it divides a product it must divide one of the factors). The mention of is required because 2 is prime and irreducible in Using these definitions it can be proven that in anyintegral domain a prime must be irreducible. Euclid's classical lemma can be rephrased as "in the ring of integers every irreducible is prime". This is also true in and but not in
In 1843Kummer introduced the concept ofideal number, which was developed further byDedekind (1876) into the modern theory ofideals, special subsets of rings. Multiplication is defined for ideals, and the rings in which they have unique factorization are calledDedekind domains.
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.
^In aring of algebraic integers, the factorization into prime elements may be non unique, but one can recover a unique factorization if one factors intoideals.
^Weil (2007, p. 5): "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."
^A. Goksel Agargun and E. Mehmet Özkan."A Historical Survey of the Fundamental Theorem of Arithmetic"(PDF).Historia Mathematica: 209.One could say that Euclid takes the first step on the way to the existence of prime factorization, and al-Farisi takes the final step by actually proving the existence of a finite prime factorization in his first proposition.
^Rashed, Roshdi (2002-09-11).Encyclopedia of the History of Arabic Science. Routledge. p. 385.ISBN9781134977246.The famous physicist and mathematician Kamal al-Din al-Farisi compiled a paper in which he set out deliberately to prove the theorem of Ibn Qurra in an algebraic way. This forced him to an understanding of the first arithmetical functions and to a full preparation which led him to state for the first time the fundamental theorem of arithmetic.
TheDisquisitiones 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.
Gauss, Carl Friedrich (1965),Untersuchungen über hohere Arithmetik (Disquisitiones Arithemeticae & other papers on number theory) (Second edition) (in German), translated by Maser, H., New York: Chelsea,ISBN0-8284-0191-8
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 theDisquisitiones Arithmeticae are of the form "Gauss, DA, Art.n".
Gauss, Carl Friedrich (1828),Theoria residuorum biquadraticorum, Commentatio prima, Göttingen: Comment. Soc. regiae sci, Göttingen 6
Gauss, Carl Friedrich (1832),Theoria residuorum biquadraticorum, Commentatio secunda, Göttingen: Comment. Soc. regiae sci, Göttingen 7
These are in Gauss'sWerke, Vol II, pp. 65–92 and 93–148; German translations are pp. 511–533 and 534–586 of the German edition of theDisquisitiones.