Let
R be a
commutative integral domain.
R is a
unique factorization domain (or UFD) if

Every element of
R which is not zero or a unit can be written as a product of
irreducible elements of R.
 This expression is
unique in the sense that if we write
c=a_{1}...a_{r}=b_{1}...b_{s}
in R, for some nonzero nonunit c, with each a_{i}
and b_{j} irreducible, then we have r=s and
after renumbering the a_{i} if necessary we have that
each a_{i} is an associate of b_{j}.
Of course, the fundamental theorem of arithmetic asserts that the ring
of integers Z is a UFD.
Proposition Any principal ideal domain is a UFD.
After the Proposition and the principal ideal domain writeup we know
that besides the ring of integers we have several examples
of UFDs. The ring of Gaussian integers Z[i] is a UFD and so is
the polynomial ring k[x], for any field k.
Proof of the Proposition
Let R be a PID. I first claim that every
nonzero nonunit a in R can be
factorized as product of irreducibles. If a is irreducible
there is nothing to prove. If not then we can write
a=a_{1}b_{1} with a_{1},b_{1}
nonunits. If a_{1},b_{1} are both irreducible
we are done. Suppose that a_{1} is not.
Then we factorize a_{1}=a_{2}b_{2},
as a product. We repeat
this until we have expressed a as a product of irreducibles.
Thus we will have a=a_{1}b_{1}=a_{2}b_{1}b_{2}...
We have to show that this process terminates. Write a_{0}=a.
Then associated to our factorization attempt we have the increasing sequence of
ideals a_{0}R < a_{1}R < a_{1}R < ....
Our factorisation attempt terminates if this chain terminates.
Let I be the union of these ideals. Because this sequence
is increasing it is not hard to see that I is also an ideal.
Since R is a PID this means that I=bR. Now b
has to be in one of the ideals a_{i}R (by the definition
of I). Thus
b=a_{i}r, say.
But a_{i}
must lie in I. It follows from this that b and
a_{i} are associates. Clearly then a_{j}R=a_{i}R
for any j>=i, as required to show the existence of factorizations.
We now have to show that factorizations are unique. But we know
(since we have a PID) that the concepts of primeness and
irreducibility coincide. Thus it is easy to adapt the familiar
proof of the fundmental theorem of arithmetic to this case.