Factoring in $\mathbb{Z}[\sqrt{2}]$ How would one factor a number, say $9+4\sqrt{2}$ in $\mathbb{Z}[\sqrt{2}]$?
This is what I've attemped to do:
$$(a_1+b_1\sqrt{2})(a_2+b_2\sqrt{2}) $$
$$a_1a_2+a_1b_2\sqrt{2}+a_2b_1\sqrt{2}+2b_1b_2$$
Thus,
\begin{eqnarray}
a_1a_2+2b_1b_2&=&9 \\
a_1b_2+a_2b_1 &=& 4.
\end{eqnarray}
But this results in 4 variables and only 2 equations.
 A: The point is, of course, that you want to factor into primes. The norm in $\mathbb{Z}[\sqrt{2}]$ is $N(a+b\sqrt 2)=a^2-2b^2$, so $N(9+4\sqrt 2)=49$ and we only have to worry about primes of norm $\pm 7$. So, when does $a^2-2b^2=\pm 7$ with $a,b$ integers? Well, $(3,1)$ looks tempting, but doesn't work. So we simply take the conjugate of $3+\sqrt 2$, which must be in the other prime dividing $7$. And indeed, $(3-\sqrt 2)(5+3\sqrt 2)$ is the desired factorization. Note $3-\sqrt 2$ must be an associate of $1+2\sqrt 2$, which figured in the other suggested factorization.
A: Not all numbers can be factored in $\mathbb{Z}[\sqrt{2}]$, it has also $\mathbb{Z}[\sqrt{2}]$-prime numbers, like $3$ or $\sqrt{2}$.  Besides, other numbers have many factorisation.  For example numbers of $\mathbb{z}$ like $60$ which have at least all the $\mathbb{Z}$ like factorisation, like $10\cdot6$ or $12\cdot5$.
So there's no unique solution.  There might even be no non-trivial solution.
You have two $\mathbb{Z}$-degree of freedom too much.  Try to proceed carefully, and deduce the value of two variables from the value of two others.
You'd probably have to check existence condition to avoid divide by $0$ and since your equations are quadratic, you'll likely end up with square roots.
So basically you're be in a problem of finding whether some formulas can be made to be a integer square.
Sidenote: For example if you where in $\mathbb{Z}$, you're basically trying to solve something like $a \cdot b = 17$.  It's not always possible to solve non-trivially and sometimes there are many solutions, like in $a \cdot b = 60$.
Remark: You may want to do a prime factorization.  In which case you have to compute the prime factor first, and would probably be better off asking another question.
