Every PID is a UFD
Statement
Let \(R\) be a principal ideal domain (PID): an integral domain in which every ideal is generated by a single element. Then \(R\) is a unique factorisation domain (UFD): every nonzero, non-unit element \(a\in R\) can be written as a product of irreducible elements, \(a=p_1p_2\cdots p_r\), and this factorisation is unique up to reordering the factors and replacing each \(p_i\) by an associate \(u_ip_i\) for a unit \(u_i\in R^\times\) (with \(\prod u_i=1\), the units absorbed into one another). Equivalently: existence and uniqueness of factorisation into irreducibles both hold in every PID.
Why it matters
Unique factorisation is the abstract statement of "the fundamental theorem of arithmetic" — that every integer factors into primes in essentially one way — lifted out of \(\mathbb{Z}\) and proved for an entire class of rings at once. Rather than re-proving unique factorisation from scratch in \(\mathbb{Z}\), in \(k[x]\) for a field \(k\), in the Gaussian integers \(\mathbb{Z}[i]\), and in every other example separately, this theorem proves it once, structurally, for any ring built from the single principal-ideal axiom.
It is also the hinge on which a great deal of algebraic number theory turns, precisely because it shows where unique factorisation can fail. Not every integral domain is a PID, and the search for rings where factorisation fails — beginning with Kummer's investigation of cyclotomic integers in the 1840s, in pursuit of Fermat's Last Theorem — led directly to the invention of ideals themselves. An "ideal number" was originally a way to restore unique factorisation to a ring that had lost it; Dedekind's ideals made that idea rigorous, and this theorem is the statement of exactly which rings never needed the repair.
Hypotheses
Proof
The proof has two independent parts: existence of a factorisation into irreducibles (Steps 1–3), and uniqueness of that factorisation (Steps 4–7). Existence uses only that a PID is Noetherian; uniqueness uses the stronger fact that irreducibles in a PID are prime.
Part 1 — existence
Part 2 — irreducibles are prime
Part 3 — uniqueness
Result
Reading. Existence of factorisation only needs the ascending chain condition (Noetherian-ness), which a PID gets for free from having every ideal generated by one element. Uniqueness needs the stronger fact that irreducibles are prime, which uses the maximality of \((p)\) — a genuinely stronger property that PIDs have but general Noetherian domains do not.
Scope. Applies to any PID: \(\mathbb{Z}\), \(k[x]\) for a field \(k\), the Gaussian integers \(\mathbb{Z}[i]\), and every Euclidean domain (Euclidean domains are always PIDs via the division algorithm). Does not apply to non-PID domains such as \(\mathbb{Z}[x]\) (not a PID: \((2,x)\) is not principal) or \(\mathbb{Z}[\sqrt{-5}]\) — though \(\mathbb{Z}[x]\) happens to still be a UFD by a separate argument (Gauss's theorem), showing PID is sufficient for unique factorisation but not necessary.
Corollaries & converses
- In a PID, "irreducible" and "prime" coincide (Step 5 proves irreducible \(\Rightarrow\) prime; the converse, prime \(\Rightarrow\) irreducible, holds in every integral domain and needs no PID hypothesis).
- Every PID has a well-defined \(\gcd\) and \(\mathrm{lcm}\) for any two elements, computable via the shared prime factorisation — the algebraic form of "greatest common divisor" learned first for integers.
- Converse fails: UFD does not imply PID. \(k[x,y]\) for a field \(k\) is a UFD (by Gauss's theorem, since \(k[x]\) is a UFD) but not a PID: the ideal \((x,y)\) needs two generators and is not principal. Unique factorisation is strictly weaker than the principal-ideal property.
- The chain of implications is Euclidean domain \(\Rightarrow\) PID \(\Rightarrow\) UFD \(\Rightarrow\) integral domain, and every implication is strict: \(\mathbb{Z}[\tfrac{1+\sqrt{-19}}{2}]\) is a PID that is not Euclidean (a classical, non-obvious example), and \(k[x,y]\) is a UFD that is not a PID.
Fails without
- Drop the PID hypothesis (not every ideal principal): in \(\mathbb{Z}[\sqrt{-5}]\), \(6=2\cdot3=(1+\sqrt{-5})(1-\sqrt{-5})\) are two factorisations into irreducibles with no factor an associate of any factor on the other side (checking norms: \(N(2)=4\), \(N(3)=9\), \(N(1\pm\sqrt{-5})=6\), and no element of norm \(2\) or \(3\) exists in \(\mathbb{Z}[\sqrt{-5}]\), which is what makes \(2,3,1\pm\sqrt{-5}\) irreducible in the first place). Unique factorisation genuinely fails.
- Drop the integral domain hypothesis: in \(\mathbb{Z}/12\mathbb{Z}\) (which has zero divisors), \(4\cdot3=0=8\cdot3\), so "divisor" and "irreducible" stop behaving sensibly — e.g. \(2\cdot2=4=2\cdot2\) looks unique, but \(4\) is also \(4\cdot1=4\cdot(-11)=4\cdot13=\cdots\) up to the many units and zero-divisor artefacts of a non-domain, and the cancellation used in Step 7 (dividing \(p_1\) out of both sides of an equation) is simply unavailable.
Common errors
- Treating "irreducible" and "prime" as synonyms in an arbitrary integral domain. They coincide in a PID (that is the content of Step 5) but not in general — \(2\) is irreducible but not prime in \(\mathbb{Z}[\sqrt{-5}]\), since \(2\mid(1+\sqrt{-5})(1-\sqrt{-5})=6\) yet \(2\) divides neither factor.
- Forgetting the "up to units" qualifier and treating \(6=2\cdot3\) and \(6=(-2)\cdot(-3)\) in \(\mathbb{Z}\) as two different factorisations. They are the same factorisation up to the unit \(-1\), exactly what the theorem's uniqueness clause allows.
- Assuming existence of factorisation (Part 1) is enough on its own to call a ring a UFD. A ring where every element factors into irreducibles but not uniquely (an "atomic domain" that is not a UFD) is a genuinely different, weaker structure; both existence and uniqueness must be established.
- Trying to prove uniqueness (Steps 6–7) without first establishing irreducible \(\Rightarrow\) prime (Step 5). The induction in Step 7 needs primality of \(p_1\) specifically to conclude it divides a single \(q_j\); irreducibility alone does not give that.
Discussion
The result is often stated as "\(\mathbb{Z}\) has unique factorisation" and left there in a first course, but the abstract version proved here is what makes the fact useful elsewhere: any time a new ring is shown to be a PID — \(k[x]\) via the division algorithm, \(\mathbb{Z}[i]\) via the Gaussian norm, \(p\)-adic integers, discrete valuation rings — unique factorisation comes for free, with no separate argument required.
The historical route ran backwards from how the theorem is usually taught. Euler and Gauss worked with unique factorisation in \(\mathbb{Z}\) and in specific number rings without a general theory. Kummer, studying Fermat's Last Theorem via the ring \(\mathbb{Z}[\zeta_p]\) of cyclotomic integers, found that unique factorisation could fail there, and introduced "ideal numbers" to repair it. Dedekind then reformulated Kummer's ideal numbers as literal ideals of the ring, and showed that in the rings of algebraic number theory (Dedekind domains), unique factorisation of ideals into prime ideals always holds, even when unique factorisation of elements does not. A PID is precisely a Dedekind domain in which ideal factorisation and element factorisation coincide — the class group is trivial.
From this vantage point, the theorem is the statement that a PID has trivial ideal class group: every ideal is principal, so factoring an ideal into prime ideals is the same data as factoring its (unique, up to a unit) generator into prime elements. The general theory of Dedekind domains recovers unique factorisation of ideals unconditionally, with element-level unique factorisation as the special case where every ideal happens to be principal.
Common misconception: that "PID" and "UFD with an extra property" are roughly interchangeable ranks of the same idea. They are not symmetric: PID is a strictly stronger, more restrictive hypothesis (about ideals) that happens to imply the weaker, more common conclusion (about elements) proved here — a UFD need not have any of the ideal-theoretic structure (finitely-generated-by-one-element ideals) that made the proof work.
Worked examples
Reading. Three superficially different-looking factorisation facts — integer arithmetic, polynomial factoring, and Gaussian-integer splitting of primes — are all instances of the single theorem proved above, once each ring is checked to be a PID.
Scope. The same pattern extends to any Euclidean domain, since every Euclidean domain is a PID (Step 1–3's Noetherian argument, plus a direct principal-ideal proof via the Euclidean algorithm, which is not reproduced on this page).
Problems
- Show directly, without citing the theorem, that \(\mathbb{Z}\) has the ascending chain condition on ideals: any chain \((n_1)\subseteq(n_2)\subseteq\cdots\) of ideals of \(\mathbb{Z}\) stabilises.
Solution
Each ideal \((n_k)\) is generated by the smallest positive element of the ideal (or \(\{0\}\) itself), so \((n_1)\subseteq(n_2)\subseteq\cdots\) corresponds to a non-increasing sequence of nonnegative integers \(|n_1|\ge|n_2|\ge\cdots\ge0\) (since a larger ideal is generated by a divisor, hence a number of no greater absolute value). A non-increasing sequence of nonnegative integers must eventually be constant, so the chain of ideals stabilises. This is Step 2 of the proof, specialised to \(R=\mathbb{Z}\) and made concrete via the size of the generator. - In \(\mathbb{Z}[\sqrt{-5}]\), verify that \(2\), \(3\), \(1+\sqrt{-5}\), and \(1-\sqrt{-5}\) are all irreducible, confirming the counterexample in Hypotheses is genuine.
Solution
Using the norm \(N(a+b\sqrt{-5})=a^2+5b^2\), which is multiplicative (\(N(xy)=N(x)N(y)\)): \(N(2)=4\), \(N(3)=9\), \(N(1\pm\sqrt{-5})=1+5=6\). If any of these factored nontrivially as \(xy\) with \(x,y\) non-units, then \(N(x)N(y)\) would equal \(4\), \(9\), or \(6\) with both \(N(x),N(y)>1\) (a unit has norm \(1\); the only units in \(\mathbb{Z}[\sqrt{-5}]\) are \(\pm1\)). Checking which norms are actually achieved by elements \(a+b\sqrt{-5}\): norm \(2\) or \(3\) is impossible, since \(a^2+5b^2=2\) or \(3\) has no integer solution (\(b=0\) gives \(a^2=2\) or \(3\), no integer solution; \(b\ne0\) gives \(a^2+5b^2\ge5\)). So \(4=2\cdot2\) or \(4=1\cdot4\) is the only norm factorisation available for \(N(2)=4\), and \(2\cdot2\) would require a norm-\(2\) element, which does not exist — so \(2\) is irreducible. The same norm argument (no element of norm \(2\) or \(3\)) rules out nontrivial factorisations of \(3\) (norm \(9=3\cdot3\), needs a norm-\(3\) element) and of \(1\pm\sqrt{-5}\) (norm \(6=2\cdot3\), needs norm-\(2\) and norm-\(3\) elements, neither exists). - Use the theorem to explain why \(\gcd(a,b)\) can always be written as \(\gcd(a,b)=ra+sb\) for some \(r,s\in R\), when \(R\) is a PID (Bézout's identity).
Solution
The ideal \((a,b)=\{ra+sb : r,s\in R\}\) is an ideal of \(R\); since \(R\) is a PID, \((a,b)=(d)\) for some \(d\in R\). Since \(d\in(a,b)\), \(d=ra+sb\) for some \(r,s\). Since \(a,b\in(d)\), \(d\mid a\) and \(d\mid b\), so \(d\) is a common divisor. If \(e\) is any common divisor of \(a,b\), then \(e\mid ra+sb=d\), so \(e\mid d\), making \(d\) the greatest common divisor (greatest in the divisibility order). Note this argument uses only "PID" directly (existence of a single generator \(d\) for \((a,b)\)), not the full unique-factorisation theorem — a useful reminder that the PID property is often stronger than what any individual application of unique factorisation requires. - A student claims \(\mathbb{Z}[x]\) is a PID "because \(\mathbb{Z}\) is a PID and \(\mathbb{Z}[x]\) is just polynomials over it." Find the flaw and give an ideal of \(\mathbb{Z}[x]\) that is not principal.
Solution
The flaw: "PID" is not preserved by adjoining a variable — \(R\) being a PID says nothing directly about \(R[x]\). Consider the ideal \((2,x)=\{2f(x)+xg(x): f,g\in\mathbb{Z}[x]\}\), the set of polynomials with even constant term. If \((2,x)=(h)\) for some \(h\in\mathbb{Z}[x]\), then \(h\mid2\) and \(h\mid x\). Since \(h\mid2\) in \(\mathbb{Z}[x]\), \(h\) is a constant (a nonconstant polynomial cannot divide the constant \(2\), by degree), so \(h=\pm1\) or \(\pm2\). If \(h=\pm1\), \((h)=\mathbb{Z}[x]\), but \(1\notin(2,x)\) (every element of \((2,x)\) has even constant term), contradiction. If \(h=\pm2\), \(x\notin(h)\) since \(x/2\notin\mathbb{Z}[x]\), contradiction. So no single generator works; \((2,x)\) needs (at least) two generators, and \(\mathbb{Z}[x]\) is not a PID — even though \(\mathbb{Z}[x]\) is still a UFD, by Gauss's theorem, illustrating the corollary that UFD does not require PID.