ARITHMETIC AND NUMBER THEORY

Fundamental Theorem of Arithmetic

Every whole number greater than 1 can be built from primes in one essential way. This theorem explains why prime factorization is a reliable foundation for divisibility, fractions, and many ideas in number theory.

THE THEOREM

A unique prime factorization exists

Every integer n greater than 1 is prime or can be expressed as a product of primes. That product is unique apart from the order of its factors.

n=p1a1p2a2⋯pkak,p1<p2<⋯<pk,ai∈Z>0n=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k},\quad p_1<p_2<\cdots<p_k,\quad a_i\in\mathbb{Z}_{>0}

In plain language: splitting a number in different ways may create different factor trees, but finishing each tree always gives the same prime factors with the same multiplicities.

What the statement means

A prime number is an integer greater than 1 whose only positive divisors are 1 and itself. Examples include 2, 3, 5, 7, and 11. A prime factorization writes a number as a product using only primes. For example, 12 = 2 × 2 × 3 = 2² × 3.

The theorem has two parts. Existence says that every integer above 1 has a prime factorization. Uniqueness says that no different collection of primes can produce the same integer, except by rearranging the factors.

Why “up to order”?Multiplication can be rearranged: 2 × 3 × 5 and 5 × 2 × 3 are the same factorization. What must stay fixed is how many times each prime occurs.

Worked example: prime-factorize 360

We can begin with different factor pairs. Continue splitting each composite factor until every leaf is prime.

One route: 36 × 10

Factor tree for 360 using 36 times 10360 branches to 36 and 10. The 36 branches to 6 and 6, each 6 to 2 and 3. The 10 branches to 2 and 5. Prime leaves are three twos, two threes, and a five.36036106625232325

Prime leaves: 2, 2, 2, 3, 3, 5

Another route: 8 × 45

Factor tree for 360 using 8 times 45360 branches to 8 and 45. The 8 branches to 2 and 4, and 4 to two twos. The 45 branches to 5 and 9, and 9 to two threes. The same six prime leaves appear.36084524592233

Prime leaves: 2, 2, 2, 3, 3, 5

Both routes end with three 2s, two 3s, and one 5. Group equal primes using exponents:

360=2⋅2⋅2⋅3⋅3⋅5=23⋅32⋅5360=2\cdot2\cdot2\cdot3\cdot3\cdot5=2^3\cdot3^2\cdot5

Checking by multiplication confirms the result: 2³ = 8, 3² = 9, and 8 × 9 × 5 = 360.

Why is the factorization unique?

The key ingredient is Euclid’s lemma: if a prime p divides a product ab, then p divides at least one of a or b. Primes cannot be hidden inside a product without dividing one of its factors.

  1. 1
    Suppose there are two prime factorizations.

    Write the same integer as a product of primes in two ways.

    n=p1p2⋯pr=q1q2⋯qsn=p_1p_2\cdots p_r=q_1q_2\cdots q_s
  2. 2
    Match a prime from the first product.

    Because p₁ divides n, it divides the product q₁q₂⋯qₛ. Euclid’s lemma says p₁ must divide some qⱼ. Since both are prime, p₁ = qⱼ.

  3. 3
    Cancel the matching prime and repeat.

    After reordering, cancel the common prime from both sides. Repeating this argument matches every prime and its multiplicity, so the factorizations differ only in order.

This gives the central idea behind uniqueness. A formal proof also handles the possibility that one list ends before the other: after cancellation, a remaining product of primes cannot equal 1.

How prime factorization is used

Greatest common divisor

Use only the primes shared by both numbers, taking the smaller exponent.

360=23⋅32⋅5,84=22⋅3⋅7gcd⁡(360,84)=22⋅3=12360=2^3\cdot3^2\cdot5,\quad84=2^2\cdot3\cdot7\\\gcd(360,84)=2^2\cdot3=12

Least common multiple

Include every prime that appears, taking the larger exponent.

lcm⁡(360,84)=23⋅32⋅5⋅7=2520\operatorname{lcm}(360,84)=2^3\cdot3^2\cdot5\cdot7=2520

Simplifying fractions

Cancel common prime factors in the numerator and denominator.

84360=22⋅3⋅723⋅32⋅5=730\frac{84}{360}=\frac{2^2\cdot3\cdot7}{2^3\cdot3^2\cdot5}=\frac{7}{30}

Counting positive divisors

If n = p₁ᵃ¹⋯pₖᵃᵏ, each divisor chooses an exponent from 0 through aᵢ.

360=23⋅32⋅51⟹(3+1)(2+1)(1+1)=24360=2^3\cdot3^2\cdot5^1\quad\Longrightarrow\quad(3+1)(2+1)(1+1)=24

Which numbers does it cover?

The theorem applies to positive integers greater than 1. The number 1 is excluded because it is not prime and its factorization as an empty product is treated separately in advanced mathematics. Zero and negative integers are also outside the statement as written; negative integers can be handled by adding a factor of −1.

