$\mathbb Z[\sqrt{-5}]$ is not a UFD [duplicate]
Solution 1:
In a UFD, an element is irreducible if and only if it is prime.
Observe that $2$ is irreducible in $\mathbb Z + \mathbb Z\sqrt{-5}$: Suppose $$2 = (a + b \sqrt{-5})(c + b \sqrt{-5}),$$ taking the norm of both sides gives us $$4 = (a^2 + 5b^2)(c^2 + 5d^2)$$ which means $a^2 + 5b^2 = 1, 2$ or $4$. If $a^2 + 5b^2 = 1$, then $a = 1$ and $b = 0$ which means $a + b \sqrt{-5} = 1$ which is a unit and we're done. If $a^2 + 5b^2 = 4$, then $a = 2$ and $b = 0$ which means $$c + d \sqrt{-5} = \frac{2}{a + b\sqrt{-5}} = \frac{2}{2} = 1,$$ a unit, which means we're done. Notice that $a^2 + 5b^2 = 2$ can never happen: $b$ will have to be zero because if it's not, then the sum is greater than 5, which means it's greater than $2$, which means $a^2 = 2$ which only holds when $a = \sqrt 2 \notin \mathbb Z$, so this case can't occur. Conclude by definition that $2$ is irreducible in $\mathbb Z + \mathbb Z \sqrt{-5}$.
Observe that $2 \mid 6 = (1 + \sqrt{-5})(1 - \sqrt{-5})$ but $2 \nmid (1 + \sqrt{-5}), (1 - \sqrt{-5})$.
Say, by way of contradiction, that $2 \mid 1 + \sqrt{-5}$, then there exist $a, b \in \mathbb Z$ such that $1 + \sqrt{-5} = 2(a + b \sqrt{-5})$ which means $2a = 1$ and $2b = 1$ which can only happen if $a = b = 1/2 \notin \mathbb Z$, a contradiction. Similar reasoning works for $1 - \sqrt{-5}$.
Conclude that $2$ is not prime, but it is irreducible. Hence we're not in a unique factorization domain.
Solution 2:
We can write two decompositions of $6$: $$6=2\cdot 3=(1+\sqrt{-5})(1-\sqrt{-5})$$ All factors are irreducible, since their norms can't be decomposed as the product of two norms $\neq 1$ and the factors on the rhs are not associated with the factors on the lhs, since their norms are different.
This proves $\mathbf Z[\sqrt{-5}]$ does not have unique factorisation.