# How to prove $\mathbb{Z}[\sqrt{2}i]=\{a+b\sqrt{2}i\mid a,b\in\mathbb{Z}\}$ is a principal ideal domain?

How to prove $\mathbb{Z}[\sqrt{2}i]=\{a+b\sqrt{2}i\mid a,b\in\mathbb{Z}\}$ is a principal ideal domain? I can prove it is unique factorization domain.

Moreover, how to prove $\mathbb{Z}[\sqrt{n}i]=\{a+b\sqrt{n}i\mid a,b\in\mathbb{Z}\}$ is not unique factorization domain for all $n\geq 3$ hence they are not principal ideal domain?

-
– Siddharth Prasad Dec 22 '13 at 2:38
@SiddharthPrasad Asking whether it is a PID or not and asking whether it is a Euclidean domain or not are different. Moreover, the second question is far more difficult than the first. – Makoto Kato Dec 22 '13 at 2:57
@MakotoKato Fair enough, but unfortunately you can't flag multiple duplicates in a single question: math.stackexchange.com/questions/318543/… and math.stackexchange.com/questions/70976/… answer the second question, and I suspect $\text{ED}\implies\text{PID}\implies\text{UFD}$ has been asked somewhere. – Siddharth Prasad Dec 22 '13 at 3:03

Let $N(x)=|x|^2$ be a Euclidean function.

you should check that for any nonzero $a, b \in \mathbb{Z}[\sqrt{2}i]$, $N(a)\le N(ab)$. (Not hard. Just try!)

Next, for any $a, b \in \mathbb{Z}[\sqrt{2}i], b\neq 0$, we write $\frac{a}{b}=c+d\sqrt{2}i$, where $c,d \in \mathbb{Q}$.

Then there exist 2 integers $m, n$ such that $|m-c|<\frac12$ and $|n-d|<\frac12$.

We have $a=b(\frac ab)=b(c+d\sqrt{2}i)=b[(c-m)+m+((d-n)+n)\sqrt{2}i]$

$=bq+r$ where $q=m+n\sqrt{2}i$ and $r=b[(c-m)+(d-n)\sqrt{2}i]$.

(Note that $q,r\in \mathbb{Z}[\sqrt{2}i]$)

Then you can check simply that $N(r)\le N(b)$ when $r\neq 0$ and that $N(r)=0$ when $r=0$.

Hereby, we show that the ring is actually a Euclidean domain. By a theorem in any abstract algebra text, the ring is PID.

-

For the first part, prove that it's a Euclidean domain with Euclidean function $N(x)=|x|^2$. Then it follows that it's a PID.

-