# Abstract Algebra/Equivalence relations and congruence classes

## Contents

We often wish to describe how two mathematical entities within a set are related. For example, if we were to look at the set of all people on Earth, we could define "is a child of" as a relationship. Similarly, the ${\displaystyle \geq }$ operator defines a relation on the set of integers. A binary relation, hereafter referred to simply as a relation, is a binary proposition defined on any selection of the elements of two sets.

Formally, a relation is any arbitrary subset of the Cartesian product between two sets ${\displaystyle X}$ and ${\displaystyle Y}$ so that, for a relation ${\displaystyle R}$, ${\displaystyle R\subseteq X\times Y}$. In this case, ${\displaystyle X}$ is referred to as the domain of the relation and ${\displaystyle Y}$ is referred to as its codomain. If an ordered pair ${\displaystyle (x,y)}$ is an element of ${\displaystyle R}$ (where, by the definition of ${\displaystyle R}$, ${\displaystyle x\in X}$ and ${\displaystyle y\in Y}$), then we say that ${\displaystyle x}$ is related to ${\displaystyle y}$ by ${\displaystyle R}$. We will use ${\displaystyle R(x)}$ to denote the set

${\displaystyle \{y\in Y:(x,y)\in R\}}$.

In other words, ${\displaystyle R(x)}$ is used to denote the set of all elements in the codomain of ${\displaystyle R}$ to which some ${\displaystyle x}$ in the domain is related.

## Equivalence relations

To denote that two elements ${\displaystyle x}$ and ${\displaystyle y}$ are related for a relation ${\displaystyle R}$ which is a subset of some Cartesian product ${\displaystyle X\times X}$, we will use an infix operator. We write ${\displaystyle x\sim y}$ for some ${\displaystyle x,y\in X}$ and ${\displaystyle (x,y)\in R}$.

There are very many types of relations. Indeed, further inspection of our earlier examples reveals that the two relations are quite different. In the case of the "is a child of" relationship, we observe that there are some people A,B where neither A is a child of B, nor B is a child of A. In the case of the ${\displaystyle \geq }$ operator, we know that for any two integers ${\displaystyle m,n\in Z}$ exactly one of ${\displaystyle m\geq n}$ or ${\displaystyle n>m}$ is true. In order to learn about relations, we must look at a smaller class of relations.

In particular, we care about the following properties of relations:

• Reflexivity: A relation ${\displaystyle R\subseteq X\times X}$ is reflexive if ${\displaystyle a\sim a}$ for all ${\displaystyle a\in X}$.
• Symmetry: A relation ${\displaystyle R\subseteq X\times X}$ is symmetric if ${\displaystyle {a\sim b}\implies {b\sim a}}$ for all ${\displaystyle a,b\in X}$.
• Transitivity: A relation ${\displaystyle R\subseteq X\times X}$ is transitive if ${\displaystyle {{a\sim b}\wedge {b\sim c}}\implies {a\sim c}}$ for all ${\displaystyle a,b,c\in X}$.

One should note that in all three of these properties, we quantify across all elements of the set ${\displaystyle X}$.

Any relation ${\displaystyle R\subseteq X\times X}$ which exhibits the properties of reflexivity, symmetry and transitivity is called an equivalence relation on ${\displaystyle X}$. Two elements related by an equivalence relation are called equivalent under the equivalence relation. We write ${\displaystyle a\sim _{R}b}$ to denote that ${\displaystyle a}$ and ${\displaystyle b}$ are equivalent under ${\displaystyle R}$. If only one equivalence relation is under consideration, we can instead write simply ${\displaystyle a\sim b}$. As a notational convenience, we can simply say that ${\displaystyle \sim }$ is an equivalence relation on a set ${\displaystyle X}$ and let the rest be implied.

Example: For a fixed integer ${\displaystyle p}$, we define a relation ${\displaystyle \sim _{p}}$ on the set of integers such that ${\displaystyle a\sim _{p}b}$ if and only if ${\displaystyle a-b=kp}$ for some ${\displaystyle k\in Z}$. Prove that this defines an equivalence relation on the set of integers.

Proof:

• Reflexivity: For any ${\displaystyle a\in X}$, it follows immediately that ${\displaystyle a-a=0=0p}$, and thus ${\displaystyle a\sim _{p}a}$ for all ${\displaystyle a\in G}$.
• Symmetry: For any ${\displaystyle a,b\in X}$, assume that ${\displaystyle a\sim _{p}b}$. It must then be the case that ${\displaystyle a-b=kp}$ for some integer ${\displaystyle k}$, and ${\displaystyle b-a=(-k)p}$. Since ${\displaystyle k}$ is an integer, ${\displaystyle -k}$ must also be an integer. Thus, ${\displaystyle {a\sim _{p}b}\implies {b\sim _{p}a}}$ for all ${\displaystyle a,b\in G}$.
• Transitivity: For any ${\displaystyle a,b,c\in X}$, assume that ${\displaystyle a\sim _{p}b}$ and ${\displaystyle b\sim _{p}c}$. Then ${\displaystyle a-b=k_{1}p}$ and ${\displaystyle b-c=k_{2}p}$ for some integers ${\displaystyle k_{1},k_{2}}$. By adding these two equalities together, we get ${\displaystyle {(a-b)+(b-c)=(k_{1}p)+(k_{2}p)}\Leftrightarrow {a-c=(k_{1}+k_{2})p}}$, and thus ${\displaystyle a\sim _{p}c}$.

