I am studying ring theory and stuck at this problem. The problem goes follows:
Let $\mathbb{Z}[i]=\{a+ib\mid a,b\in \mathbb{Z}\}$. Also, let $\omega = \frac{-1 + \sqrt{-3}}{2}$. We define $N(a+bi) = a^2 + b^2$ for all $a+bi \in \mathbb{C}$.
Let $p \ge 5$ be a prime number in $\mathbb{Z}$.
Prove that $\langle p \rangle$ is not prime in $\mathbb{Z}[i]$ if and only if there is a solution to $x^2 + 1 = 0$ in $\mathbb{Z}_p$.
Prove that $\langle p \rangle$ is not prime in $\mathbb{Z}[\omega]$ if and only if there is a solution to $x^2 - x + 1 = 0$ in $\mathbb{Z}_p$.
I don't have any idea how to start the proof. Can anyone help me on starting the proof?
As J.W. Tanner commented, if there is a solution $x\in \{0,1,2,\dots,p-1\}$, to the equation $x^2+1\equiv0 \; \operatorname{mod} p$, then $p\mid x^2+1$, but this means $p\mid (x+i)(x-i)$ - since $x$ is real, the only way $p$ can divide either term (so that at least one term is in $\langle p\rangle$), is for us to have $p\mid 1$, which is clearly impossible.
For the other direction, suppose $AX\in \langle p\rangle$, but $A\not\in\langle p\rangle$ and $X\not\in\langle p\rangle$. Let $A=a+bi$ and $X=x+yi$. Since $A\not\in\langle p\rangle$ and $X\not\in\langle p\rangle$, we conclude that $p$ does not divide each of $\_\_\_$, $\_\_\_$, $\_\_\_$, and $\_\_\_$.
Since $AX\in \langle p\rangle$, we have $p\mid AX$ so that $p\mid AX\bar A\bar X=|A|^2|X|^2$. This means $p$ divides either $\_\_\_$ or $\_\_\_$.
Now, conclude the proof and try an analogous proof for $\mathbb Z[\omega]$.
Extra hint: