Let R be a commutative integral domain. R is a unique factorization domain (or UFD) if
  1. Every element of R which is not zero or a unit can be written as a product of irreducible elements of R.
  2. This expression is unique in the sense that if we write c=a1...ar=b1...bs in R, for some nonzero non-unit c, with each ai and bj irreducible, then we have r=s and after renumbering the ai if necessary we have that each ai is an associate of bj.

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=a1b1 with a1,b1 non-units. If a1,b1 are both irreducible we are done. Suppose that a1 is not. Then we factorize a1=a2b2, as a product. We repeat this until we have expressed a as a product of irreducibles. Thus we will have a=a1b1=a2b1b2...

We have to show that this process terminates. Write a0=a. Then associated to our factorization attempt we have the increasing sequence of ideals a0R < a1R < a1R < .... 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 aiR (by the definition of I). Thus b=air, say. But ai must lie in I. It follows from this that b and ai are associates. Clearly then ajR=aiR 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.