# Prime elements associate in $\mathbb{Z}[i]$

$$p$$ is prime and $$p=a^2+b^2$$ with $$a,b\in \mathbb{Z}$$. Show that $$p=(a+ib)(a-ib)$$ is a decomposition with prime elements in $$\mathbb{Z}[i]$$ and that $$a+ib$$ is associate with $$a-ib$$ if and only if $$|a|=|b|=1$$.

I've already proven that $$(a+ib)$$ and $$(a-ib)$$ are prime in the ring. I want to attempt the second statement.

It's clear to me that $$(\pm1\pm i)$$ is associate to $$(\pm 1\pm i)$$ so I'm just proving that if $$a+ib$$ is associate with $$a-ib$$ $$\Rightarrow$$ $$|a|=|b|=1$$

Definition: $$a$$ associate to $$b$$ if $$\exists e\in R:$$ $$ae=b$$ and $$e$$ is a unit in the ring $$R$$.

I know that there are $$4$$ units in total in $$\mathbb{Z}[i]$$, namely $$1,-1,i,-i$$.

\begin{align*} (a+ib)\cdot 1 = (a-ib) \Rightarrow b = 0\\ (a+ib)\cdot (-1) = (a-ib) \Rightarrow a = 0\\ (a+ib)\cdot i = (a-ib) \Rightarrow a = -b\\ (a+ib)\cdot (-i) = (a-ib) \Rightarrow a = b \end{align*} First two cases can't be true, since $$p=(a+0)(a+0)=a^2$$ and $$p=(0+ib)(0-ib) = b^2$$ wouldn't be prime.

For the two other cases we have $$p=a^2+a^2=2a^2$$ and that's only a prime if $$|a|=|b|=1$$.

Is that OK? Any feedback is welcome :)

• Yes, your arguments are correct. – WhatsUp Jun 10 at 21:47