I would like to determine all units of the domain $\mathbb{Z}[\sqrt{2}]$.
Recall that if $D$ is an integral domain, then a unit of $D$ is an associate of the multiplicative identity $1$, i.e. $u \in D$ is a unit iff $u$ divides $1$ and $1$ also divides $u$. Equivalently, $u \in D$ is a unit iff it is a divisor of $1$, i.e. iff $\exists x \in D$ such that $ux=1$. Thus, units are also called invertible elements.
The set $\mathbb{Z}[\sqrt{2}] := \{a+b \sqrt{2}: a,b \in \mathbb{Z} \}$, under the usual addition and multiplication operations, forms a domain. How do I find all its units? Suppose $a+b \sqrt{2}$ is a unit. Then $(a+b \sqrt{2})(x+y \sqrt{2})=1$ for some $x,y \in \mathbb{Z}$. Thus, $ax+2by=1$ and $ay+bx=0$. Solving for $x,y$, we obtain that $x=\frac{a}{a^2 - 2b^2}$ and $y=\frac{-b}{a^2 - 2b^2}$ must be integers. How do I obtain the set of values of $a,b$ for which $x$ and $y$ are integral?
Since $(\sqrt{2}-1)(\sqrt{2}+1)= 2-1^2=1$, the two factors $\pm 1 + 1 \sqrt{2}$ are units. Can we systematically find all the units of $\mathbb{Z}[\sqrt{2}]$?
This answer given here to a related question shows only that if $a+b \sqrt{2}$ is a unit and is > 1, and if $a,b>0$, then $a+b \sqrt{2}$ is of the form $(1+\sqrt{2})^n$. The case where $a,b$ are of opposite signs, and the case where the unit is between 0 and 1 (such units exist, for eg, $3-2 \sqrt{2}$) are open.