Unique Factorization Domains
When you were small you learned that every whole number breaks into primes in exactly one way:
60 = 2^2 \cdot 3 \cdot 5, and no clever regrouping will ever give you a
different set of prime factors. That fact — the
Fundamental
Theorem of Arithmetic — is so familiar that it feels like it must be true everywhere. It
is the bedrock under fractions, greatest common divisors, and half of number theory.
Now that we have rings,
the natural question is: does that theorem survive the leap to abstraction? Take some other
integral
domain — the Gaussian integers \mathbb{Z}[i], the polynomials
\mathbb{Q}[x], the exotic \mathbb{Z}[\sqrt{-5}].
Do the "primes" of that ring still assemble numbers in one and only one way? The astonishing answer is:
sometimes yes, sometimes no. The rings where unique factorization survives get a name
of their own — unique factorization domains, or UFDs — and this page is about exactly
where the line falls, and the famous ring where it snaps.
Two words that were the same in \mathbb{Z}
In \mathbb{Z} the word "prime" quietly does two jobs at once, and to
generalise correctly we have to prise them apart. First, though, one piece of vocabulary we cannot do
without: a unit is an element with a multiplicative inverse inside the ring. In
\mathbb{Z} the only units are \pm 1; in a field
every nonzero element is a unit. Units are the "trivial" factors — multiplying by one never
counts as a real factorization, just as 7 = 1 \cdot 7 tells you nothing.
Let R be an integral domain and p a nonzero
non-unit. Then:
-
Irreducible — p cannot be split at all: whenever
p = ab, one of a, b is a unit. (This is the
"you can't factor me further" property.)
-
Prime — p has the divides-a-product property:
whenever p \mid ab, either p \mid a or
p \mid b. (This is Euclid's lemma, promoted to a definition.)
-
Associates — a and b are
associates if a = ub for some unit u.
They are "the same up to units": in \mathbb{Z},
3 and -3 are associates.
In \mathbb{Z} these two notions of "prime" coincide, which is why school
never distinguishes them. In a general domain the relationship is one-directional:
prime always implies irreducible, but the converse can fail. A UFD is precisely a ring
civilised enough that the two words mean the same thing again.
The definition
An integral domain R is a unique factorization domain
(UFD) if every nonzero non-unit r \in R can be written
r = u \, p_1 p_2 \cdots p_n
with u a unit and each p_i irreducible, and
this factorization is unique up to:
- order — you may list the irreducible factors in any sequence;
-
associates — each p_i may be swapped for an associate
(an irreducible times a unit), with the leftover units absorbed into u.
Equivalently — and this is the clean characterisation — a domain is a UFD exactly when every element
factors into irreducibles and every irreducible is prime.
The two clauses matter separately. Existence says factorizations don't run away
forever (you always hit irreducibles and stop). Uniqueness says the destination
doesn't depend on the path. Drop uniqueness and arithmetic loses its footing — greatest common
divisors stop being well defined, and "the prime factorization" becomes "a prime factorization."
The ladder of nice rings
UFDs sit inside a tidy hierarchy of increasingly special integral domains. Each arrow is a genuine
theorem, and — importantly — every arrow is strict: there are rings that clear one bar
but not the next.
\text{Euclidean domain} \;\Rightarrow\; \text{PID} \;\Rightarrow\; \text{UFD}
\;\Rightarrow\; \text{integral domain}
-
A Euclidean
domain (one with a division algorithm) is a
principal ideal domain (every ideal is generated by one element).
- Every PID is a UFD — the division/ideal structure forces unique factorization.
- Every UFD is, by definition, an integral domain.
So the classics come for free: \mathbb{Z} (Euclidean, via the ordinary
division algorithm), any polynomial ring F[x] over a field (Euclidean, via
polynomial long division), and the Gaussian integers \mathbb{Z}[i]
(Euclidean, via the norm) are all UFDs. But watch the strictness. There is a second, sideways source of
UFDs that reaches rings the ladder misses:
If R is a UFD, then the
polynomial ring
R[x] is also a UFD.
Apply it with R = \mathbb{Z}: since \mathbb{Z} is
a UFD, so is \mathbb{Z}[x]. Yet \mathbb{Z}[x] is
not a PID — the ideal (2, x) needs two generators and can't
be collapsed to one. So \mathbb{Z}[x] is the poster child for the missing
arrow: UFD but not PID. Unique factorization is strictly weaker than "every ideal is
principal."
Warm-up: factoring in the Gaussian integers
Before the famous disaster, a happy example. In \mathbb{Z}[i] the ordinary
prime 5 is not irreducible — it splits:
5 = (2 + i)(2 - i).
How would you ever guess that? The trick that runs through this whole subject is the norm
N(a + bi) = a^2 + b^2, which is multiplicative:
N(zw) = N(z)N(w). It turns questions about factoring elements into questions
about factoring ordinary integers. Here N(2 + i) = 4 + 1 = 5, a rational
prime, so 2 + i can't be broken further — a nontrivial factor would have norm
strictly between 1 and 5 dividing
5, and there is none. Both 2 \pm i are irreducible,
and because \mathbb{Z}[i] is a UFD this is the factorization of
5, up to units (\pm 1, \pm i) and order.
The famous failure: \mathbb{Z}[\sqrt{-5}]
Now the ring that broke the dream. Work inside
\mathbb{Z}[\sqrt{-5}] = \{\, a + b\sqrt{-5} : a, b \in \mathbb{Z} \,\}. It is
a perfectly good integral domain — a subring of \mathbb{C}, no zero
divisors. And yet the number 6 factors into irreducibles in
two essentially different ways:
6 = 2 \cdot 3 = (1 + \sqrt{-5})(1 - \sqrt{-5}).
To be sure this is a real contradiction and not a trick of rearranging, we check two things with the
norm N(a + b\sqrt{-5}) = a^2 + 5b^2 (again multiplicative). First, that all
four factors are irreducible. Their norms are
N(2) = 4, \quad N(3) = 9, \quad N(1 \pm \sqrt{-5}) = 1 + 5 = 6.
Crucially, no element of \mathbb{Z}[\sqrt{-5}] has norm
2 or 3: the equation
a^2 + 5b^2 = 2 or = 3 has no integer solutions
(if b \neq 0 the norm is at least 5, and
a^2 = 2, 3 fails). So if, say, 2 = \alpha\beta
then N(\alpha)N(\beta) = 4 would force one factor to have norm
1 — a unit. Hence 2 is irreducible, and the same
norm argument handles 3 and 1 \pm \sqrt{-5}.
Second, that the two factorizations are not just associates in disguise. The units of
\mathbb{Z}[\sqrt{-5}] are only \pm 1 (a unit has
norm 1, and a^2 + 5b^2 = 1 forces
b = 0, a = \pm 1). Since 2 \neq \pm(1 \pm \sqrt{-5}),
the factor 2 is an associate of none of the right-hand factors. The
two factorizations are irreducibly, genuinely distinct. Unique factorization is dead in this ring.
Where prime and irreducible part ways
The failure above is the same coin, other side: in \mathbb{Z}[\sqrt{-5}]
there is an irreducible element that is not prime. Look at
2. We just proved it is irreducible. But is it prime? It divides the product
(1 + \sqrt{-5})(1 - \sqrt{-5}) = 1 - (-5) = 6 = 2 \cdot 3,
so 2 \mid (1 + \sqrt{-5})(1 - \sqrt{-5}). If 2
were prime it would have to divide one of the two factors. But
\frac{1 + \sqrt{-5}}{2} = \tfrac12 + \tfrac12\sqrt{-5} is not in the ring
(its coordinates aren't integers), and likewise for 1 - \sqrt{-5}. So
2 \nmid (1 + \sqrt{-5}) and 2 \nmid (1 - \sqrt{-5}):
2 is irreducible but not prime. That is exactly
why factorization can fork — irreducibles that lack the divides-a-product property don't have to line
up between rival factorizations.
In \mathbb{Z} you were taught they mean the same thing, and in any UFD they
do. But in a general integral domain only one direction always holds:
\text{prime} \;\Rightarrow\; \text{irreducible} \qquad (\text{always}),
and the reverse can fail — 2 \in \mathbb{Z}[\sqrt{-5}] is the standard
counterexample. The quick proof of the safe direction: if p is prime and
p = ab, then p \mid ab, so
p \mid a (say), giving a = pc and
p = pcb; cancelling (we're in a domain) forces
cb = 1, so b is a unit. The moral: always
prove irreducibility with the norm, and never assume an irreducible is prime unless
you already know you're in a UFD.
Do not read "unique factorization" as "one literal string of symbols." Even in
\mathbb{Z} you can write
6 = 2 \cdot 3 = (-2)(-3) = 3 \cdot 2,
and that is still counted as the same factorization — the reorderings and the sign flips
(multiplying by the units \pm 1) are exactly the freedom the theorem grants.
Uniqueness is a statement about the multiset of irreducibles modulo reordering and
associates. The \mathbb{Z}[\sqrt{-5}] disaster is a real violation precisely
because rearranging and unit-tweaking can never turn \{2, 3\}
into \{1 + \sqrt{-5},\, 1 - \sqrt{-5}\}.
In 1847 Gabriel Lamé announced a proof of Fermat's Last Theorem to the Paris Academy. His argument
factored x^p + y^p into linear pieces in a ring of
cyclotomic integers \mathbb{Z}[\zeta_p] and then reasoned as if
prime factorization there were unique. Joseph Liouville rose to point out the fatal gap — and indeed,
for many primes those rings are not UFDs, exactly the pathology we've been meeting.
Ernst Kummer had already seen it coming, and his repair changed mathematics forever.
If the numbers themselves won't factor uniquely, he reasoned, invent new objects — "ideal numbers" —
that do. Refined by Richard
Dedekind into the modern theory of ideals, this rescued unique
factorization by moving it from elements to ideals: in a ring of algebraic integers, every ideal
factors uniquely into prime ideals, even when the elements refuse. The humble collapse of
6 = 2 \cdot 3 = (1+\sqrt{-5})(1-\sqrt{-5}) is, quite literally, the seed of
algebraic number theory.