The Fundamental Theorem of Arithmetic

Why can every integer greater than 1 be broken into primes in essentially one way? Take the number 360. You might factor it as 2⋅180=2⋅4⋅45=2⋅2⋅2⋅452 \cdot 180 = 2 \cdot 4 \cdot 45 = 2 \cdot 2 \cdot 2 \cdot 45. Or start differently as 360=8⋅45=8⋅9⋅5360 = 8 \cdot 45 = 8 \cdot 9 \cdot 5. Every route, if pushed all the way down to primes, ends at the same multiset {2,2,2,3,3,5}\{2,2,2,3,3,5\}. This is not an accident of small numbers. It is a theorem, and a surprisingly non-obvious one. Uniqueness fails in many number systems that look superficially similar to the integers. The Fundamental Theorem of Arithmetic (FTA) asserts two separate things. Every integer greater than 1 admits a factorization into primes (existence). Any two such factorizations agree up to the order of the factors (uniqueness). Existence is the easy half, provable by a short induction. Uniqueness is the deep half. Its standard proof rests entirely on Euclid's Lemma — the statement that a prime dividing a product must divide one of the factors. Without that lemma, uniqueness can genuinely fail. We will see this in rings where an analogue of "prime" exists but Euclid's Lemma does not hold. The theorem matters because it turns multiplicative questions about integers into combinatorial questions about exponent vectors of primes. Once you know n=p1a1p2a2⋯pkakn = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k} uniquely, several things follow. Computing gcd⁡\gcd, lcm\mathrm{lcm}, the number of divisors, and multiplicative functions like Euler's totient all become exercises. They reduce to comparing or manipulating exponents. The FTA is the load-bearing wall of elementary number theory. Nearly every later structural result about divisibility either uses it directly or generalizes it to other rings. This article gives the precise statement and a complete non-circular proof of both halves. It includes a worked example tracking every step of an unequal factorization. It also gives a concrete counterexample showing what breaks in Z[−5]\mathbb{Z}[\sqrt{-5}] when the analogue of Euclid's Lemma fails. It closes with the theorem's role in modern applications. These range from cryptographic key generation to the analytic machinery of the Riemann zeta function.

Key takeaways
  • Every integer n>1n > 1 factors into primes: this is the existence half, proved by strong induction.
  • The uniqueness half says the prime factorization is the same multiset of primes no matter how you find it.
  • Uniqueness is proved using Euclid's Lemma: if a prime p∣abp \mid ab then p∣ap \mid a or p∣bp \mid b.
  • The theorem fails to hold in some other number systems (e.g. Z[−5]\mathbb{Z}[\sqrt{-5}]), which shows Euclid's Lemma is not automatic.
  • FTA converts multiplicative problems (gcd, lcm, divisor counting) into additive problems on exponent vectors.
  • It underlies cryptographic assumptions (RSA) and the Euler product for the zeta function.
  • Key idea: primes are the multiplicative "atoms" of Z\mathbb{Z}, and every integer decomposes into them in exactly one way.

Where this lives today

The Fundamental Theorem of Arithmetic is the quiet engine behind an enormous range of mathematics and its applications:

  • Cryptography. The security of RSA public-key encryption rests on the practical difficulty of factoring a large composite n=pqn = pq into its two prime factors, even though the Fundamental Theorem guarantees that factorization exists and is unique — the theorem guarantees what the answer is, while computational hardness is about finding it quickly.
  • Analytic number theory. The Euler product formula
∑n=1∞1ns=∏p prime11−p−s,ℜ(s)>1,\sum_{n=1}^{\infty} \frac{1}{n^s} = \prod_{p \text{ prime}} \frac{1}{1-p^{-s}}, \qquad \Re(s)>1,

