Unique Factorization Domains

Why does every integer factor uniquely into primes? Yet in the ring Z[−5]\mathbb{Z}[\sqrt{-5}], the number 66 factors as both 2⋅32\cdot 3 and (1+−5)(1−−5)(1+\sqrt{-5})(1-\sqrt{-5}). There is no way to reconcile these. This single question — does unique factorization survive when we leave Z\mathbb{Z} — sits at the heart of algebraic number theory. It drove much of nineteenth-century ring theory. The failure of unique factorization in rings of integers was exactly the obstruction that stalled early attempts to prove Fermat's Last Theorem. Understanding it forced mathematicians to isolate the precise structural property that makes factorization work. The key realization is this. "Prime" and "irreducible" — indivisible in the naive sense — are two logically distinct notions in a general integral domain. Unique factorization holds exactly when they coincide appropriately. A Unique Factorization Domain (UFD) is defined by axiomatizing the behavior we take for granted in Z\mathbb{Z}. Every nonzero nonunit factors into irreducibles, and that factorization is unique up to order and units. This article develops the definition carefully. It separates irreducibility from primality. It proves the fundamental structural theorem that every Principal Ideal Domain is a UFD. This explains why Z\mathbb{Z}, Z[i]\mathbb{Z}[i], and F[x]F[x] for a field FF all enjoy unique factorization automatically. The big picture is a hierarchy of increasingly special integral domains: Fields ⊊\subsetneq Euclidean Domains ⊊\subsetneq PIDs ⊊\subsetneq UFDs ⊊\subsetneq Integral Domains. Each containment is strict. Understanding where a ring sits in this hierarchy tells you what algebraic tools are available. Unique factorization licenses arguments by "comparing prime factorizations." These are second nature in Z\mathbb{Z} but require justification everywhere else. This article gives the precise definitions of irreducible and prime elements. It proves that primes are always irreducible, while the converse can fail. It states and proves the UFD axioms carefully. It proves the central implication that PIDs are UFDs, using the ascending chain condition on principal ideals. It closes by pointing toward Gauss's Lemma and polynomial factorization over UFDs, where this machinery becomes indispensable.

Key takeaways
  • In a general integral domain, irreducible (cannot be factored nontrivially) and prime (generates a prime ideal) are different properties; prime always implies irreducible, but not conversely.
  • A UFD is an integral domain where every nonzero nonunit is a product of irreducibles, uniquely up to order and associates.
  • In a UFD, irreducible and prime elements coincide — this equivalence is itself a theorem, not part of the definition.
  • Every PID is a UFD: the proof uses the ascending chain condition on principal ideals (from Noetherian-ness of PIDs) to guarantee factorization exists, then uses primality of irreducibles in a PID to force uniqueness.
  • Z[−5]\mathbb{Z}[\sqrt{-5}] is a standard example of an integral domain that is not a UFD, showing the PID ⇒\Rightarrow UFD implication is not reversible in spirit (there exist UFDs that are not PIDs, e.g. Z[x]\mathbb{Z}[x]).
  • Key idea: unique factorization is equivalent to every irreducible element being prime, and this coincidence is guaranteed automatically once ideals are principal.

Where this lives today

Unique factorization domains are the algebraic backbone of several major areas. In algebraic number theory, the failure of unique factorization in rings of integers of number fields is measured by the class group, and Dedekind's theorem that ideals do factor uniquely into prime ideals (even when elements do not) is the modern repair of Kummer's original insight — this is one of the deepest classical results building directly on the distinction between prime and irreducible elements developed here. In polynomial algebra and computer algebra systems, the fact that F[x]F[x] is a UFD (as a Euclidean domain, hence a PID, hence a UFD by this theorem) underlies polynomial factorization algorithms used in symbolic computation software, and Gauss's Lemma extends unique factorization from R[x]R[x] down from Frac(R)[x]\mathrm{Frac}(R)[x] back to R[x]R[x] whenever RR itself is a UFD — this is exactly how one proves Z[x]\mathbb{Z}[x] is a UFD despite not being a PID. In cryptography, factorization-based hardness assumptions (RSA, and Gaussian-integer variants of primality testing) rely on unique factorization in Z\mathbb{Z} and Z[i]\mathbb{Z}[i] to guarantee well-defined notions of "prime" moduli. In coding theory, factorizations of polynomials over finite fields Fq[x]\mathbb{F}_q[x] (a UFD) determine cyclic code structure. In algebraic geometry, whether a coordinate ring is a UFD governs whether every codimension-one subvariety is cut out by a single equation — a geometric shadow of the algebraic uniqueness property proved here.

