Skip to main content

The Fundamental Theorem of Arithmetic

Pick any whole number bigger than 1 — say 360 360 — and start breaking it into factors. No matter which path you take (360=4×90 360 = 4 \times 90 or 360=8×45 360 = 8 \times 45 or 360=6×60 360 = 6 \times 60), if you keep going until you can't split anything further, you always land on the exact same collection of prime building blocks: 23×32×5 2^3 \times 3^2 \times 5. This is not a coincidence about 360 360. It is a law that governs every integer greater than 1, and it is so central to how numbers work that we call it the Fundamental Theorem of Arithmetic.

The theorem says two things at once, and both matter. First, existence: every integer greater than 1 can be written as a product of primes. Second, uniqueness: there is essentially only one way to do it. Primes are the atoms of arithmetic, and this theorem is the guarantee that the periodic table of numbers has no duplicates.

Learning Objectives

  • State the Fundamental Theorem of Arithmetic precisely, including what "unique" means (up to order of factors).
  • Find the prime factorization of any integer using factor trees and trial division.
  • Use prime factorizations to compute GCD and LCM quickly and reliably.
  • Count the divisors of a number directly from its prime factorization.
  • Explain why uniqueness holds, and why the number 1 is deliberately excluded from the primes.
  • Recognize where unique factorization underpins real mathematics, from fractions to cryptography.

Quick Answer

The Fundamental Theorem of Arithmetic states that every integer n>1 n > 1 can be written as a product of prime numbers, and that this factorization is unique except for the order in which you write the factors. For example, 84=22×3×7 84 = 2^2 \times 3 \times 7, and no other set of primes multiplies to 84 84. Existence is easy to see — keep splitting composite factors until only primes remain. Uniqueness is the deep part, and it depends on Euclid's lemma: if a prime divides a product ab ab, it must divide a a or b b. The number 1 is excluded from the primes precisely so that this uniqueness statement stays true.

Where It Came From

The story begins with Euclid of Alexandria, around 300 BCE. In Book VII and Book IX of the Elements, Euclid proved the two pieces that the modern theorem rests on. Proposition VII.30 is what we now call Euclid's lemma: if a prime measures (divides) the product of two numbers, it measures at least one of them. Proposition IX.14 is close to a uniqueness statement for the special case of a number that is a product of distinct primes. Euclid also proved that there are infinitely many primes. So the ingredients were all there — but Euclid never stated the general theorem as a single, clean claim about every integer.

Why the gap? The Greeks worked with a geometric, ratio-based notion of number and did not have modern algebraic notation or the concept of treating "the factorization" as a single object to reason about. The full statement waited more than two thousand years. It was Carl Friedrich Gauss who finally gave it its definitive modern form in his landmark 1801 book Disquisitiones Arithmeticae (Article 16). Gauss stated clearly that a composite number can be resolved into prime factors in only one way, and he understood why this needed proving rather than merely asserting.

The deeper motivation for making uniqueness explicit became urgent in the 19th century. Mathematicians like Ernst Kummer and Richard Dedekind discovered that in more exotic number systems (rings of algebraic integers), unique factorization can fail — a number can factor into "primes" in genuinely different ways. Once you have seen factorization break down elsewhere, you appreciate that its holding for ordinary integers is a real, provable fact, not something automatic. That realization drove much of modern algebra and led to Dedekind's theory of ideals.

The Existence Half: Every Number Breaks Into Primes

The first claim is that any integer n>1 n > 1 is a product of primes. This is the easy half, and the reasoning is a clean example of proof by "keep going until you can't."

Take n n. Either it is prime (in which case it is its own prime factorization, a product of one prime), or it is composite. If composite, by definition it splits as n=a×b n = a \times b with 1<a<n 1 < a < n and 1<b<n 1 < b < n. Now repeat the question on a a and on b b. Each factor is smaller than n n, so this splitting cannot continue forever — the factors keep shrinking but must stay above 1. Eventually every factor is prime.

Worked example — factor tree for 360 360:

360=2×180=2×2×90=2×2×2×45=2×2×2×3×15=2×2×2×3×3×5 360 = 2 \times 180 = 2 \times 2 \times 90 = 2 \times 2 \times 2 \times 45 = 2 \times 2 \times 2 \times 3 \times 15 = 2 \times 2 \times 2 \times 3 \times 3 \times 5

Collecting like factors:

360=23×32×5 360 = 2^3 \times 3^2 \times 5

Notice the check: 23=8 2^3 = 8, 32=9 3^2 = 9, and 8×9×5=72×5=360 8 \times 9 \times 5 = 72 \times 5 = 360. Correct.

The Uniqueness Half: There's Only One Way

The harder — and more important — claim is that the prime factorization is unique. If you and I both factor 360 360 completely into primes, we must get the same primes with the same exponents, no matter what order we split things.

The engine behind uniqueness is Euclid's lemma:

If a prime p divides a×b, then p divides a or p divides b. \text{If a prime } p \text{ divides } a \times b, \text{ then } p \text{ divides } a \text{ or } p \text{ divides } b.