is a direct restatement of unique factorization: expanding the right side via geometric series and unique factorization shows every term n−sn^{-s} on the left arises from exactly one combination of prime powers on the right. This identity is the starting point for the analytic study of the Riemann zeta function and the distribution of primes.

  • Algebraic number theory and beyond. The failure of unique factorization in rings like Z[−5]\mathbb{Z}[\sqrt{-5}] motivated the development of ideal theory and Dedekind domains, a cornerstone of modern algebraic number theory, algebraic geometry, and the study of class groups.
  • Computer science. Algorithms for integer factorization, primality testing, and computing gcd and lcm via Prime Factorization all take unique factorization as their conceptual foundation, even when the actual computation uses the Euclidean algorithm rather than factoring directly.
  • Combinatorics and multiplicative functions. Functions like the divisor-counting function, sum-of-divisors function, and Euler's Totient Function are all defined and computed via the exponents in a number's unique prime factorization, and their multiplicativity is a direct consequence of the theorem.

:::quiz[In Z[−5]\mathbb{Z}[\sqrt{-5}], the number 6 factors as both 2⋅32\cdot 3 and (1+−5)(1−−5)(1+\sqrt{-5})(1-\sqrt{-5}). What does this demonstrate?]

  • That 66 is not actually composite in this ring
  • That existence of a factorization into irreducibles can hold while uniqueness fails ✓
  • That the norm function is not multiplicative
  • That 22 and 33 are units in this ring

Ask the tutor: How does unique factorization let us derive formulas for Euler's totient function directly from a number's prime exponents?

DefinitionPrime factorization and the Fundamental Theorem of Arithmetic

An integer p>1p > 1 is prime if its only positive divisors are 11 and pp. An integer n>1n > 1 that is not prime is composite. A prime factorization of an integer n>1n > 1 is an expression

n=p1p2⋯pkn = p_1 p_2 \cdots p_k

where k≥1k \geq 1 and each pip_i is prime (repetitions allowed, order unspecified).

The Fundamental Theorem of Arithmetic. Every integer n>1n > 1 has a prime factorization, and this factorization is unique up to the order of the factors. Equivalently, there exist a positive integer rr, distinct primes p1<p2<⋯<prp_1 < p_2 < \cdots < p_r, and positive integers a1,…,ara_1, \dots, a_r, such that

n=p1a1p2a2⋯prar,n = p_1^{a_1} p_2^{a_2} \cdots p_r^{a_r},

and this representation (the primes used and their exponents) is uniquely determined by nn.

Intuition

Think of the positive integers greater than 11 as molecules and the primes as atoms. Multiplication combines atoms into molecules; factorization takes them back apart. The claim that factorization is unique is the number-theoretic analogue of saying a chemical compound has one determined atomic formula, not several inequivalent ones. This is far from automatic: in many other algebraic settings (systems of "numbers" built by adjoining roots like −5\sqrt{-5}), you can find irreducible elements that fail to play the role of atoms faithfully — the same "molecule" can be split into different irreducible pieces. What makes Z\mathbb{Z} special is Euclid's Lemma, the mechanism that forces the split to be unique. A second useful picture is the lattice of exponent vectors. Fix a list of primes 2,3,5,7,…2, 3, 5, 7, \dots. Every positive integer corresponds to a finite sequence of exponents (a1,a2,a3,… )(a_1, a_2, a_3, \dots), almost all zero, via n=2a13a25a3⋯n = 2^{a_1}3^{a_2}5^{a_3}\cdots. Multiplying two integers corresponds to adding their exponent vectors coordinate-wise. The Fundamental Theorem of Arithmetic says this correspondence n↔(a1,a2,a3,… )n \leftrightarrow (a_1, a_2, a_3, \dots) is a bijection between positive integers and such vectors — the "coordinates" of an integer in prime-space are well defined.

