Unique factorization
In mathematics, the unique factorization theorem, also known as the fundamental theorem of arithmetic states that every positive whole number can be expressed as a product of prime numbers in essentially only one way. It reveals that one may consider the prime numbers as "atoms" from which all other whole numbers can be assembled through multiplication. Unique factorization is the foundation for most of the structure of whole numbers as described by elementary number theory. The formulation of many results would either be nonsensical, or at least more complicated, if unique factorization did not hold. For instance, the assumption that many electronic financial transactions are secure is based on the belief that the product of two very large prime numbers is difficult to factor. If several other prime factorizations were possible, perhaps some having small prime factors, finding a factorization might be much easier and such security methods would be ineffective.
Proof
Every integer can be written in a unique way as a product of prime factors, up to reordering. To see why this is true, assume that can be written as a product of prime factors in two ways
We may now use a technique known as mathematical induction to show that the two prime decompositions are really the same.
Consider the prime factor . We know that
Using the second definition of prime numbers, it follows that divides one of the q-factors, say . Using the first definition, is in fact equal to
Now, if we set , we may write
and
In other words, is the product of all the 's except .
Continuing in this way, we obtain a sequence of numbers where each is obtained by dividing by a prime factor. In particular, we see that and that there is some permutation ("rearrangement") σ of the indices such that . Said differently, the two factorizations of N must be the same up to a possible rearrangement of terms.