# Why do the gaussian integers have only 2 congruence classes mod 1+i?

If we consider $Z[i]$ modulo $1+i$, why are there only two congruence classes?

-
Why does a chessboard have only two colours? – Marc van Leeuwen Dec 29 '12 at 21:04

Since, $1+i\equiv 0\pmod{1+i}$, $i\equiv -1\pmod{1+i}$. This implies $$-1=i^2\equiv (-1)^2=1\pmod{1+i}$$ or $2\equiv 0\pmod{1+i}$.

Then for any $a+bi\in\mathbb{Z}[i]$, $$a+bi\equiv a-b\equiv 0,1\pmod{1+i}.$$ This follows since $a-b$ is just an integer, and if it is even, it is congruent to $0$ since $2\equiv 0\pmod{1+i}$, and if it is odd, it is congruent to $1$ for the same reason.

-

Hint: Show that $1+i$ divides $2$.

-

Let's reduce the problem to integer linear algebra.

$\mathbb{Z}[i]$ is two-dimensional, with basis $\{1, i\}$.

The ideal $(1+i)$ consists of all multiples of $1+i$.

The multiples of $1+i$ are spanned by $\{1 \cdot (1+i), i \cdot (1+i) \} = \{ 1+i, -1+i \}$. Writing coordinates relative to our chosen basis above, this is the rowspace of the matrix

$$\left( \begin{matrix} 1 & 1 \\ -1 & 1 \end{matrix} \right)$$

We can row reduce this matrix to

$$\left( \begin{matrix} 1 & 1 \\ 0 & 2 \end{matrix} \right)$$

Now, if we consider any vector $(x,y)$, it's clear that we can normalize this to either $(0,0)$ or $(0,1)$ by adding in elements of the ideal $(1+i)$; i.e. by adding in linear combinations of the rows of the simplified matrix.

Thus, two equivalence classes.

-