For which $d<0$ is $\mathbb Z$ an Euclidean Domain?

This question already has an answer here:

  • Why is $\mathbb{Z}[\sqrt{-n}], n\ge 3$ not a UFD?

    2 answers

Solutions Collecting From Web of "For which $d<0$ is $\mathbb Z$ an Euclidean Domain?"

First of all, note that $\mathbb{Z}[\sqrt{d}] = \{ a + \sqrt{d}b \mid a,b \in \mathbb{Z} \}$ is not always equal to the usual ring of quadratic integers $\mathcal{O}(\sqrt{d})$, which consist of the largest subring of $\mathbb{Q}(\sqrt{d})$ for which its intersection with $\mathbb{Q}$ is the integers. If $d \equiv 1 \pmod{4}$, then $\mathcal{O}(\sqrt{d}) = \{ a + b \frac{1 + \sqrt{d}}{2} \mid a,b \in \mathbb{Z}\} = \{ a’ + b’ \sqrt{d}\}$, with either both $a’, b’$ integers, or both $a’,b’$ an integer plus $\frac{1}{2}$.

I will assume that the norm we use is $|a + b \sqrt{d} = a^2 – d b^2 = (a – \sqrt{d}b)(a + \sqrt{d}b)$, which is clearly multiplicative

For $\mathcal{O}(d)$, then it’s a Euclidean domain for $d = -11,-7,-3,-2,-1$, but if you consider $\mathbb{Z}(\sqrt{d})$, it’s indeed just $d = -1,-2$. This can actually be seen geometrically. These integers form a rectangular grid, and for any (not necessarily integer) point in this grid, there’s always an integer point within a distance of at most $|\frac{1}{2} + \frac{1}{2}\sqrt{d}|$. For $d = -1,-2$, this gives $\frac{1}{2}$ and $\frac{3}{4}$. If we now divide a number
$a = a_1 + a_2 \sqrt{d}$ by $b = b_1 + b_2 \sqrt{d}$, then we get a rational point $c = c_1 + c_2 \sqrt{d}$ in the grid, and there must exist an integer
point at distance less than 1. We thus have
\frac{a}{b} = c_1 + c_2 \sqrt{d} = q_1 + q_2 \sqrt{d} + r_1 + r_2 \sqrt{d}
with $q_1,q_2$ integers, and $r_1,r_2 \in [-\frac{1}{2},\frac{1}{2}]$. Now
a = bq + br
and since $|br| = |b||r| < |b|$, the euclidean property is satisfied.

Now for $d = -3,-5,\dots$, then the point $1 + \sqrt{d}$ divided by 2 gives a point at the center of a lattice rect, and so the distance from this point to any integer point is at least 1. It’s thus not possible to write $1 + \sqrt{d}$ as $2q + r$, with $|r| < 2$, which contradicts the definition of an Euclidean domain.