About the localization of a UFD 
I was wondering, is the localization of a UFD also a UFD? 

How would one go about proving this? It seems like it would be kind of messy to prove if it is true.
If it is not true, what about localizing at a prime? Or what if the UFD is Noetherian?

I'll provide a solution based on hints in Aluffi (V.4.15). Suppose $R$ is UFD and $S$ is a multiplicatively closed subset. $S$ cannot contain $0$ (otherwise $S^{-1}R=0$), and since $R$ is integral domain, $\frac{r_1}{s_1}=\frac{r_2}{s_2}$ in $S^{-1}R$ implies $r_1s_2=r_2s_1$.
Claim 1: if $q\in R$ is irreducible, then $q/1$ is irreducible in $S^{-1}R$.
Let $\frac{q}{1}=\frac{r_1}{s_1}\frac{r_2}{s_2}$, then $s_1s_2q=r_1r_2.$ Since the multiset of irreducibles of $r_1r_2$ contains $q$, either $r_1=rq$ for some $r\in R$, or $r_2=rq$ for some $r\in R$. In the first case the multiset of irrecudibles of $r_2$ is contained in the multiset of irreducibles of $s_1s_2$, so $\exists r, r_2r=s_1s_2$, so $\frac{r_2}{s_2}\frac{r}{s_1}=\frac{1}{1}$, so $\frac{r_2}{s_2}$ is a unit and $q/1$ is irreducible. The second case is similar.$\Box$
Claim 2: if $a/s\in S^{-1}R$ is irreducible, then $a/s$ is an associate of $q/1$ for some irreducible $q\in R$.
$a/s$ is an associate of $a/1$ since $s/1$ is a unit in $S^{-1}R$. Since associate of irreducible is still irreducible, $a/1$ is irreducible. Since $R$ is UFD, we can write $a=q_1q_2...q_n$ where all $q_i$ are irreducible. Then $\frac{a}{1}=\frac{q_1}{1}\frac{q_2}{1}...\frac{q_n}{1}$. Since $\frac{a}{1}$ is irreducible, and since associate of irreducible is irreducible, we can argue inductively to get that $\frac{a}{1}$ is associate of $\frac{q_i}{1}$ for some $i$.$\Box$
To see $S^{-1}R$ is a UFD, we first show factorization exists. For any $a/s\in S^{-1}R$ and $a/s$ not a unit and not zero, it suffices to show $a/1$ has factorization into irreducibles since $1/s$ is a unit. Note $a$ is nonzero, nonunit in $R$. (If it is unit, then $\frac{a}{s}\frac{a^{-1}s}{1}=\frac{1}{1}$ and $\frac{a}{s}$ is a unit, contradiction). Thus $a$ can be written as product of irreducibles, then using Claim 1 we see that $a/1$ can be written as a product of irreducibles.
Finally, to show factorization is unique. suppose $\frac{r_1}{s_1}...\frac{r_n}{s_n}=\frac{r'_1}{s'_1}...\frac{r'_m}{s'_m}$ where the fractions are irreducible. Using Claim 2, we can write $\frac{r}{s}\frac{q_1}{1}...\frac{q_n}{1}=\frac{q'_1}{1}...\frac{q'_m}{1}$ where $\frac{r}{s}$ is a unit and $\frac{r_i}{s_i}$ is an associate of $\frac{q_i}{1}$ and $\frac{r'_i}{s'_i}$ is an associate of $\frac{q'_i}{1}$, and $q_i$ and $q'_i$ are all irreducble in $R$. Thus
$$rq_1...q_n=sq'_1...q'_m \quad (*)$$
Each $q_i$ cannot divide any element in $S$ because otherwise $\frac{q_i}{1}$ is a unit, contradiction with the fact that it is irreducible. Thus the multiset of irreducibles of $q_1...q_n$ is contained in the multiset of irreducibles of $q'_1...q'_m$.
Since $\frac{r}{s}$ is a unit $\exists \frac{r'}{s'}, \frac{r}{s}\frac{r'}{s'}=\frac{1}{1}$, that is, $rr'=ss'$. Multiply both sides of $(*)$ by $r'$ we get $ss'q_1...q_n=sr'q'_1...q'_m$. Note $ss'\in S$ as $S$ is multiplicative, then by similar argument as in the previous paragraph we get that the multiset of irreducibles of $q_1'...q'_m$ is contained in the multiset of irreducibles of $q_1...q_n$. Thus $m=n$, and $q_i=q'_i$ after relabeling. Thus $(\frac{r_i}{s_i})=(\frac{q_i}{1})=(\frac{q'_i}{1})=(\frac{r'_i}{s'_i})$, so factorization is unique. Thus $S^{-1}R$ is UFD.
