# Units of Gaussian Integers

## Theorem

Let $\struct {\Z \sqbrk i, +, \times}$ be the ring of Gaussian integers.

The set of units of $\struct {\Z \sqbrk i, +, \times}$ is $\set {1, i, -1, -i}$.

## Proof 1

Let $a + b i$ be a unit of $\struct {\Z \sqbrk i, +, \times}$.

Then $a$ and $b$ are not both $0$ as then $a + b i$ would be the zero of $\struct {\Z \sqbrk i, +, \times}$.

Then:

$\exists c, d \in \Z: \paren {a + b i} \paren {c + d i} = 1 + 0 i$

$c = \dfrac a {a^2 + b^2}, d = \dfrac {-b} {a^2 + b^2}$

Let $a^2 + b^2 = n$.

We have that $n \in \Z, n > 0$.

If $c$ and $d$ are integers, then $a$ and $b$ must both be divisible by $n$.

Let $a = n x, b = n y$.

Then:

$n^2 x^2 + n^2 y^2 = n$

and so:

$n \paren {x^2 + y^2} = 1$

Thus $n = a^2 + b^2 = 1$ and so as $a, b \in \Z$ we have:

$a^2 = 1, b^2 = 0$

or:

$a^2 = 0, b^2 = 1$

from which the result follows.

$\blacksquare$

## Proof 2

Let $\alpha = a + b i$ be a unit of $\left({\Z \left[{i}\right], +, \times}\right)$.

Then by definition of unit:

$\exists\beta = c + d i \in \Z \left[{i}\right]: \alpha \beta = 1$

Let $\left\vert{\alpha}\right\vert$ denote the modulus of $\alpha$.

Then:

 $\displaystyle \left\vert{\alpha}\right\vert^2 \cdot \left\vert{\beta}\right\vert^2$ $=$ $\displaystyle \left\vert{\alpha \beta}\right\vert^2$ Modulus of Product $\displaystyle$ $=$ $\displaystyle \left\vert{1}\right\vert^2$ $\displaystyle$ $=$ $\displaystyle 1$

By Divisors of One, $\vert a\vert^2=1$ or $-1$

Since $\left\vert{\alpha}\right\vert$ and $\left\vert{\beta}\right\vert$ are positive integers:

$\left\vert{\alpha}\right\vert^2 =a^2+b^2= 1$

and so either:

$\left\vert{a}\right\vert = 1$ and $\left\vert{b}\right\vert = 0$

or:

$\left\vert{b}\right\vert = 1$ and $\left\vert{a}\right\vert = 0$.

Therefore, the set of units of $\left({\Z \left[{i}\right], +, \times}\right)$ is $\left\{ {\pm 1, \pm i}\right\}$, as required.

$\blacksquare$