*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

*f=cf _{1}...f_{r}*

for *c* in *k* and each *f _{i}* irreducible
in

*k[x]*. By adjusting

*c*we can arrange that each

*f*is actually in

_{i}*R[x]*and is primitive

^{(1)}. Thus by Gauss's Lemma each

*f*is irreducible in

_{i}*R[x]*. Write

*c=a/b*with

*a,b*in

*R*and coprime. Then

*bf=af _{1}...f_{r}*

Taking contents^{(1)} of both sides we get *b*content(*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=dg _{1}...g_{s}* is another such product.
Since

*k[x]*is a UFD we immediately deduce that

*r=s*. After reordering, if necessary, we have that

*f*, for some

_{i}=a_{i}g_{i}*a*in

_{i}*k*. Looking at contents again one deduces that each

*a*is a unit of

_{i}*R*, as required.

**Corollary**
Let *K* be a field. Then the polynomial ring in
*n* variables *K[x _{1},...,x_{n}]*
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[x _{1},...,x_{n}]*
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

*x*and

_{1}*x*which are irreducible, so this is clearly impossible.)

_{2}

(1) The terms

**primitive**and

**content**are defined in the Gauss's Lemma writup.