Given a Gaussian integer , called a
modulus, two Gaussian integers are
congruent modulo , if their difference is a multiple of , that is if there exists a Gaussian integer such that . In other words, two Gaussian integers are congruent modulo , if their difference belongs to the
ideal generated by . This is denoted as . The congruence modulo is an
equivalence relation (also called a
congruence relation), which defines a
partition of the Gaussian integers into
equivalence classes, called here
congruence classes or
residue classes. The set of the residue classes is usually denoted , or , or simply . The residue class of a Gaussian integer is the set : \bar a := \left\{ z \in \mathbf{Z}[i] \mid z \equiv a \pmod{z_0} \right\} of all Gaussian integers that are congruent to . It follows that
if and only if . Addition and multiplication are compatible with congruences. This means that and imply and . This defines well-defined
operations (that is independent of the choice of representatives) on the residue classes: :\bar a + \bar b := \overline{a+b}\quad \text{and}\quad \bar a \cdot\bar b := \overline{ab}. With these operations, the residue classes form a
commutative ring, the
quotient ring of the Gaussian integers by the ideal generated by , which is also traditionally called the
residue class ring modulo (for more details, see
Quotient ring).
Examples • There are exactly two residue classes for the modulus , namely {{math| {0, ±2, ±4,…,±1 ±
i, ±3 ±
i,…}}} (all multiples of ), and {{math| {±1, ±3, ±5,…, ±
i, ±2 ±
i,…}}}, which form a checkerboard pattern in the complex plane. These two classes form thus a ring with two elements, which is, in fact, a
field, the unique (up to an isomorphism) field with two elements, and may thus be identified with the
integers modulo 2. These two classes may be considered as a generalization of the partition of integers into even and odd integers. Thus one may speak of
even and
odd Gaussian integers (Gauss divided further even Gaussian integers into
even, that is divisible by 2, and
half-even). • For the modulus 2 there are four residue classes, namely . These form a ring with four elements, in which for every . Thus this ring is not
isomorphic with the ring of integers modulo 4, another ring with four elements. One has , and thus this ring is not the
finite field with four elements, nor the
direct product of two copies of the ring of integers modulo 2. • For the modulus there are eight residue classes, namely , whereof four contain only even Gaussian integers and four contain only odd Gaussian integers.
Describing residue classes Given a modulus , all elements of a residue class have the same remainder for the Euclidean division by , provided one uses the division with unique quotient and remainder, which is described
above. Thus enumerating the residue classes is equivalent with enumerating the possible remainders. This can be done geometrically in the following way. In the
complex plane, one may consider a
square grid, whose squares are delimited by the two lines :\begin{align} V_s&=\left\{ \left. z_0\left(s-\tfrac12 +ix\right) \right\vert x\in \mathbf R\right\} \quad \text{and} \\ H_t&=\left\{ \left. z_0\left(x+i\left(t-\tfrac12\right)\right) \right\vert x\in \mathbf R\right\}, \end{align} with and integers (blue lines in the figure). These divide the plane in
semi-open squares (where and are integers) :Q_{mn}=\left\{(s+it)z_0 \left\vert s \in \left [m - \tfrac12, m + \tfrac12\right), t \in \left[n - \tfrac12, n + \tfrac12 \right)\right.\right\}. The semi-open intervals that occur in the definition of have been chosen in order that every complex number belong to exactly one square; that is, the squares form a
partition of the complex plane. One has :Q_{mn} = (m+in)z_0+Q_{00}=\left\{(m+in)z_0+z\mid z\in Q_{00}\right\}. This implies that every Gaussian integer is congruent modulo to a unique Gaussian integer in (the green square in the figure), which is its remainder for the division by . In other words, every residue class contains exactly one element in . The Gaussian integers in (or in its
boundary) are sometimes called
minimal residues because their norm are not greater than the norm of any other Gaussian integer in the same residue class (Gauss called them
absolutely smallest residues). From this one can deduce by geometrical considerations, that the number of residue classes modulo a Gaussian integer equals its norm (see below for a proof; similarly, for integers, the number of residue classes modulo is its absolute value ).
Residue class fields The residue class ring modulo a Gaussian integer is a
field if and only if z_0 is a Gaussian prime. If is a decomposed prime or the ramified prime (that is, if its norm is a prime number, which is either 2 or a prime congruent to 1 modulo 4), then the residue class field has a prime number of elements (that is, ). It is thus
isomorphic to the field of the integers modulo . If, on the other hand, is an inert prime (that is, is the square of a prime number, which is congruent to 3 modulo 4), then the residue class field has elements, and it is an
extension of degree 2 (unique, up to an isomorphism) of the
prime field with elements (the integers modulo ). ==Primitive residue class group and Euler's totient function==