Norm $N$ on $\Bbb Z[\sqrt d]$ is multiplicative, $N(x)$ prime $\Rightarrow x$ irreducible For the ring $\Bbb{Z}[\sqrt{d}]=\{a+b\sqrt{d}\mid a,b \in \Bbb{Z}\}$ where $d$ is not divisible by the square of a prime, prove that the norm $N(a+b\sqrt{d})= |a^2-db^2|$ satisfies the assertions: $N(x)=0$ if and only if $x=0$; $N(xy)=N(x)N(y)$ for all $x$ and $y$; $x$ is a unit if and only if $N(x)=1$; and if $N(x)$ is prime, then $x$ is irreducible in $\Bbb{Z}[\sqrt{d}]$.

We define $\mathbb Z[\sqrt d] = \{a + b \sqrt d : a, b \in \mathbb Z\}$ where $d$ is a square-free integer.

Claim: $N(x) = 0$ if and only if $x = 0$.
Proof: If $N(x) = N(a + b \sqrt d) = 0$, then $N(x) = \vert a^2 - db^2 \vert = 0$ which means $a^2 = \vert d \vert b^2$. If either $a$ or $b$ are not zero, the other one isn't and we get that $d$ is not square-free, a contradiction. Conclude that $a = b = 0$ and hence $x = 0$.
Conversely, if $x = a + b \sqrt d = 0$, then $a = b = 0$ which means $N(x) = \vert a^2 - d b^2 \vert = 0$.

Claim: $N(xy) = N(x)N(y)$ for all $x, y \in \mathbb Z[\sqrt d]$.
Proof: Let $x, y \in \mathbb Z[\sqrt d]$ with $x = a + b \sqrt d$ and $y = m + n \sqrt d$. Observe that
\begin{align*}
N(x)N(y) &= \vert a^2 - db^2 \vert \vert m^2 - dn^2 \vert \\
&= \vert(am)^2 + (dnb)^2 - \big( (an)^2 - (bm)^2 \big) d \vert
\end{align*}
and
\begin{align*}
N(xy) &= N\big((a + b \sqrt d)(m + n \sqrt d) \big) \\
&= N\big( (am + bnd) + (an + bm) \sqrt d\big) \\
&= \vert (am + bnd)^2 - d (an + bm)^2 \vert \\
&= \vert(am)^2 + (dnb)^2 - \big( (an)^2 - (bm)^2 \big) d \vert.
\end{align*}
Conclude that $N(xy) = N(x)N(y)$ for all $x, y \in \mathbb Z[\sqrt d]$.

Claim: $x$ is a unit if and only if $N(x) = 1$.
Proof: Suppose that $x$ is a unit, then there exists $y$ such that $xy = 1$. Observe that $$1 = N(1) = N(xy) = N(x)N(y)$$ which means $N(x) = 1$.
Conversely, suppose that $\vert a^2 - d b^2 \vert = N(x) = 1$. Choosing $y = a - b \sqrt d$, we see that $$xy = (a + b \sqrt d)(a - b \sqrt d) = a^2 - db^2 = \pm 1.$$ Conclude that $x$ is a unit.

Claim: If $N(x)$ is prime, then $x$ is irreducible in $\mathbb Z[\sqrt d]$.
Proof: Suppose $N(x) = N(a + b \sqrt d) = p$ is prime (and hence irreducible since prime elements are always irreducible). Suppose, by way of contradiction, that $x$ is not irreducible, then we can write $x = yz$ where $y, z$ are not units. But then $$p = N(x) = N(y)N(z)$$ where $N(y), N(z) \neq 1$ by previous result. This contradicts that $p$ is irreducible (since the only units in $\mathbb Z$ are $\pm 1$). Conclude that $x$ is irreducible in $\mathbb Z[\sqrt d]$.