Prime13 is already prime, so its prime factorization is 13.
Composite18 = 2 × 3², with repeated primes grouped by powers.
One1 is not prime and is not included in the theorem’s domain.

Why a prime factorization always exists

Start with any integer n greater than 1. If n is prime, it already is a product of primes: the product contains just one factor, n. If n is composite, by definition it can be written as n = ab, where a and b are integers strictly between 1 and n. If either factor is composite, split that factor again.

This splitting cannot continue forever. Each new factor is a smaller positive integer than the composite number it replaces. There is no infinite descending chain of positive integers. Eventually every branch ends at a prime, and multiplying those prime leaves gives the original n. This is the existence part of the theorem.

Start with n > 1
Is n prime?
Yesn is already primeIts prime factorization is n.
NoWrite n = a × bBoth factors are smaller than n. Split any composite factor again.
Stop when every factor is prime → multiply the prime leaves

Why the process terminates

A factor tree does not need to have a fixed shape. You can choose different factor pairs at each split. But every split replaces a composite integer by smaller integers greater than 1, so the numbers strictly decrease along each branch. Since positive integers cannot decrease indefinitely, each branch must stop. The only possible stopping values greater than 1 are primes.

This reasoning is an informal form of the well-ordering principle: every nonempty set of positive integers has a least element. A formal proof can also use strong induction. Assume every integer from 2 up to n−1 has a prime factorization. If n is prime, the claim is immediate; if n = ab is composite, both a and b are smaller than n, so the induction assumption factors each into primes. Joining those two lists gives a prime factorization of n.

Why the prime factorization is unique

Existence alone would not guarantee a dependable representation. The second question is whether two different collections of primes could multiply to the same integer. Euclid’s lemma rules this out: when a prime divides a product, it must divide at least one factor. Since a prime has no nontrivial factors, if one prime divides another prime, they must be the same prime.

Suppose an integer has two prime factorizations. Take the first prime in one factorization. It divides the entire product on the other side, so Euclid’s lemma says that it must divide one of the primes there. Those primes are equal. Cancel that matching prime from each side and repeat. Every prime is matched with the same prime on the other side, including repeated copies. Therefore only the order can differ.

First factorization2 · 2 · 2 · 3 · 3 · 5
=
Second factorization, reordered3 · 2 · 5 · 2 · 3 · 2

Match and cancel equal prime factors → no unmatched prime remains.

For the 360 example, one route might list the factors as 2 × 3 × 2 × 3 × 2 × 5 and another as 2 × 2 × 2 × 5 × 3 × 3. Sorting and grouping either list gives 2³ × 3² × 5. The prime exponents are the canonical fingerprint of the integer.

A short history: who discovered it?

There is no single person known to have “invented” the Fundamental Theorem of Arithmetic. Prime numbers and factorization were studied in ancient Greek mathematics. Euclid’s Elements, Book VII, develops definitions and results about divisibility, primes, and relatively prime numbers; its Proposition 30 contains the key prime-divides-a-product result now commonly called Euclid’s lemma. Euclid also uses related number-theoretic results in later books.

The theorem is now taught as a compact statement combining two ideas: every integer above 1 can be broken down into primes, and the prime factors are determined uniquely. Modern proofs make the logical structure explicit, often using induction for existence and Euclid’s lemma for uniqueness. So it is more accurate to describe the theorem as a result developed through the history of number theory than to assign it to one modern “inventor.”

Common misunderstandings

  • Including 1 as a prime: 1 has only one positive divisor and is not prime. Excluding it is essential to keeping prime factorization unique.
  • Stopping at a composite factor: 360 = 4 × 90 is a factorization, but not a prime factorization because both 4 and 90 can be split further.
  • Forgetting multiplicity: 72 is not just 2 × 3. It is 2³ × 3²; each repeated prime must be counted.
  • Confusing order with uniqueness: rearranging factors does not create a new factorization. Compare the prime counts, not the sequence order.
  • Applying the statement to every integer: its basic form is for positive integers greater than 1. Zero, negative integers, and 1 need separate conventions or are excluded.

Frequently asked questions

Who invented the Fundamental Theorem of Arithmetic?

It does not have a single known inventor. Ancient Greek mathematics, especially Euclid’s work, established important results about primes and divisibility. The theorem’s modern role grew through the development of number theory.

Does “unique” mean the factors must appear in one order?

No. Prime factors may be rearranged. Uniqueness means the same primes occur with the same multiplicities. For example, 2 × 3 × 5 and 5 × 2 × 3 represent the same factorization.

Can a prime factor appear more than once?

Yes. Repetition is recorded with an exponent. For instance, 72 = 2 × 2 × 2 × 3 × 3 = 2³ × 3².

Why can’t 1 be included as a prime?

If 1 were considered prime, multiplying by any number of 1s would create endlessly many different-looking factorizations. Defining primes as integers greater than 1 preserves uniqueness.

This explanation is independently written. For another introductory presentation, see Math Is Fun’s Fundamental Theorem of Arithmetic guide.