Q.E.D.

Remark. In elementary number theory we denote this relation ${\displaystyle a\equiv b({\text{mod }}p)}$ and say a is equivalent to b modulo p.

## Equivalence classes

Let ${\displaystyle \sim }$ be an equivalence relation on ${\displaystyle X}$. Then, for any element ${\displaystyle a\in X}$ we define the equivalence class of ${\displaystyle a}$ as the subset ${\displaystyle \left[a\right]\subseteq X}$ given by

${\displaystyle \left[a\right]=\left\{b\in X|a\sim b\right\}}$

Theorem: ${\displaystyle b\in \left[a\right]\implies \left[b\right]=\left[a\right]}$

Proof: Assume ${\displaystyle b\in \left[a\right]}$. Then by definition, ${\displaystyle a\sim b}$.

• We first prove that ${\displaystyle \left[b\right]\subseteq \left[a\right]}$. Let ${\displaystyle p}$ be an arbitrary element of ${\displaystyle \left[b\right]}$. Then ${\displaystyle p\sim b}$ by definition of the equivalence class, and ${\displaystyle p\sim a}$ by transitivity of equivalence relations. Thus, ${\displaystyle {p\in \left[b\right]}\implies {p\in \left[a\right]}}$ and ${\displaystyle \left[b\right]\subseteq \left[a\right]}$.
• We now prove that ${\displaystyle \left[a\right]\subseteq \left[b\right]}$ Let ${\displaystyle q}$ be an arbitrary element of ${\displaystyle \left[a\right]}$. Then, by definition ${\displaystyle q\sim a}$. By transitivity, ${\displaystyle q\sim b}$, so ${\displaystyle q\in \left[b\right]}$. Thus, ${\displaystyle {q\in \left[a\right]}\implies {q\in \left[b\right]}}$ and ${\displaystyle \left[a\right]\subseteq \left[b\right]}$.

As ${\displaystyle \left[a\right]\subseteq \left[b\right]}$ and as ${\displaystyle \left[b\right]\subseteq \left[a\right]}$, we have ${\displaystyle \left[b\right]=\left[a\right]}$.

Q.E.D.

## Partitions of a set

A partition of a set ${\displaystyle X}$ is a disjoint family of sets ${\displaystyle X_{i}}$, ${\displaystyle i\in I}$, such that ${\displaystyle \bigcup _{i\in I}X_{i}=X}$.

Theorem: An equivalence relation ${\displaystyle \sim }$ on ${\displaystyle X}$ induces a unique partition of ${\displaystyle X}$, and likewise, a partition induces a unique equivalence relation on ${\displaystyle X}$, such that these are equivalent.

Proof: (Equivalence relation induces Partition): Let ${\displaystyle P}$ be the set of equivalence classes of ${\displaystyle \sim }$. Then, since ${\displaystyle a\in [a]}$ for each ${\displaystyle a\in X}$, ${\displaystyle \cup P=X}$. Furthermore, by the above theorem, this union is disjoint. Thus the set of equivalence relations of ${\displaystyle \sim }$ is a partition of ${\displaystyle X}$.

(Partition induces Equivalence relation): Let ${\displaystyle X_{i}\,,\,i\in I}$ be a partition of ${\displaystyle X}$. Then, define ${\displaystyle \sim }$ on ${\displaystyle X}$ such that ${\displaystyle a\sim b}$ if and only if both ${\displaystyle a}$ and ${\displaystyle b}$ are elements of the same ${\displaystyle X_{i}}$ for some ${\displaystyle i\in I}$. Reflexivity and symmetry of ${\displaystyle \sim }$ is immediate. For transitivity, if ${\displaystyle a,b\in X_{i}}$ and ${\displaystyle b,c\in X_{i}}$ for the same ${\displaystyle i\in I}$, we neccesarily have ${\displaystyle a,c\in X_{i}}$, and transitivity follows. Thus, ${\displaystyle \sim }$ is an equivalence relation with ${\displaystyle X_{i}\,,\,i\in I}$ as the equivalence classes.

Lastly obtaining a partition ${\displaystyle P}$ from ${\displaystyle \sim }$ on ${\displaystyle X}$ and then obtaining an equivalence equation from ${\displaystyle P}$ obviously returns ${\displaystyle \sim }$ again, so ${\displaystyle \sim }$ and ${\displaystyle P}$ are equivalent structures.

Q.E.D.

## Quotients

Let ${\displaystyle \sim }$ be an equivalence relation on a set ${\displaystyle X}$. Then, define the set ${\displaystyle X/\sim }$ as the set of all equivalence classes of ${\displaystyle X}$. In order to say anything interesting about this construction we need more theory yet to be developed. However, this is one of the most important constructions we have, and one that will be given much attention throughout the book.