Proving $\mathbb{Z}[\sqrt {10}]$ is not a UFD 
I am wondering how to show that $\mathbb{Z}[\sqrt {10}]$ is not a UFD. 

My only idea is to show that there are two factorizations of $10$, say, $ab, uv$ such that $a$ is not a unit times $u$ or $v$. In this ring $10=2\cdot5=\sqrt {10}\cdot \sqrt {10}$, so it suffices to show $2$ is not a unit times $\sqrt {10}$. Suppose $2=\sqrt {10}(a+b\sqrt{10})=a\sqrt{10}+10b$. Then $a=0$ since $\sqrt{10}$ is not rational. So $10b=2$, which has no integer solutions. So $\mathbb{Z}[\sqrt {10}]$ is not a UFD.
Is my reasoning correct? What are the flaws?
 A: There is a small problem with your solution, since you don't know that $\sqrt{10}$ is irreducible, and so $2$ and $\sqrt{10}$ could have a common factor.  The standard approach to deal with this is to use norms.
Define the norm $N(a+b\sqrt{10})=(a+b\sqrt{10})(a-b\sqrt{10})=a^2-10b^2$.  The norm satisfies the property that $N(xy)=N(x)N(y)$.
The first observation is that $x$ is a unit if and only if $N(x)=\pm 1$, because $N(x)$ is a multiple of $x$ and $1=N(1)=N(xx^{-1})=N(x)N(x^{-1})$, and the only integer divisors of $1$ are $\pm 1$.
With this in mind, we can calculate $N(2)=4$ and $N(\sqrt{10})=-10$, and since the norms aren't multiples of each other, the numbers can't be multiples of each other.  If they had a common non-unit factor, though, it would have to have norm $\pm 2$. So let us show that there are no elements with norm $\pm 2$.
Suppse $a^2-10b^2=\pm 2$.  Reducing mod 10, we get $a^2\equiv \pm 2 \pmod{10}$, but no perfect square ends with a 2 or an 8, so this has no solutions.
