The set of all congruence classes of the integers for a modulus n is called the set of integers modulo n, and is denoted, or . The notation is, however, not recommended because it can be confused with the set of n-adic integers. The set is defined as follows.
When n ≠ 0, has n elements, and can be written as:
When n = 0, does not have zero elements; rather, it is isomorphic to, since .
We can define addition, subtraction, and multiplication on by the following rules:
The verification that this is a proper definition uses the properties given before.
In this way, becomes a commutative ring. For example, in the ring, we have
as in the arithmetic for the 24-hour clock.
The notation is used, because it is the factor ring of by the ideal containing all integers divisible by n, where is the singleton set . Thus is a field when is a maximal ideal, that is, when is prime.
In terms of groups, the residue class is the coset of a in the quotient group, a cyclic group.
The set has a number of important mathematical properties that are foundational to various branches of mathematics.
Rather than excluding the special case n = 0, it is more useful to include (which, as mentioned before, is isomorphic to the ring of integers), for example when discussing the characteristic of a ring.
When n is prime, the set of integers modulo n form a finite field.
Read more about this topic: Modular Arithmetic