All irreducible elements in Gaussian integers I have shown that for $q \in \mathbb Z[i]$, if $N(q)=p$ ($p$ prime), or $N(q)=p^2$ ($p$ prime, $p \equiv 3 \pmod 4)$, then $q$ is irreducible ($(N(q)$ denotes the norm of $q$). But how can I prove that these are the only irreducible elements in $\mathbb Z[i]$?
 A: Let $\pi\in\mathbb Z[i]$ irreducible. As you know $N(\pi)\ne 1$, so $N(\pi)$ is a product of primes in $\mathbb Z_{>0}$.
If $N(\pi)$ is prime, you are done.
Suppose $N(\pi)$ is not prime.
If there is a prime $p\equiv 3\pmod 4$ such that $p\mid N(\pi)=\pi\bar{\pi}$ then $p\mid\pi$, so $\pi$ and $p$ are associates in $\mathbb Z[i]$ and therefore $N(\pi)=N(p)=p^2$. (Here I've used that any prime $p\equiv 3\pmod 4$ is prime in $\mathbb Z[i]$.)
Otherwise, $N(\pi)$ is a product of primes $p\equiv1\pmod 4$. Let $p$ be such a prime. We also know that $p=z\bar z$ where $z\in\mathbb Z[i]$ is a prime element. Then $z\mid \pi\bar{\pi}$ and therefore $\pi$ (or $\bar{\pi}$) and $z$ are associates, so $N(\pi)=N(z)=p$, a contradiction.
A: If $q \in \mathbb Z[i]$ is irreducible, it generates a maximal ideal, since we work in an euclidean domain. So $\mathbb Z[i]/(q)$ is a finite field, which is - as an abelian group - generated by at most two elements, so it is isomorphic to $\mathbb F_p$ or $\mathbb F_{p^2}$ for some prime number $p$. This shows $N(q)=p$ or $N(q)=p^2$.
In the latter case we have to show $p \equiv 3 \mod 4$. To that account, we note that we have $p \in (q)$, hence $q | p$ and thus $q = p$ (up to a unit) due to $N(q)=p^2=N(p)$. So $p$ is prime in $\mathbb Z[i]$ and I think you already know that this implies $p \equiv 3 \pmod 4$.