Figure
The exponent-vector lattice for the prime basis {2,3,5}\{2,3,5\}: each lattice point is a distinct integer, and factorization uniqueness means the map point → integer is injective
Exponents of 2 (a₁) → Exponents of 3 (a₂) ↑ 1 2 4 8 3 6 12 24 9 18 36 72 0 1 2 3 a₁ 0 1 2 n = 2^a₁·3^a₂

Central theorem

TheoremFundamental Theorem of Arithmetic

Let nn be an integer with n>1n > 1. Then:

(Existence) There exist a positive integer kk and primes p1,p2,…,pkp_1, p_2, \dots, p_k (not necessarily distinct) such that

n=p1p2⋯pk.n = p_1 p_2 \cdots p_k.

(Uniqueness) If also n=q1q2⋯qmn = q_1 q_2 \cdots q_m with each qjq_j prime, then k=mk = m and there is a permutation σ\sigma of {1,…,k}\{1,\dots,k\} such that qj=pσ(j)q_j = p_{\sigma(j)} for all jj. That is, the two factorizations use the same primes with the same multiplicities.

LemmaEuclid's Lemma — assumed known, restated for use

If pp is a prime and p∣abp \mid ab for integers a,ba, b, then p∣ap \mid a or p∣bp \mid b. More generally, if p∣a1a2⋯arp \mid a_1 a_2 \cdots a_r, then p∣aip \mid a_i for at least one index ii.

Proof

We prove existence and uniqueness separately.

Existence, by strong induction on nn. Base case: n=2n = 2. Since 22 is prime, n=2n = 2 is itself a one-term prime factorization. Inductive step: let n>2n > 2, and suppose every integer mm with 1<m<n1 < m < n has a prime factorization. We show nn does too. Case 1: nn is prime. Then n=nn = n is a (one-factor) prime factorization, and we are done. Case 2: nn is composite. By definition of composite, nn has a divisor dd with 1<d<n1 < d < n. Write n=d⋅en = d \cdot e where e=n/de = n/d is a positive integer. Since 1<d<n1 < d < n and n=den = de with d,e>1d, e > 1 (if e=1e = 1 then n=d<nn = d < n, contradiction; if e≤0e \le 0 then n≤0n \le 0, contradiction, since n,d>0n, d>0), we also get 1<e<n1 < e < n: indeed e=n/d<ne = n/d < n because d>1d > 1, and e>1e > 1 because d<nd < n forces e=n/d>1e = n/d > 1. Both dd and ee are strictly between 11 and nn, so the induction hypothesis applies to each: d=p1⋯psd = p_1 \cdots p_s and e=ps+1⋯pke = p_{s+1}\cdots p_k for primes p1,…,pkp_1,\dots,p_k. Concatenating,

n=d⋅e=p1⋯ps⋅ps+1⋯pk,n = d \cdot e = p_1 \cdots p_s \cdot p_{s+1} \cdots p_k,

a prime factorization of nn. By strong induction, every integer n>1n > 1 has a prime factorization. This completes existence.

Uniqueness, by strong induction on nn, using Euclid's Lemma. Base case: n=2n = 2. The only factorization of 22 into primes is the single factor 22 itself, since any prime factor of 22 must divide 22 and primes dividing 22 can only be 22 (as 22's only positive divisors are 1,21,2, and 11 is not prime). So uniqueness holds trivially. Inductive step: let n>2n > 2 and suppose every integer mm with 1<m<n1 < m < n has a unique prime factorization (up to order). Suppose

n=p1p2⋯pk=q1q2⋯qmn = p_1 p_2 \cdots p_k = q_1 q_2 \cdots q_m

are two prime factorizations of nn. Since p1p_1 is prime and p1∣n=q1q2⋯qmp_1 \mid n = q_1 q_2 \cdots q_m, Euclid's Lemma (applied repeatedly, as stated in the generalized form above) gives that p1∣qjp_1 \mid q_j for some index jj. After relabeling the qq's (a mere reordering, which does not affect the multiset of factors), assume p1∣q1p_1 \mid q_1. But q1q_1 is prime, so its only positive divisors are 11 and q1q_1. Since p1>1p_1 > 1 and p1∣q1p_1 \mid q_1, we must have p1=q1p_1 = q_1. Now divide both factorizations of nn by p1=q1p_1 = q_1:

