# Prove that $\mathbb{Z}$ is a UFD while $\mathbb{Z}[\sqrt{-5}]$ is not.

An integral domain $$R$$ is called a unique factorization domain (UFD) if every nonzero, nonunit element of $$R$$ can be uniquely written as a product of irreducible elements, up to reordering the factorization and taking associates of the irreducible factors (e.g. $$10 = (2)(5) = (-5)(-2)\in\mathbb{Z}$$).

$$1.$$ Prove that $$\mathbb{Z}$$ is a UFD.

$$2.$$ Prove that $$\mathbb{Z}[\sqrt{-5}]$$ is not a UFD.

I think $$1$$ is equivalent to the proving the uniqueness part of the Fundamental Theorem of Arithmetic.

As for $$2$$, $$5 = 1\cdot 5$$, where $$1$$ and $$5$$ are irreducible, and $$5 = (-1)\cdot (\sqrt{-5})^2$$, where $$(-1)$$ and $$(\sqrt{-5})$$ are also irreducible, so it has two distinct factorizations in $$\mathbb{Z}[\sqrt{-5}].$$ Thus, $$\mathbb{Z}[\sqrt{-5}]$$ is not a UFD. Do I need to prove that $$-1,1,5,\sqrt{-5}$$ are irreducible? And if not, is this proof still correct?

$$5$$ and $$-5=(\sqrt{-5})^2$$ are associates to each other. So your factorization not works!
Instead, note that $$6= 2\times 3=(1+\sqrt{-5}) \times (1-\sqrt{-5})$$ and all are irreducible and neither of them is associate to each other!
For 2: are really 1,-1 and 5 irreducible? Instead, note that $$2\cdot 3=6=(1+\sqrt{-5})\cdot(1-\sqrt{-5})$$