Basic example The prototypical example of a congruence relation is
congruence modulo n on the set of
integers. For a given positive integer n, two integers a and b are called
congruent modulo n, written : a \equiv b \pmod{n} if a - b is
divisible by n (or equivalently if a and b have the same
remainder when divided by n). For example, 37 and 57 are congruent modulo 10, : 37 \equiv 57 \pmod{10} since 37 - 57 = -20 is a multiple of 10, or equivalently since both 37 and 57 have a remainder of 7 when divided by 10. Congruence modulo n (for a fixed n) is compatible with both
addition and
multiplication on the integers. That is, if : a_1 \equiv a_2 \pmod{n} and b_1 \equiv b_2 \pmod{n} then : a_1 + b_1 \equiv a_2 + b_2 \pmod{n} and a_1 b_1 \equiv a_2b_2 \pmod{n} The corresponding addition and multiplication of equivalence classes is known as
modular arithmetic. From the point of view of abstract algebra, congruence modulo n is a congruence relation on the
ring of integers, and arithmetic modulo n occurs on the corresponding
quotient ring.
Example: Groups For example, a group is an algebraic object consisting of a
set together with a single
binary operation, satisfying certain axioms. If G is a group with operation \ast, a
congruence relation on G is an equivalence relation \equiv on the elements of G satisfying :g_1 \equiv g_2 \ \ \, and \ \ \, h_1 \equiv h_2 \implies g_1 \ast h_1 \equiv g_2 \ast h_2 for all g_1, g_2, h_1, h_2 \in G. For a congruence on a group, the equivalence class containing the
identity element is always a
normal subgroup, and the other equivalence classes are the other
cosets of this subgroup. Together, these equivalence classes are the elements of a
quotient group.
Example: Rings When an algebraic structure includes more than one operation, congruence relations are required to be compatible with each operation. For example, a ring possesses both addition and multiplication, and a congruence relation on a ring must satisfy : r_1 + s_1 \equiv r_2 + s_2 and r_1 s_1 \equiv r_2 s_2 whenever r_1 \equiv r_2 and s_1 \equiv s_2. For a congruence on a ring, the equivalence class containing 0 is always a two-sided
ideal, and the two operations on the set of equivalence classes define the corresponding quotient ring. == Relation with homomorphisms ==