For each integer n ≥ 2, the relation of congruence between integers is defined as a is congruent to b modulo n if a−b is a multiple of n. This is written a ≡ b (mod n). Then a ≡ b (mod n) if and only if a and b have the same remainder (or residue) upon division by n. For example, 19 is congruent to 7 modulo 3. The following properties hold, if a ≡ b (mod n) and c ≡ d (mod n):
That is, addition, subtraction, and multiplication are well defined; division in general is not.The integer n is the modulus of the congruence. Congruence modulo n is an equivalence relation, with the n equivalence classes usually represented by 0,1,2,…,n − 1. The set of these residue classes is denoted ℤn and form a commutative ring for all n and a field if n is prime. See modulo n arithmetic.