Gaussian integers

The ring of Gaussian integers is $$ \begin{align*} \Z[i] = \sb{a+bi}{a,b\in \Z} \leq \C. \end{align*} $$

Proposition (Gaussian integers is a Euclidean domain) open_in_new

The ring of Gaussian integers $\Z[i]$ is a Euclidean domain, with Euclidean function $$ \begin{align*} ϕ(a+bi) = a^2 + b^2. \end{align*} $$

Proof

Proposition (units in Gaussian integers) open_in_new

The units in $\Z[i]$ is exactly the norm-1 elements $\pm 1, \pm i$.

Proof

Proposition (primes in integers and Gaussian integers) open_in_new

Let $p$ be a prime in $\Z$. The following are equivalent:

  1. $p$ is not a prime in $\Z[i]$;

  2. $p$ is a sum of two squares, i.e. $p=a^2 + b^2$ for some $a,b\in \Z$;

  3. $p\equiv 1$ or $p\equiv 2\pmod 4$.

Proof

Theorem (Gaussian primes) open_in_new

The primes in $\Z[i]$ are, up to associates, exactly

  • the primes $p$ in $\Z$ such that $p\equiv 3\pmod 4$; and

  • Gaussian integers $z\in \Z[i]$ such that $N(z) = z\bar z = p$ is prime in $\Z$ with $p\equiv 1$ or $p\equiv 2\pmod 4$.

Proof

Corollary (criterion for sum of two squares) open_in_new

Let $n\in \Z$ have prime factorisation $n = p_1^{n_1} \ldots p_k^{n_k}$.

$n$ can be written as the sum of two squares iff $n_i$ is even whenever $p_i \equiv 3\pmod 4$.

Proof