Why does this force uniqueness? Suppose some number had two different prime factorizations. Take a prime p p appearing in the first list. Since p p divides the whole number, it divides the product forming the second list. By Euclid's lemma (applied repeatedly), p p must divide one of the primes in the second list — but a prime is only divisible by 1 and itself, so p p must actually equal one of them. Cancel that matched pair from both sides and repeat. Every prime in one list gets matched to an identical prime in the other. The two "different" factorizations were the same all along.

Worked example — why the primality of the divisor matters:

Compare a prime and a composite as divisors. The prime 3 3 divides 8×6=48 8 \times 6 = 48. Euclid's lemma promises 3 3 divides 8 8 or 3 3 divides 6 6 — and indeed 36 3 \mid 6. But the composite 4 4 divides 6×6=36 6 \times 6 = 36, yet 4 4 divides neither 6 6 nor 6 6. This is exactly why the lemma is stated for primes only, and why primes are the right atoms: only primes have this "if I divide a product, I divide a factor" superpower.

Reading a Number Through Its Prime Factorization

Once you have n=p1a1×p2a2××pkak n = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}, a surprising amount of information falls out mechanically.

Counting divisors. Every divisor of n n is built by choosing, for each prime pi p_i, an exponent between 0 0 and ai a_i. That gives (a1+1)(a2+1)(ak+1) (a_1 + 1)(a_2 + 1)\cdots(a_k + 1) divisors.

For 360=23×32×51 360 = 2^3 \times 3^2 \times 5^1:

(3+1)(2+1)(1+1)=4×3×2=24 divisors. (3+1)(2+1)(1+1) = 4 \times 3 \times 2 = 24 \text{ divisors.}

GCD and LCM. Line up the prime factorizations of two numbers. For the greatest common divisor, take the minimum exponent of each shared prime; for the least common multiple, take the maximum exponent of every prime that appears.

Worked example — GCD and LCM of 360 360 and 84 84:

360=23×32×51,84=22×31×71 360 = 2^3 \times 3^2 \times 5^1, \qquad 84 = 2^2 \times 3^1 \times 7^1

gcd=2min(3,2)×3min(2,1)×5min(1,0)×7min(0,1)=22×31=12 \gcd = 2^{\min(3,2)} \times 3^{\min(2,1)} \times 5^{\min(1,0)} \times 7^{\min(0,1)} = 2^2 \times 3^1 = 12

lcm=2max(3,2)×3max(2,1)×5max(1,0)×7max(0,1)=23×32×5×7=2520 \operatorname{lcm} = 2^{\max(3,2)} \times 3^{\max(2,1)} \times 5^{\max(1,0)} \times 7^{\max(0,1)} = 2^3 \times 3^2 \times 5 \times 7 = 2520

Check with the identity gcd(a,b)×lcm(a,b)=a×b \gcd(a,b) \times \operatorname{lcm}(a,b) = a \times b: we get 12×2520=30240 12 \times 2520 = 30240 and 360×84=30240 360 \times 84 = 30240. They match.

Real-World Applications

  • Cryptography (RSA). The security of RSA public-key encryption rests on the fact that while multiplying two large primes is fast, reversing it — finding the prime factorization of the product — is extraordinarily slow for numbers hundreds of digits long. Unique factorization guarantees there is exactly one answer to find; the difficulty is finding it.
  • Simplifying and comparing fractions. Reducing 84360 \frac{84}{360} to lowest terms is just dividing out the GCD: 84360=730 \frac{84}{360} = \frac{7}{30}. Finding a common denominator to add fractions is finding an LCM.
  • Scheduling and cycles. When two repeating events (traffic lights, gears, planetary alignments) sync up depends on the LCM of their periods, which prime factorization computes directly.
  • Error-correcting codes and hashing use modular arithmetic whose structure is governed by the prime factorization of the modulus.
  • Digital signal processing. The Fast Fourier Transform is fastest when the data length factors into small primes, which is why sample sizes are chosen as powers of 2.

Common Mistakes

  1. Treating 1 as a prime. Misconception: since 1's only divisors are 1 and itself, it looks prime. Why it's wrong: if 1 were prime, factorizations would stop being unique — 6=2×3=1×2×3=1×1×2×3 6 = 2 \times 3 = 1 \times 2 \times 3 = 1 \times 1 \times 2 \times 3, and so on forever. Correction: 1 is defined as a unit, not a prime, specifically to keep the theorem's uniqueness intact.

  2. Stopping before factors are fully prime. Misconception: writing 360=8×45 360 = 8 \times 45 and calling it "factored." Why it's wrong: 8 8 and 45 45 are composite, so this is not the prime factorization. Correction: keep splitting until every factor is prime: 8=23 8 = 2^3, 45=32×5 45 = 3^2 \times 5.

  3. Confusing GCD and LCM rules. Misconception: using maximum exponents for GCD or minimum for LCM. Why it's wrong: the GCD must divide both, so no exponent can exceed the smaller one; the LCM must be a multiple of both, so it needs the larger. Correction: GCD takes minimums, LCM takes maximums — and a prime absent from one number contributes exponent 0 0 to the GCD.

