TITLE: Does $A$ a UFD imply that  $A[T]$ is also a UFD?
QUESTION [17 upvotes]: I'm trying to prove that $A$ a UFD implies that $A[T]$ is a UFD. 
The only thing I am sure I could try to use is Gauss's lemma.
Also, how can we deduce that the polynomial rings $\mathbb{Z}[x_1,\ldots,x_n]$ and $k[x_1,\ldots,x_n]$ are UFDs?

REPLY [18 votes]: There is a slick general way to do this by localization (usually credited to Nagata).  Suppose $\rm\:D\:$ is an atomic domain, i.e. nonzero nonunits factor into atoms (irreducibles). If $\rm\:S\:$ is a saturated submonoid of $\rm\:D^*$ (i.e. $\rm\,cd\in S\!\iff c,d\in S)\,$ and, furthermore, $\rm\,S\,$ is generated by primes, then $\rm\: D_S$ UFD $\rm\:\Rightarrow\:D$ UFD. $ $ This is often called Nagata's Lemma. 
This yields said slick proof of $\rm\:D$ UFD $\,\rm\Rightarrow D[x]$ UFD, viz. $\rm\:S = D^*\:$ is generated by primes, so localizing yields the UFD $\rm\:F[x],\:$ $\rm F =\:$ fraction field of $\rm\:D.\:$ Hence $\rm\:D[x]\:$ is a UFD, by Nagata. 
This yields a more conceptual / structural view of the essence of the matter (vs. the traditional argument by Gauss' Lemma). Moreover, the proof generalizes to various rings closely related to GCD domains, e.g. Riesz/Schreier rings, which provide refinement-based views of UFDs (which prove more convenient for noncommutative generalizations).