# Unique representations in quadratic integer rings $\mathbb{Z}[\omega]$

Let $$D$$ be a squarefree integer and consider the ring $$\mathbb{Z}[\omega]=\{a+b\omega: a,b \in \mathbb{Z}\}$$ with

$$\omega = \begin{cases}\sqrt{D} \quad D \equiv_4 2,3\\ 1/2(1+\sqrt{D}) \quad D \equiv_4 1\end{cases}$$

I'm trying to show that every element in this ring has a unique representation of the form $$a+b\omega$$. For this, it sufficies to show that

$$a+b\omega = 0 \implies a = 0 = b$$

Here is my proof:

Suppose $$b \neq 0$$ and thus also $$a \neq 0$$. By dividing out common factors, we may assume that $$(a,b) = 1$$ and $$b \geq 1$$. Let's consider the case $$D \equiv_4 2,3$$.

We then see that $$a= -b\sqrt{D}$$ and hence $$D = (a/b)^2$$. It is not possible that $$b = 1$$, or this would imply that $$D$$ is not squarefree. Thus $$b > 1$$ and $$a/b$$ is a real fraction (we can't divide out the denominator because $$a$$ and $$b$$ have no common factors). Hence, $$(a/b)^2$$ is a real fraction (squaring does not introduce new factors that can be canceled out). This contradicts the assumption that $$D$$ is an integer.

Is this correct? It looks like I'm overcomplicating things.

Let's now look at the case that $$D \equiv_4 1$$. Then we have

$$2a= -b(1+ \sqrt{D}) = -b -b\sqrt{D}\implies \left(\frac{2a+b}{b}\right)^2 = D$$

and then I'm stuck. Any ideas?

More simply, in both cases $$\,\omega\,$$ is a rational root of a monic quadratic $$\,f(x)\in\Bbb Z[x]\,$$ so $$\,\omega\in\Bbb Z\,$$ by the Rational Root Test. This implies $$\,\sqrt D\in\Bbb Z,\,$$ contra hypothesis.

Remark  Generally an algebraic number is defined to be an algebraic integer if it is a root of a polynomial $$\,f(x)\in\Bbb Z[x]\,$$ that is monic (lead coef $$= 1).\,$$ So applying RRT as above we deduce that

$$\text{ a rational } r\, \text{ is an algebraic integer} \iff r\ \text{ is an integer}\qquad$$

See here for some motivation of the definition of an algebraic integer.

• What is the rational root test?
– user661541
Aug 5, 2019 at 15:41
• @user661541 I added a link, and some motivation. Aug 5, 2019 at 15:59
• @user661541 To be rigorous you'd need justify the claim that $\,q= a/b\not\in \Bbb Z\,\Rightarrow\, q^2\not\in \Bbb Z.\,$ You can find various poofs here. Aug 5, 2019 at 23:07
• @user661541 You might also find helpful the discussion in the comments here, about a very common basic error made in such proofs. Aug 5, 2019 at 23:53
• @user661541 Yes, that was the point of my 2nd-last comment. Aug 6, 2019 at 12:52

In either case, you have shown that $$D$$ is a rational square that is assumed to be an integer, so it is an integer square.

The key point is that $$\omega$$ is irrational (*). Once you know that, $$a+b\omega=0$$ implies $$a=b=0$$ because $$b\ne0$$ implies that $$\omega$$ is rational.

(*) This boils down to $$\sqrt D$$ being irrational, which follows from $$D$$ being a squarefree integer.