Unique factorization in the polynomial ring in n variables is a crucial result for number theory and algebraic geometry. (The proof relies heavily on Gauss's Lemma so you might want to read that first.)

Theorem If R is a unique factorization domain then so is R[x].

Proof: Let k be the field of fractions of R. We know that k[x] is a UFD since it is a Euclidean ring. Now let f in R[x] be nonzero. Since k[x] is a UFD we can write


for c in k and each fi irreducible in k[x]. By adjusting c we can arrange that each fi is actually in R[x] and is primitive(1). Thus by Gauss's Lemma each fi is irreducible in R[x]. Write c=a/b with a,b in R and coprime. Then


Taking contents(1) of both sides we get bcontent(f)=a. Substituting and then cancelling we see that c is in R and we have written f as a product of irreducibles in R[x].

Suppose that f=dg1...gs is another such product. Since k[x] is a UFD we immediately deduce that r=s. After reordering, if necessary, we have that fi=aigi, for some ai in k. Looking at contents again one deduces that each ai is a unit of R, as required.

Corollary Let K be a field. Then the polynomial ring in n variables K[x1,...,xn] is a UFD.

Proof: K is a UFD. This gives the base for an induction with inductive step based on the previous theorem.

Note that K[x1,...,xn] is not a principal ideal domain, for n>=2, so this result is nontrivial. (To see this consider the ideal consisting of all polynomials with no constant term. If this ideal were to be principal its generator has to divide both x1 and x2 which are irreducible, so this is clearly impossible.)

(1) The terms primitive and content are defined in the Gauss's Lemma writup.