:::quiz[In Z[−5]\mathbb{Z}[\sqrt{-5}], why does 22 fail to be prime even though it is irreducible?]

  • 22 is not irreducible in Z[−5]\mathbb{Z}[\sqrt{-5}], so the question is moot
  • 22 divides 6=(1+−5)(1−−5)6=(1+\sqrt{-5})(1-\sqrt{-5}) but divides neither factor ✓
  • Z[−5]\mathbb{Z}[\sqrt{-5}] has no units other than 11, blocking primality
  • 22 has norm 66, matching neither factor's norm

:::faq[Why doesn't the existence-of-factorization argument work verbatim in Z[−5]\mathbb{Z}[\sqrt{-5}]?] It actually does work: Z[−5]\mathbb{Z}[\sqrt{-5}] does satisfy ACC on principal ideals (it is Noetherian, being a finitely generated Z\mathbb{Z}-module as a ring), so every nonzero nonunit does factor into irreducibles there. What fails is uniqueness, because Part I of the PID proof — "irreducible implies prime" — depended crucially on writing (p,a)(p,a) as a single principal ideal (d)(d), which is only guaranteed when every ideal of the ring is principal. In Z[−5]\mathbb{Z}[\sqrt{-5}] some ideals, like (2,1+−5)(2, 1+\sqrt{-5}), are not principal, so that step of the argument breaks down, and indeed irreducibles like 22 turn out not to be prime.

Ask the tutor: Can you show me why Z[x]\mathbb{Z}[x] is a UFD even though it isn't a PID, using Gauss's Lemma?

DefinitionIrreducible elements, prime elements, and Unique Factorization Domains

Let RR be an integral domain (a commutative ring with 1≠01 \neq 0 and no zero divisors).

Units and associates. An element u∈Ru \in R is a unit if uv=1uv = 1 for some v∈Rv \in R. Two elements a,b∈Ra, b \in R are associates if a=uba = ub for some unit uu.

Irreducible. A nonzero nonunit p∈Rp \in R is irreducible if whenever p=abp = ab with a,b∈Ra, b \in R, at least one of aa or bb is a unit. Equivalently, pp cannot be written as a product of two nonunits.

Prime. A nonzero nonunit p∈Rp \in R is prime if whenever p∣abp \mid ab for a,b∈Ra,b \in R, then p∣ap \mid a or p∣bp \mid b. Equivalently, pp is prime if and only if the principal ideal (p)(p) is a nonzero Prime Ideal.

Unique Factorization Domain (UFD). An integral domain RR is a unique factorization domain if: 1. (Existence) Every nonzero nonunit a∈Ra \in R can be written as a product of irreducibles:

a=p1p2⋯pn,n≥1, pi irreducible in R.a = p_1 p_2 \cdots p_n, \qquad n \geq 1, \ p_i \text{ irreducible in } R.

2. (Uniqueness) This factorization is unique up to order and associates: if

a=p1⋯pn=q1⋯qma = p_1 \cdots p_n = q_1 \cdots q_m

are two factorizations into irreducibles, then n=mn = m and, after reindexing, pip_i and qiq_i are associates for each ii.

Intuition

Think of an integral domain as a universe of "numbers" where multiplication behaves, but the notion of "divides evenly" may be looser than in Z\mathbb{Z}. Irreducibility is a syntactic condition: an element resists being split into two nontrivial factors. Primality is a semantic condition about how the element interacts with products: it can only divide a product by dividing one of the pieces. In Z\mathbb{Z} these two ideas trace out the same set of elements — that fusion is so automatic we rarely distinguish them. The whole subtlety of unique factorization theory is that this fusion is a theorem, true in nice rings like PIDs, and false in general. The picture to keep in mind: primes are the "well-behaved" atoms that never cause ambiguity when they divide a product, while irreducibles are merely atoms with respect to the multiplication operation, with no promise about how they interact with divisibility of products. The diagram below shows the containment of classes of rings, and where the logical implication proven in this article — PID ⇒\Rightarrow UFD — sits.

Figure
Hierarchy of integral domains: each ring class strictly contains the next
Integral Domains UFDs (e.g. ℤ[x]) PIDs (e.g. ℤ, F[x]) Euclidean Domains Fields Theorem: PID ⇒ UFD (proved below); ℤ[√−5] lies outside UFDs

Worked examples appear after the theorem, once the containment PID ⇒\Rightarrow UFD is proven rigorously.

LemmaPrime implies irreducible

Let RR be an integral domain and let p∈Rp \in R be prime. Then pp is irreducible.

Proof

Since pp is prime, by definition pp is a nonzero nonunit. Suppose p=abp = ab for some a,b∈Ra, b \in R. We must show aa or bb is a unit. Since p=abp = ab, we have p∣abp \mid ab (trivially, as ab=p⋅1ab = p \cdot 1). Because pp is prime, p∣ap \mid a or p∣bp \mid b. Without loss of generality suppose p∣ap \mid a, so a=pca = pc for some c∈Rc \in R. Substituting into p=abp = ab gives p=pcbp = pcb, so p(1−cb)=0p(1 - cb) = 0. Since RR is an integral domain and p≠0p \neq 0, we conclude 1−cb=01 - cb = 0, i.e. cb=1cb = 1. Hence bb is a unit. This shows that in any factorization p=abp = ab, one of the two factors is a unit, so pp is irreducible by definition. ■\blacksquare

∎
TheoremEvery Principal Ideal Domain is a Unique Factorization Domain

Let RR be a Principal Ideal Domain (an integral domain in which every ideal is principal). Then RR is a Unique Factorization Domain: every nonzero nonunit of RR factors into irreducibles, and this factorization is unique up to order and associates.

Proof

We break the proof into three parts: (I) irreducibles are prime in a PID, (II) every nonzero nonunit has some factorization into irreducibles (existence), and (III) uniqueness follows from (I). The proof technique for existence is a Noetherian induction / ascending chain argument, and for uniqueness a primality induction argument, mirroring Euclid's classical proof for Z\mathbb{Z}.

Part I: In a PID, every irreducible element is prime. Let p∈Rp \in R be irreducible. We show (p)(p) is a prime ideal. Since pp is a nonzero nonunit, (p)(p) is a proper nonzero ideal. Suppose p∣abp \mid ab for a,b∈Ra, b \in R; we must show p∣ap \mid a or p∣bp \mid b. Consider the ideal (p,a)={px+ay:x,y∈R}(p, a) = \{px + ay : x, y \in R\}. Since RR is a PID, (p,a)=(d)(p,a) = (d) for some d∈Rd \in R. Since p∈(d)p \in (d), we have d∣pd \mid p; because pp is irreducible, dd is either a unit or an associate of pp. Case 1: dd is a unit. Then (p,a)=(d)=R(p, a) = (d) = R, so 1=px+ay1 = px + ay for some x,y∈Rx, y \in R. Multiplying by bb:

b=pbx+aby.b = pbx + aby.

Since p∣abp \mid ab, write ab=pcab = pc. Then b=pbx+pcy=p(bx+cy)b = pbx + pcy = p(bx + cy), so p∣bp \mid b. Case 2: dd is an associate of pp, i.e. d=upd = up for a unit uu. Then (p,a)=(d)=(p)(p,a) = (d) = (p), so a∈(p)a \in (p), meaning p∣ap \mid a. In either case p∣ap \mid a or p∣bp \mid b, so pp is prime. This proves Part I.

Part II: Existence of factorizations. We first show RR satisfies the ascending chain condition (ACC) on principal ideals: there is no infinite strictly increasing chain

(a1)⊊(a2)⊊(a3)⊊⋯ .(a_1) \subsetneq (a_2) \subsetneq (a_3) \subsetneq \cdots.

Suppose such a chain existed. Let I=⋃i≥1(ai)I = \bigcup_{i \geq 1} (a_i). This is an ideal: if x,y∈Ix, y \in I then x∈(ai)x \in (a_i), y∈(aj)y \in (a_j) for some i,ji, j, and taking k=max⁡(i,j)k = \max(i,j), both lie in (ak)(a_k), so x−y∈(ak)⊆Ix - y \in (a_k) \subseteq I; closure under multiplication by RR is immediate since each (ai)(a_i) is an ideal. Since RR is a PID, I=(c)I = (c) for some c∈Rc \in R. Since c∈I=⋃(ai)c \in I = \bigcup (a_i), we have c∈(aN)c \in (a_N) for some NN. Then

I=(c)⊆(aN)⊆I,I = (c) \subseteq (a_N) \subseteq I,

forcing (aN)=(aN+1)=⋯=I(a_N) = (a_{N+1}) = \cdots = I, contradicting strictness of the chain at stage NN. Hence no such infinite chain exists: RR satisfies ACC on principal ideals. Now suppose, for contradiction, that some nonzero nonunit a∈Ra \in R has no factorization into irreducibles. Then in particular aa itself is not irreducible (else aa is its own one-term factorization), so a=a1b1a = a_1 b_1 with a1,b1a_1, b_1 both nonunits. At least one of a1,b1a_1, b_1 must also fail to have a factorization into irreducibles — otherwise multiplying their factorizations gives one for aa. Say a1a_1 has no factorization; note (a)⊊(a1)(a) \subsetneq (a_1), strictly, because b1b_1 is not a unit (if (a)=(a1)(a) = (a_1) then a1=ara_1 = ar for some rr, giving a1=a1b1ra_1 = a_1 b_1 r, so b1r=1b_1 r = 1, making b1b_1 a unit, a contradiction). Repeating this argument on a1a_1 produces a2a_2 with no factorization and (a1)⊊(a2)(a_1) \subsetneq (a_2), and so on, yielding an infinite strictly increasing chain

(a)⊊(a1)⊊(a2)⊊⋯ ,(a) \subsetneq (a_1) \subsetneq (a_2) \subsetneq \cdots,

contradicting the ACC on principal ideals just established. Hence every nonzero nonunit has a factorization into irreducibles. This proves Part II (existence).

Part III: Uniqueness of factorization. Suppose a∈Ra \in R is a nonzero nonunit with two factorizations into irreducibles:

a=p1p2⋯pn=q1q2⋯qm.a = p_1 p_2 \cdots p_n = q_1 q_2 \cdots q_m.

We induct on nn, the length of the first factorization. Base case n=1n = 1: Then a=p1=q1⋯qma = p_1 = q_1 \cdots q_m. Since p1p_1 is irreducible and q1⋯qmq_1 \cdots q_m has mm factors none of which is a unit, if m≥2m \geq 2 we could write p1=q1⋅(q2⋯qm)p_1 = q_1 \cdot (q_2 \cdots q_m) as a product of two nonunits, contradicting irreducibility of p1p_1. So m=1m = 1 and p1=q1p_1 = q_1; they are trivially associates (with unit 11). Inductive step: Suppose the uniqueness claim holds for all nonzero nonunits admitting an irreducible factorization of length less than nn. Since p1p_1 is irreducible, by Part I it is prime. From

p1∣p1p2⋯pn=q1q2⋯qm,p_1 \mid p_1 p_2 \cdots p_n = q_1 q_2 \cdots q_m,

and primality of p1p_1, p1p_1 divides one of the qiq_i; reindex so p1∣q1p_1 \mid q_1. Write q1=up1q_1 = u p_1 for some u∈Ru \in R. Since q1q_1 is irreducible and p1p_1 is not a unit, uu must be a unit (else q1=u⋅p1q_1 = u \cdot p_1 would be a factorization of q1q_1 into two nonunits). Thus p1p_1 and q1q_1 are associates. Cancel p1p_1 from both sides of

p1p2⋯pn=(up1)q2⋯qmp_1 p_2 \cdots p_n = (u p_1) q_2 \cdots q_m

using that RR is an integral domain (so nonzero elements are cancellable): p1≠0p_1 \neq 0 and

p1(p2⋯pn)=p1(u q2⋯qm)  ⟹  p2⋯pn=u q2⋯qm.p_1(p_2 \cdots p_n) = p_1 (u \, q_2 \cdots q_m) \implies p_2 \cdots p_n = u\, q_2 \cdots q_m.

Absorb the unit uu into q2q_2, replacing q2q_2 by uq2u q_2 (still irreducible, since associates of irreducibles are irreducible — if uq2=xyuq_2 = xy then q2=u−1xyq_2 = u^{-1}xy, forcing xx or yy to be a unit exactly when the same held for q2q_2). Now

p2⋯pn=(uq2)q3⋯qmp_2 \cdots p_n = (uq_2) q_3 \cdots q_m

is an equation between two irreducible factorizations of a nonzero nonunit, and the left side has length n−1<nn - 1 < n. By the inductive hypothesis, n−1=m−1n - 1 = m - 1 (so n=mn = m) and, after reindexing, pip_i is an associate of qiq_i for i=2,…,ni = 2, \ldots, n (with q2q_2 replaced by its associate uq2uq_2, whose associate class is the same as q2q_2's). Combined with p1∼q1p_1 \sim q_1 from above, this completes the induction. By induction, uniqueness holds for all nonzero nonunits of RR. Combined with Part II (existence), RR is a UFD. ■\blacksquare

∎
CorollaryIrreducible == prime in a UFD

If RR is a UFD, then an element p∈Rp \in R is irreducible if and only if it is prime.

Proof

Prime implies irreducible holds in any integral domain, giving one direction. For the converse, suppose pp is irreducible in the UFD RR and p∣abp \mid ab with ab=pcab = pc. Factor a,b,ca, b, c (or note if any is zero or a unit the claim is easy) into irreducibles and use uniqueness of the factorization of ab=pcab = pc: the irreducible pp appearing on the right must appear, up to associates, among the irreducible factors of aa or of bb on the left, since both sides are factorizations of the same element into irreducibles (after refining units). Hence pp divides aa or pp divides bb. (This argument specializes the proof of Part I of the PID implies UFD theorem, replacing the ideal-theoretic argument with a direct comparison of factorizations, which is available precisely because RR is a UFD.) ■\blacksquare

∎

Worked examples

Example 1: Factoring in Z[i]\mathbb{Z}[i], the Gaussian integers, a PID. Let R=Z[i]={a+bi:a,b∈Z}R = \mathbb{Z}[i] = \{a + bi : a, b \in \mathbb{Z}\}, which is known to be a Euclidean domain via the norm N(a+bi)=a2+b2N(a+bi) = a^2+b^2, hence a PID, hence by our theorem a UFD. Consider the element

a=50+50i∈Z[i].a = 50 + 50i \in \mathbb{Z}[i].

We factor aa into irreducibles two different-looking ways and confirm they agree up to units and reordering — units in Z[i]\mathbb{Z}[i] are {1,−1,i,−i}\{1, -1, i, -i\}. Route A. Factor out the obvious real integer content: 50+50i=50(1+i)=2⋅25(1+i)=2⋅52(1+i)50 + 50i = 50(1+i) = 2 \cdot 25 (1+i) = 2 \cdot 5^2 (1+i). Now 2=−i(1+i)22 = -i(1+i)^2 (check: (1+i)2=2i(1+i)^2 = 2i, and −i⋅2i=2-i \cdot 2i = 2), and 5=(2+i)(2−i)5 = (2+i)(2-i) since (2+i)(2−i)=4+1=5(2+i)(2-i) = 4+1 = 5. Both 1+i1+i and 2±i2\pm i are irreducible in Z[i]\mathbb{Z}[i] because their norms (22 and 55 respectively) are primes in Z\mathbb{Z}, and a Gaussian integer of prime norm must be irreducible (if it factored as a product of two nonunits, the norms — which are multiplicative — would give a nontrivial factorization of the prime norm in Z\mathbb{Z}, impossible). So:

50+50i=−i(1+i)2⋅52⋅(1+i)=−i(1+i)3[(2+i)(2−i)]2.50 + 50i = -i(1+i)^2 \cdot 5^2 \cdot (1+i) = -i(1+i)^3 \big[(2+i)(2-i)\big]^2.

Route B. Directly test divisibility: 50+50i=(1+i)(a+bi)50+50i = (1+i)(a+bi) requires (a+bi)=50+50i1+i=(50+50i)(1−i)2=50−50i+50i+502=1002=50(a+bi) = \frac{50+50i}{1+i} = \frac{(50+50i)(1-i)}{2} = \frac{50 - 50i + 50i +50}{2}= \frac{100}{2}=50. So 50+50i=(1+i)⋅50=(1+i)⋅2⋅5250+50i = (1+i)\cdot 50 = (1+i)\cdot 2\cdot 5^2. Continue factoring 2=−i(1+i)22 = -i(1+i)^2 and 5=(2+i)(2−i)5 = (2+i)(2-i) exactly as before, arriving at the same multiset of irreducibles:

{(1+i)×3, (2+i)×2, (2−i)×2}\{(1+i)^{\times 3},\ (2+i)^{\times 2},\ (2-i)^{\times 2}\}

up to the unit −i-i, confirming uniqueness as guaranteed by the theorem, regardless of the order in which factors were extracted.

Example 2: The non-example Z[−5]\mathbb{Z}[\sqrt{-5}] is not a UFD — sanity-checking why the PID hypothesis matters. Let R=Z[−5]={a+b−5:a,b∈Z}R = \mathbb{Z}[\sqrt{-5}] = \{a + b\sqrt{-5} : a, b \in \mathbb{Z}\}, with norm N(a+b−5)=a2+5b2N(a+b\sqrt{-5}) = a^2 + 5b^2, multiplicative: N(xy)=N(x)N(y)N(xy) = N(x)N(y). Consider 6∈R6 \in R. We exhibit two genuinely different factorizations into irreducibles:

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

Check: (1+−5)(1−−5)=1−(−5)=6(1+\sqrt{-5})(1-\sqrt{-5}) = 1 - (-5) = 6. Good. We must verify each of 2,3,1+−5,1−−52, 3, 1+\sqrt{-5}, 1-\sqrt{-5} is irreducible, and no two of them are associates. Compute norms: N(2)=4N(2) = 4, N(3)=9N(3) = 9, N(1+−5)=1+5=6N(1+\sqrt{-5}) = 1 + 5 = 6, N(1−−5)=6N(1-\sqrt{-5}) = 6. Irreducibility of 22: if 2=xy2 = xy with x,yx,y nonunits, then N(x)N(y)=4N(x)N(y) = 4 with N(x),N(y)>1N(x), N(y) > 1 (norm 11 forces a unit, since a2+5b2=1a^2+5b^2=1 only for (a,b)=(±1,0)(a,b)=(\pm1,0), giving units ±1\pm 1), so N(x)=N(y)=2N(x) = N(y) = 2. But a2+5b2=2a^2+5b^2 = 2 has no integer solutions (checking b=0b=0 gives a2=2a^2=2, impossible; ∣b∣≥1|b|\geq 1 already exceeds 22). So 22 is irreducible. Irreducibility of 33: similarly N(x)N(y)=9N(x)N(y)=9 forces N(x)=N(y)=3N(x)=N(y)=3, and a2+5b2=3a^2+5b^2=3 has no solution. So 33 is irreducible. Irreducibility of 1±−51\pm\sqrt{-5}: a nontrivial factorization would force norm factors N(x)N(y)=6N(x)N(y)=6 with both >1>1, i.e. {2,3}\{2,3\}; but we just showed no element has norm 22 or norm 33. So 1±−51\pm\sqrt{-5} are irreducible. No two are associates: the only units are ±1\pm1 (norm 11), so associates of 22 are ±2\pm 2, of 33 are ±3\pm3, and 1±−51\pm\sqrt{-5} have norm 6≠4,96\neq 4, 9, so they cannot be associates of 22 or 33; and 1+−51+\sqrt{-5} is not ±(1−−5)\pm(1-\sqrt{-5}). Hence 66 has two factorizations into irreducibles, 2⋅32\cdot 3 and (1+−5)(1−−5)(1+\sqrt{-5})(1-\sqrt{-5}), that are not related by reordering and units. So Z[−5]\mathbb{Z}[\sqrt{-5}] is not a UFD — and by our theorem (contrapositive), it cannot be a PID either. Indeed, one can show the ideal (2,1+−5)(2, 1+\sqrt{-5}) is not principal, consistent with this.

CounterexampleDropping the PID hypothesis: existence of factorization can fail entirely

The theorem requires RR to be a PID. If we only assume RR is an integral domain — dropping the hypothesis that every ideal is principal — factorization into irreducibles can fail to exist at all, not merely fail to be unique. Consider R={R = \{ functions expressible via the ring of algebraic integers in a number field with infinitely many prime factors available, or more simply: R=OR = \mathcal{O}, the ring of all algebraic integers (algebraic numbers satisfying a monic polynomial with integer coefficients). This RR is an integral domain (subring of Q‾\overline{\mathbb{Q}}), but it has no irreducible elements whatsoever: given any nonzero nonunit a∈Ra \in R, one can always write a=a⋅aa = \sqrt{a} \cdot \sqrt{a}, and a\sqrt{a} is again an algebraic integer (it satisfies x2−a=0x^2 - a = 0 shifted appropriately) and is not a unit whenever aa is not, since norms strictly decrease. Iterating, aa factors forever into nonunits, so aa can never be written as a finite product of irreducibles — existence of factorization fails completely. This shows the ACC on principal ideals (which we derived from the PID hypothesis and used crucially in Part II of the proof) is not a free lunch: R=OR = \mathcal{O} is very far from Noetherian, and without some finiteness hypothesis like ACC, factorizations need not exist, so the UFD property collapses at the most basic level.

Scope, edge cases & common traps

SituationWhat holdsWhat can fail
RR a fieldVacuously a UFD (no nonzero nonunits to factor)N/A
RR a PIDUFD, by the theorem above—
RR a UFDIrreducible   ⟺  \iff primeRR need not be a PID (e.g. Z[x]\mathbb{Z}[x] is a UFD, not a PID)
RR merely an integral domainIrreducibles may existFactorizations may not exist, or may not be unique
RR non-Noetherian domain—Existence of factorization can fail entirely (e.g. O\mathcal{O}, algebraic integers)

The mathematician behind it

Origins · 1 minErnst Eduard Kummer and how this was discovered
EE
Ernst Eduard Kummer
1810–1893 · German mathematician, University of Berlin and Breslau

Kummer's investigations into Fermat's Last Theorem in the 1840s led him to work in rings of cyclotomic integers Z[ζp]\mathbb{Z}[\zeta_p], where he discovered that unique factorization into ordinary elements could fail, mirroring the phenomenon later exhibited concretely in Z[−5]\mathbb{Z}[\sqrt{-5}]. To repair this, he introduced "ideal numbers," a precursor to Dedekind's theory of ideals, restoring unique factorization at the level of ideals even when it fails at the level of elements. This work — connecting failure of the UFD property directly to deep number-theoretic questions — is the historical origin of the entire theory formalized in this article.

History
- 1843–1846: Kummer introduces "ideal numbers" to restore unique factorization in cyclotomic integer rings, after discovering ordinary factorization can fail.
- 1871: Richard Dedekind formalizes the modern notion of an ideal, recasting Kummer's ideal numbers as genuine subsets of a ring, and proves unique factorization of ideals into prime ideals in rings of integers.
- 1893: Kummer dies; his methods have already reshaped the emerging theory of algebraic numbers and ideal theory.
- Early 1900s: The abstract axiomatic notion of a ring, and subsequently of a UFD, crystallizes in the work of Emmy Noether and others, separating the element-level UFD property from the ideal-level Dedekind domain property.
- 1920s–1930s: The PID ⇒\Rightarrow UFD theorem, together with the analogous polynomial-ring results (foreshadowing Gauss's Lemma), becomes standard material in the developing structural theory of commutative rings.
Are "prime" and "irreducible" ever literally the same definition?

No — they are defined differently even though they coincide in many familiar rings. Irreducible is defined purely multiplicatively: pp cannot be split into two nonunit factors. Prime is defined via divisibility of products: p∣ab⇒p∣ap \mid ab \Rightarrow p\mid a or p∣bp \mid b, equivalently (p)(p) is a nonzero prime ideal. The lemma proved in this article shows prime always implies irreducible in any integral domain, but the converse requires extra structure — it holds in UFDs (by definition, essentially, once uniqueness is available) and hence in PIDs, but fails in general domains like Z[−5]\mathbb{Z}[\sqrt{-5}].

Why does the definition of UFD require uniqueness "up to order and associates" rather than exact uniqueness?

Because factorization can never be exactly unique in any ring with more than one unit. For instance in Z\mathbb{Z}, 6=2⋅3=(−2)⋅(−3)6 = 2\cdot 3 = (-2)\cdot(-3), and reordering 2⋅3=3⋅22\cdot3 = 3\cdot 2 is also unavoidable. The phrase "up to order and associates" precisely quotients out these harmless ambiguities — swapping the order of multiplication (which is always commutative) and multiplying factors by units (which doesn't change what they generate as ideals) — while still capturing the meaningful uniqueness: the multiset of associate-classes of irreducible factors is an invariant of the element.

Is every Euclidean domain automatically a UFD?

Yes, but through an intermediate step: every Euclidean domain is a PID (the standard proof uses the division algorithm to show any ideal is generated by an element of minimal norm), and this article's theorem then shows every PID is a UFD. So Euclidean domain ⇒\Rightarrow PID ⇒\Rightarrow UFD, but not every UFD is Euclidean or even a PID — Z[x]\mathbb{Z}[x] again being the standard example of a UFD sitting strictly outside the PID class.

Does UFD imply Noetherian, or is that a separate assumption?

UFDs need not be Noetherian in general — the existence part of the UFD axiom only requires that finite factorizations into irreducibles exist and are unique, which is a weaker condition than ACC on all ideals. However, every UFD does satisfy ACC on principal ideals (essentially by the same infinite-descent argument used in Part II of the PID proof, run in reverse), because otherwise factorization existence itself would fail. Full Noetherian-ness (ACC on all ideals, not just principal ones) is a strictly stronger hypothesis than being a UFD.

How does this connect to Gauss's Lemma and polynomial factorization?

If RR is a UFD, one can ask whether the polynomial ring R[x]R[x] is also a UFD — this is not automatic from our PID theorem, since R[x]R[x] is typically not a PID even when RR is (e.g. Z[x]\mathbb{Z}[x]). Gauss's Lemma supplies exactly the missing tool: it shows that a polynomial in R[x]R[x] that is irreducible in R[x]R[x] remains irreducible in Frac(R)[x]\mathrm{Frac}(R)[x] (and controls the reverse direction too), letting one transfer the UFD property of the PID Frac(R)[x]\mathrm{Frac}(R)[x] back down to R[x]R[x]. This is how one proves Z[x]\mathbb{Z}[x] and F[x1,…,xn]F[x_1,\ldots,x_n] are UFDs despite not being PIDs, directly building on the definitions and the prime/irreducible distinction established here.

Can an element be neither prime nor irreducible, and does that matter for the definition?

Yes — units and zero are neither prime nor irreducible by definition (both notions are defined only for nonzero nonunits), and this exclusion is deliberate. If units were allowed to be "irreducible," factorizations would never be unique, since you could always insert extra unit factors; excluding 00 avoids degenerate statements like "00 divides every product." The UFD definition is carefully scoped to nonzero nonunits precisely so that the existence and uniqueness clauses are meaningful and the coincidence with primality (proved in the corollary) is a clean, checkable statement.

Before this

Where this leads