In mathematics, the fundamental theorem of arithmetic, also called the unique factorization theorem and prime factorization theorem, states that every integer greater than 1 is either prime or 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=… The theorem says two things about this example: first, that 1200 can 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). Using the standard conventions for the product of a sequence (the value of the empty product is 1 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. 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=… 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. 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.
History The fundamental theorem can be derived from Book VII, propositions 30, 31 and 32, and Book IX, proposition 14 of Euclid's Elements.
If two numbers by multiplying one another make some number, and any prime number measure the product, it will also measure one of the original numbers. (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.
Any composite number is measured by some prime number. (In modern terminology: every integer greater than one is divided evenly by some prime number.) Proposition 31 is proved directly by infinite descent.
Any number either is prime or is measured by some prime number. Proposition 32 is derived from proposition 31, and proves that the decomposition is possible.
If a number be the least that is measured by prime numbers, it will not be measured by any other prime number except those originally measuring it. (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. 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 and stated for the first time the fundamental theorem of arithmetic. Article 16 of Gauss's Disquisitiones Arithmeticae seems to be the first proof of the uniqueness part of the theorem.
Applications
Canonical representation of a positive integer Every positive integer n > 1 can be represented in exactly one way as a product of prime powers
n=p1n1p2n2⋯pknk=∏i=1kpini, where p1 < p2 < ... < pk are primes and the ni are positive integers. This representation is commonly extended to all positive integers, including 1, by the convention that the empty product is equal to 1 (the empty product corresponds to k = 0). This representation is called the canonical representation of n, or the standard form of n. For example,
999 = 33×37, 1000 = 23×53, 1001 = 7×11×13. Factors p0 = 1 may be inserted without changing the value of n (for example, 1000 = 23×30×53). In fact, any positive integer can be uniquely represented as an infinite product taken over all the positive prime numbers, as
n=2n13n25n37n4⋯=∏i=1∞pini, where a finite number of the ni are positive integers, and the others are zero. Allowing negative exponents provides a canonical form for positive rational numbers.
Arithmetic operations 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:
a⋅b=2a1+b13a2+b25a3+b37a4+b4⋯=∏piai+bi,gcd(a,b)=2min(a1,b1)3min(a2,b2)5min(a3,b3)7min(a4,b4)⋯=∏pimin(ai,bi),lcm(a,b)=2max(a1,b1)3max(a2,b2)5max(a3,b3)7max(a4,b4)⋯=∏pimax(ai,bi). 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.
Arithmetic functions
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.
Proof The proof of uniqueness 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.
Existence It must be shown that every integer greater than 1 is either prime or a product of primes. Let n be an integer greater than 1 and make the inductive assumption that every integer greater than 1 and less than n is either prime or a product of primes. If n is prime, there is nothing more to prove. Otherwise, there are integers a and b, where n = a b, and 1 < a ≤ b < n. By the inductive hypothesis, a = p1 p2 ⋅⋅⋅ pj and b = q1 q2 ⋅⋅⋅ qk are products of primes. But then n = a b = p1 p2 ⋅⋅⋅ pj q1 q2 ⋅⋅⋅ qk is a product of primes.
… excerpt ends here. Continue reading the full article.

![Fundamental theorem of arithmetic: In Disquisitiones Arithmeticae (1801) Gauss proved the unique factorization theorem[1] and used it to prove the law of quadratic reciprocity.[2]](https://thumb.wikimedia.org/wikipedia/commons/thumb/e/e3/Disqvisitiones-800.jpg/330px-Disqvisitiones-800.jpg?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)