Problem with Ring $\mathbb{Z}_p[i]$ and integral domains Let $$\Bbb Z_p[i]:=\{a+bi\;:\; a,b \in \Bbb Z_p\,\,,\,\, i^2 = -1\}$$
-(a)Show that if $p$ is not prime, then $\mathbb{Z}_p[i]$ is not an integral domain.
-(b)Assume $p$ is prime. Show that every nonzero element in $\mathbb{Z}_p[i]$ is a unit if and only if $x^2+y^2$ is not equal to $0$ ($\bmod p$) for any pair of elements $x$ and $y$ in $\mathbb{Z}_p$.
(a)I think that I can prove the first part of this assignment.
Let $p$ be not prime. Then there exist $x,y$ such that $p=xy$, where $1<x<p$ and $1<y<p$.
Then $(x+0i)(y+0i)=xy=0$ in $\mathbb{Z}_p[i]$. Thus $(x+0i)(y+0i)=0$ in $\mathbb{Z}_p[i]$. Since none of $x+0i$ and $y+0i$ is equal to $0$ in $\mathbb{Z}_p[i]$, we have $\mathbb{Z}_p[i]$ is not an integral domain.
However, I don't know how to continue from here.

Hint  $ $  unit $\rm\alpha\in \Bbb Z_p[{\it i}]\iff$ unit $\alpha\bar \alpha\in \Bbb Z_p \iff \alpha\bar \alpha\not\equiv0,\:$ since $\rm\:\alpha\:|\:1\iff \alpha\bar\alpha\:|\:1\:$ via norms. 
Remark $\ $ The point of expressing it this way (vs. prior answer) is that it explicitly highlights how the norm, being a multiplicative homomorphism, must preserve purely multiplicative properties, such as the property of being a unit. That is the essence of the matter here (and throughout number theory), so it is well-worth explicit emphasis.
