# Congruence (in algebra)

An equivalence relation $\pi$ on a universal algebra $\mathcal{A} = (A,\Omega)$ commuting with all operations in $\Omega$, that is, an equivalence relation such that $(a_1,\ldots, a_n) \omega \,\pi\, (b_1,\ldots,b_n)\omega$ whenever $a_i \,\pi\, b_i$, where $a_i, b_i \in A$, $i=1,\ldots,n$, and $\omega$ is an $n$-ary operation. Congruences in algebraic systems are defined in a similar way. Thus, the equivalence classes modulo a congruence $\pi$ form a universal algebra (algebraic system) $\mathcal{A}/\pi$ of the same type as $\mathcal{A}$, called the quotient algebra (or quotient system) modulo $\pi$. The natural mapping from $A$ onto $A/\pi$ (which takes an element $a \in A$ to the $\pi$-class containing it) is a surjective homomorphism. Conversely, every homomorphism $\phi:A \rightarrow B$ defines a unique kernel congruence, whose classes are the pre-images of the elements of $B$ (cf. Kernel of a function).
The intersection of a family of congruences $\pi_i$, $i \in I$, in the lattice of relations on a universal algebra (algebraic system) is a congruence. In general, a union of congruences in the lattice of relations is not a congruence. The product $\pi_1\pi_2$ of two congruences $\pi_1$ and $\pi_2$ is a congruence if and only if $\pi_1$ and $\pi_2$ commute, i.e. if and only if $\pi_1 \pi_2 = \pi_2 \pi_1$.