Comparison and Connections

Prime factorization sits alongside several related ideas that students often blur together.

ConceptWhat it gives youRule from factorizations
Prime factorizationThe atomic decomposition of one numberSplit until only primes remain
GCD (greatest common divisor)Largest number dividing bothMinimum exponent of shared primes
LCM (least common multiple)Smallest common multipleMaximum exponent of all primes
Number of divisorsHow many factors n n hasProduct of (exponent +1 + 1)

The theorem also connects to the infinitude of primes (Euclid): because primes are the irreducible building blocks and every number is built from them, running out of primes would be catastrophic — and Euclid proved we never do. It contrasts sharply with algebraic number systems where unique factorization fails; that failure is what makes the ordinary integers special and is the historical seed of ideal theory in modern algebra.

Practice Questions

Recall

Q: State the Fundamental Theorem of Arithmetic in your own words. A: Every integer greater than 1 can be written as a product of primes, and that product is unique except for the order of the factors.

Understanding

Q: Why would allowing 1 to be prime break the theorem? A: Because you could insert any number of 1's into a factorization (6=2×3=1×2×3=12×2×3 6 = 2 \times 3 = 1 \times 2 \times 3 = 1^2 \times 2 \times 3 \dots), destroying uniqueness. Excluding 1 keeps each factorization singular.

Application

Q: Find the prime factorization of 600 600, then use it to count its divisors. A: 600=23×3×52 600 = 2^3 \times 3 \times 5^2. Divisor count =(3+1)(1+1)(2+1)=4×2×3=24 = (3+1)(1+1)(2+1) = 4 \times 2 \times 3 = 24.

Analysis

Q: Two numbers are A=24×32×7 A = 2^4 \times 3^2 \times 7 and B=22×33×5 B = 2^2 \times 3^3 \times 5. Compute gcd(A,B) \gcd(A,B) and lcm(A,B) \operatorname{lcm}(A,B), and verify gcd×lcm=A×B \gcd \times \operatorname{lcm} = A \times B. A: gcd=22×32=36 \gcd = 2^2 \times 3^2 = 36. lcm=24×33×5×7=16×27×35=15120 \operatorname{lcm} = 2^4 \times 3^3 \times 5 \times 7 = 16 \times 27 \times 35 = 15120. Then 36×15120=544320 36 \times 15120 = 544320, and A×B=(16×9×7)(4×27×5)=1008×540=544320 A \times B = (16 \times 9 \times 7)(4 \times 27 \times 5) = 1008 \times 540 = 544320. They match.

FAQ

Is 1 a prime number? No. It is a unit. Primes have exactly two distinct positive divisors; 1 has only one. Excluding it is what makes factorization unique.

Does the theorem apply to negative numbers or zero? As stated, it applies to integers greater than 1. It extends to negative integers if you allow a factor of 1 -1 (a unit), but 0 0 has no prime factorization — every prime "divides" it, so there's no finite product that works.

What does "unique up to order" mean? It means 12=2×2×3 12 = 2 \times 2 \times 3 and 12=3×2×2 12 = 3 \times 2 \times 2 count as the same factorization. Only the multiset of primes matters, not the sequence.

Is finding prime factorizations hard for computers? For small numbers, no. For very large numbers (hundreds of digits) with only large prime factors, it is currently infeasible in reasonable time — a fact that RSA encryption depends on.

Why isn't existence enough — why prove uniqueness separately? Because uniqueness can genuinely fail in other number systems. In some rings of algebraic integers, a number factors into irreducibles in more than one way. So uniqueness for the ordinary integers is a real theorem, not a triviality.

Quick Revision

  • Theorem: every integer n>1 n > 1 is a product of primes, uniquely up to order.
  • Existence: keep splitting composite factors until all are prime.
  • Uniqueness engine: Euclid's lemma — pabpa p \mid ab \Rightarrow p \mid a or pb p \mid b (for prime p p).
  • Standard form: n=p1a1p2a2pkak n = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k}.
  • Divisor count: (a1+1)(a2+1)(ak+1) (a_1+1)(a_2+1)\cdots(a_k+1).
  • GCD: minimum exponent of each shared prime. LCM: maximum exponent of every prime.
  • Identity: gcd(a,b)×lcm(a,b)=a×b \gcd(a,b) \times \operatorname{lcm}(a,b) = a \times b.
  • 1 is a unit, not a prime — this is what preserves uniqueness.
  • History: implicit in Euclid (c. 300 BCE), stated fully by Gauss (1801).

Prerequisites

  • Greatest Common Divisor and Least Common Multiple
  • Euclid's lemma and the Euclidean algorithm
  • Modular arithmetic

Next Topics

  • The infinitude of primes
  • Modular arithmetic and congruences
  • Applications to cryptography (RSA)