np1=p2p3⋯pk=q2q3⋯qm.\frac{n}{p_1} = p_2 p_3 \cdots p_k = q_2 q_3 \cdots q_m.

Call this common value n′=n/p1n' = n/p_1. There are two cases. If n′=1n' = 1: then the products p2⋯pkp_2\cdots p_k and q2⋯qmq_2 \cdots q_m both equal 11. A product of one or more primes is always ≥2>1\geq 2 > 1 (each prime factor is ≥2\geq 2), so the only way a product of primes equals 11 is if there are no factors in the product, i.e. k−1=0k - 1 = 0 and m−1=0m-1=0. Hence k=m=1k = m = 1, and the factorizations were both just n=p1=q1n = p_1 = q_1. Uniqueness holds. If n′>1n' > 1: then since 1<n′<n1 < n' < n (because n′=n/p1n' = n/p_1 and p1≥2p_1 \ge 2), the induction hypothesis applies to n′n': its two prime factorizations p2⋯pkp_2\cdots p_k and q2⋯qmq_2 \cdots q_m must have the same length and agree up to order, i.e. k−1=m−1k - 1 = m-1 (so k=mk=m) and {p2,…,pk}\{p_2,\dots,p_k\} equals {q2,…,qm}\{q_2,\dots,q_m\} as multisets. Combined with p1=q1p_1 = q_1 established above, the full multisets {p1,…,pk}\{p_1,\dots,p_k\} and {q1,…,qm}\{q_1,\dots,q_m\} agree, i.e. there is a permutation matching them term for term. By strong induction, uniqueness holds for every integer n>1n > 1. ■\blacksquare

∎

The proof technique for existence is strong induction with a splitting argument (reduce a composite number to two strictly smaller factors); the proof technique for uniqueness is strong induction driven by Euclid's Lemma, peeling off one matched prime at a time. Neither half of the proof invokes the Fundamental Theorem itself at any stage, so the argument is non-circular: existence uses only the definition of composite numbers, and uniqueness uses only Euclid's Lemma (a prerequisite result) together with existence's conclusion that a factorization exists to induct on.

Worked examples

Example 1: An asymmetric factorization, tracked step by step. Factor n=2 3 7 11 13=6006n = 2\,3\,7\,11\,13 = 6006 two different ways and confirm the theorem's uniqueness claim concretely. Route A (peel off small factors): 6006=2⋅30036006 = 2 \cdot 3003. Then 3003=3⋅10013003 = 3 \cdot 1001. Then 1001=7⋅1431001 = 7 \cdot 143. Then 143=11⋅13143 = 11 \cdot 13. So

6006=2⋅3⋅7⋅11⋅13.6006 = 2 \cdot 3 \cdot 7 \cdot 11 \cdot 13.

Route B (start from a different divisor): notice 6006=42⋅1436006 = 42 \cdot 143, since 42⋅143=42⋅143=600642 \cdot 143 = 42\cdot 143 = 6006 (check: 42⋅100=420042 \cdot 100 = 4200, 42⋅43=180642\cdot 43 = 1806, sum =6006= 6006 ✓.) Now factor each piece: 42=2⋅3⋅742 = 2\cdot 3\cdot 7 and 143=11⋅13143 = 11 \cdot 13. So

6006=(2⋅3⋅7)(11⋅13)=2⋅3⋅7⋅11⋅13.6006 = (2\cdot 3\cdot 7)(11\cdot 13) = 2\cdot 3\cdot 7\cdot 11\cdot 13.

Route C (yet another split): 6006=66⋅916006 = 66 \cdot 91. Check: 66⋅91=66⋅90+66=5940+66=600666\cdot 91 = 66\cdot 90 + 66 = 5940+66=6006 ✓. Factor 66=2⋅3⋅1166 = 2\cdot 3\cdot 11 and 91=7⋅1391 = 7\cdot 13. So

6006=(2⋅3⋅11)(7⋅13)=2⋅3⋅7⋅11⋅13.6006 = (2\cdot 3\cdot 11)(7\cdot 13) = 2\cdot 3\cdot 7\cdot 11\cdot 13.

All three routes, despite splitting the number completely differently at the first step (22 vs. 4242 vs. 6666 as the first factor extracted), converge on the same multiset {2,3,7,11,13}\{2,3,7,11,13\}, exactly as the theorem guarantees. In canonical form,

6006=21⋅31⋅71⋅111⋅131.6006 = 2^1 \cdot 3^1 \cdot 7^1 \cdot 11^1 \cdot 13^1.

Example 2: Using unique factorization to compute gcd⁡\gcd and count divisors (foreshadowing <a class="wiki-link" href="/wiki/math-numthy-gcd-lcm-prime-factorization" data-track="wiki_article.body.wiki_link">gcd and lcm via Prime Factorization</a>). Let a=23⋅32⋅5=360a = 2^3 \cdot 3^2 \cdot 5 = 360 and b=22⋅34⋅7=2268b = 2^2 \cdot 3^4 \cdot 7 = 2268. Compute gcd⁡(a,b)\gcd(a,b), lcm(a,b)\mathrm{lcm}(a,b), and the number of divisors of aa. First verify the numbers: 23⋅32⋅5=8⋅9⋅5=3602^3\cdot 3^2 \cdot 5 = 8\cdot 9\cdot 5 = 360 ✓, and 22⋅34⋅7=4⋅81⋅7=4⋅567=22682^2 \cdot 3^4 \cdot 7 = 4\cdot 81\cdot 7 = 4\cdot 567 = 2268 ✓. By the Fundamental Theorem, every prime factorization of a common divisor of a,ba,b can only use primes appearing in both aa and bb's factorizations, namely 22 and 33, and the exponent of each such prime in a common divisor cannot exceed its exponent in either aa or bb. Hence

gcd⁡(a,b)=2min⁡(3,2)⋅3min⁡(2,4)=22⋅32=4⋅9=36.\gcd(a,b) = 2^{\min(3,2)}\cdot 3^{\min(2,4)} = 2^2\cdot 3^2 = 4\cdot 9 = 36.

Similarly, a common multiple must contain each prime to at least the larger of the two exponents, and the least such multiple takes exactly the maximum exponent for every prime appearing in either number:

lcm(a,b)=2max⁡(3,2)⋅3max⁡(2,4)⋅5max⁡(1,0)⋅7max⁡(0,1)=23⋅34⋅5⋅7=8⋅81⋅5⋅7.\mathrm{lcm}(a,b) = 2^{\max(3,2)}\cdot 3^{\max(2,4)}\cdot 5^{\max(1,0)}\cdot 7^{\max(0,1)} = 2^3\cdot 3^4\cdot 5\cdot 7 = 8\cdot 81\cdot 5\cdot 7.

Compute: 8⋅81=6488\cdot 81 = 648, 648⋅5=3240648\cdot 5 = 3240, 3240⋅7=226803240\cdot 7 = 22680. So lcm(a,b)=22680\mathrm{lcm}(a,b) = 22680. Sanity check via gcd⁡(a,b)⋅lcm(a,b)=a⋅b\gcd(a,b)\cdot \mathrm{lcm}(a,b) = a\cdot b: left side 36⋅22680=81648036 \cdot 22680 = 816480; right side 360⋅2268=816480360\cdot 2268 = 816480 ✓ (computing 360⋅2268=360⋅2000+360⋅268=720000+96480=816480360\cdot 2268 = 360\cdot 2000 + 360\cdot 268 = 720000+96480=816480). Finally, the number of positive divisors of a=23⋅32⋅51a = 2^3\cdot3^2\cdot5^1 is obtained because unique factorization makes every divisor of the form 2i3j5k2^{i}3^{j}5^{k} with 0≤i≤30\le i\le 3, 0≤j≤20\le j\le 2, 0≤k≤10\le k\le 1, giving

d(a)=(3+1)(2+1)(1+1)=4⋅3⋅2=24d(a) = (3+1)(2+1)(1+1) = 4\cdot3\cdot2 = 24

divisors, each corresponding to a distinct choice of exponents by uniqueness.

:::counterexample[Why Euclid's Lemma cannot be dropped: factorization into irreducibles in Z[−5]\mathbb{Z}[\sqrt{-5}]] The uniqueness half of the Fundamental Theorem was proved using Euclid's Lemma as an essential ingredient. Drop the hypothesis that this lemma holds, and uniqueness can fail even when existence of a factorization into irreducible elements still holds. Work in the ring Z[−5]={a+b−5:a,b∈Z}\mathbb{Z}[\sqrt{-5}] = \{a + b\sqrt{-5} : a,b \in \mathbb{Z}\}, with the usual addition and multiplication (and −52=−5\sqrt{-5}^2 = -5). Define the norm N(a+b−5)=a2+5b2N(a+b\sqrt{-5}) = a^2+5b^2, which is multiplicative: N(xy)=N(x)N(y)N(xy) = N(x)N(y). Call a non-zero, non-unit element π\pi irreducible if whenever π=xy\pi = xy, one of x,yx,y is a unit (the only units in this ring are ±1\pm 1, since N(x)=1N(x)=1 forces a2+5b2=1a^2+5b^2=1, i.e. b=0,a=±1b=0,a=\pm1). Consider the number 66. It factors two ways:

6=2⋅3=(1+−5)(1−−5).6 = 2\cdot 3 = (1+\sqrt{-5})(1-\sqrt{-5}).

Check the second: (1+−5)(1−−5)=1−(−5)2=1−(−5)=6(1+\sqrt{-5})(1-\sqrt{-5}) = 1 - (\sqrt{-5})^2 = 1-(-5) = 6 ✓. Each of the four factors 2,3,1+−5,1−−52, 3, 1+\sqrt{-5}, 1-\sqrt{-5} is irreducible in Z[−5]\mathbb{Z}[\sqrt{-5}]:

  • N(2)=4N(2) = 4. If 2=xy2 = xy non-trivially, then N(x)N(y)=4N(x)N(y)=4 with neither factor 11, forcing N(x)=N(y)=2N(x)=N(y)=2. But a2+5b2=2a^2+5b^2=2 has no integer solutions (check b=0⇒a2=2b=0\Rightarrow a^2=2 impossible; ∣b∣≥1⇒5b2≥5>2|b|\ge1 \Rightarrow 5b^2\ge5>2). So 22 is irreducible.
  • N(3)=9N(3)=9; a non-trivial factorization would need a factor of norm 33, and a2+5b2=3a^2+5b^2=3 has no integer solution by the same check. So 33 is irreducible.
  • N(1+−5)=1+5=6N(1+\sqrt{-5}) = 1+5=6; a non-trivial factorization would need factors of norm 22 and 33 (the only factor pairs of 66 besides 1,61,6), but norm 22 is impossible as shown. So 1+−51+\sqrt{-5} is irreducible. The same argument applies to 1−−51-\sqrt{-5}.

So 66 has two genuinely different factorizations into irreducibles, 2⋅32\cdot 3 and (1+−5)(1−−5)(1+\sqrt{-5})(1-\sqrt{-5}), and no unit multiple relates 22 or 33 to 1±−51\pm\sqrt{-5} (their norms differ: 4,94, 9 versus 66), so these are not just the same factorization relabeled. Existence of a factorization into irreducibles still holds in this ring (a norm-descent argument analogous to the strong induction above works), but uniqueness fails. The reason it fails is precisely that Euclid's Lemma fails here: 22 is irreducible but 2∣6=(1+−5)(1−−5)2 \mid 6 = (1+\sqrt{-5})(1-\sqrt{-5}) while 22 divides neither 1+−51+\sqrt{-5} nor 1−−51-\sqrt{-5} (dividing would force an integer solution to a norm equation with no solutions, e.g. N(2)=4∤N(1+−5)=6N(2) = 4 \nmid N(1+\sqrt{-5})=6 in the required divisibility sense). This single missing ingredient — Euclid's Lemma for irreducibles — is exactly what the uniqueness proof for Z\mathbb{Z} used at its pivotal step, confirming that the hypothesis is essential, not merely convenient.

Scope, edge cases & common traps

SituationWhat the theorem saysCommon error
n=1n=1Not covered: 11 has the empty product of primes, conventionally, but is not itself required to have a "prime factorization" in the sense of the theorem's statementTreating 11 as prime, or as requiring a nonempty factorization
nn primeFactorization is the single factor nn itselfThinking a prime "has no factorization"
Negative integersTheorem as stated applies to n>1n>1; extends to ∣n∣>1|n|>1 with a unit ±1\pm1 prefactorForgetting the sign, e.g. claiming −12-12 and 1212 have "the same" factorization without the unit
Order of factorsIrrelevant — uniqueness is as a multiset / up to permutationTreating 2⋅32\cdot3 and 3⋅23\cdot2 as different factorizations
Rings other than Z\mathbb{Z}Uniqueness can fail without an analogue of Euclid's LemmaAssuming all "number-like" rings have unique factorization automatically

The mathematician behind it

Origins · 1 minEuclid of Alexandria and how this was discovered
EO
Euclid of Alexandria
c. 300 BCE · Hellenistic mathematics, Ptolemaic Egypt

Euclid compiled the Elements, the most influential mathematics text in history, systematizing geometry and number theory into an axiomatic deductive structure. Book IX of the Elements contains Proposition 14, an early ancestor of the Fundamental Theorem of Arithmetic (restricted to certain cases), and Book VII contains what is now called Euclid's Lemma along with the Euclidean algorithm. Little is known of Euclid's life; he is thought to have taught at Alexandria's great library under Ptolemy I. His deductive method — deriving all results from a short list of explicit postulates — became the template for rigorous mathematics for over two thousand years, and the FTA's modern proof, resting on Euclid's Lemma, is a direct descendant of his own arguments.

History
- c. 300 BCE — Euclid's Elements, Book VII, states and proves the lemma that a prime dividing a product divides one of the factors, and Book IX gives partial factorization-uniqueness results.
- 1801 — Carl Friedrich Gauss, in Disquisitiones Arithmeticae, gives the first fully general and rigorous statement and proof of unique factorization for the integers, naming it explicitly as foundational.
- 1832 (published 1844) — Gauss extends unique factorization considerations to the Gaussian integers Z[i]\mathbb{Z}[i], showing the phenomenon generalizes to some, but not all, extended number systems.
- 1844 — Ernst Kummer, studying Fermat's Last Theorem, discovers that unique factorization fails in certain cyclotomic integer rings, motivating his invention of "ideal numbers" to restore a uniqueness statement.
- 1871 — Richard Dedekind formalizes Kummer's ideal numbers as ideals in general rings, launching the theory of Dedekind domains, where unique factorization is restored at the level of ideals even when it fails for elements.
Does the Fundamental Theorem of Arithmetic apply to the number 1?

No. The theorem as standardly stated applies to integers n>1n > 1. The number 11 is conventionally treated as an "empty product" of primes (a product with zero factors), which is a useful bookkeeping convention (it makes multiplicativity of functions like the divisor-count function work cleanly), but 11 is neither prime nor composite, and the theorem's existence and uniqueness claims are not asserted for it. Including 11 as if it had a factorization with actual prime factors would also break uniqueness trivially, since 1=1⋅1=1⋅1⋅1=⋯1 = 1\cdot 1 = 1\cdot1\cdot1=\cdots has no canonical form among primes.

Why does the theorem require primes specifically, rather than just "irreducible" numbers?

In the integers, "prime" (only divisible by 11 and itself) and "irreducible" (cannot be written as a product of two smaller-than-itself positive integers) turn out to coincide, so the distinction is invisible in Z\mathbb{Z}. In more general rings, they can differ: an irreducible element might not satisfy Euclid's Lemma. The uniqueness proof strictly needs the prime property (Euclid's Lemma-compatible), not merely irreducibility, which is exactly why unique factorization can fail in rings like Z[−5]\mathbb{Z}[\sqrt{-5}] where elements are irreducible but not prime.

Is unique factorization true for negative integers too?

Yes, with a small adjustment. Every integer nn with ∣n∣>1|n|>1 can be written as n=±p1p2⋯pkn = \pm p_1 p_2\cdots p_k for primes pip_i, and this is unique up to reordering the primes and up to the sign choice being forced by the sign of nn. Formally one says Z\mathbb{Z} is a unique factorization domain where the units are ±1\pm 1, and factorizations are unique "up to units and order." The core content of the theorem, though, is entirely about the positive integers, since every integer's factorization reduces to that of its absolute value.

How does the Fundamental Theorem let you count the divisors of a number?

If n=p1a1p2a2⋯prarn = p_1^{a_1}p_2^{a_2}\cdots p_r^{a_r} is the unique factorization, then unique factorization guarantees that every positive divisor of nn has the form p1i1⋯prirp_1^{i_1}\cdots p_r^{i_r} with 0≤ij≤aj0 \le i_j \le a_j, and different exponent tuples give different divisors. So the number of divisors is exactly the number of such tuples, (a1+1)(a2+1)⋯(ar+1)(a_1+1)(a_2+1)\cdots(a_r+1). Without uniqueness, you could not be sure that every divisor arises this way, or that distinct tuples always give distinct divisors.

Can a number have infinitely many distinct prime factors?

No — every integer n>1n>1 has only finitely many prime factors, and in fact at most log⁡2n\log_2 n of them (with multiplicity), since each prime factor is at least 22 and the product of kk factors each ≥2\ge 2 is at least 2k2^k, which must be ≤n\le n. This finiteness is implicit in the existence proof: the induction terminates because the factors d,ed, e used at each splitting step are strictly smaller than nn, guaranteeing the recursive splitting process cannot continue forever.

Is the Fundamental Theorem of Arithmetic used to prove that there are infinitely many primes?

Not directly — the infinitude of primes (Euclid's other classical theorem) is logically independent of the FTA and is usually proved separately by contradiction (assuming a finite list of primes and constructing a number not divisible by any of them). However, the two results are often presented together because both underlie the basic structural picture of the integers: infinitude tells you there are infinitely many "atoms," while the FTA tells you how integers are built from those atoms uniquely.

What goes wrong in the proof if you only assume every irreducible splits products, i.e. weaken Euclid's Lemma to hold only for irreducibles times themselves?

The uniqueness proof's key inductive step needs the full strength of Euclid's Lemma applied to an arbitrary product of m−1m-1 primes at once (via repeated application to pairs). If Euclid's Lemma held only in some restricted form — say only for a prime dividing a product of exactly two specific irreducibles rather than an arbitrary product — the inductive step matching p1p_1 to some qjq_j among an arbitrary-length product q1⋯qmq_1\cdots q_m could fail, and the argument would break down exactly at the point where p1p_1 is shown to divide one particular qjq_j.

Before this

Where this leads