Mathematical Proof/Relations

Introduction

Intuitively, relation associates pairs of objects based on some rules and properties. That is, relation suggests some kinds of relationship or connection between two objects. Take marriage as an example. In the marriage registry, there is a record in which the names of husbands are associated with the names of their corresponding wives, to keep track of the marriages. The entries in the record can be interpreted as ordered pairs ${\displaystyle (a,b)}$, where ${\displaystyle a}$ is the husband, while ${\displaystyle b}$ is the wife.

Expressing it mathematically, let ${\displaystyle M}$ and ${\displaystyle W}$ be the set of all men and women respectively. Then, the Cartesian product ${\displaystyle M\times W=\{(a,b):a\in M{\text{ and }}b\in W\}}$ consists of all pairs of people (first and second coordinate is a man and woman respectively). After that, we know that the record in the marriage registry, ${\displaystyle R}$, is a subset of ${\displaystyle M\times W}$. If a man and a woman form an ordered pair in ${\displaystyle R}$, say ${\displaystyle (m,w)}$, then it means they are married. Then, it is natural to say that ${\displaystyle m}$ is related to ${\displaystyle w}$. In other words, if we find that ${\displaystyle (m,w)\in R}$, then it means that they are related by this relation ${\displaystyle R}$. Also, knowing what ${\displaystyle R}$ exactly is (we have the record from the marriage registry) is the same as knowing all the husband and wife relationship.

Thus, it is natural to define the set ${\displaystyle R}$ as a relation. Let us formally define relation below.

Terminologies

Definition. (Relation) A relation ${\displaystyle R}$ from a set ${\displaystyle A}$ to a set ${\displaystyle B}$ is a subset of ${\displaystyle A\times B}$, i.e., ${\displaystyle R\subseteq A\times B}$. In particular, when ${\displaystyle A=B}$, we say that ${\displaystyle R}$ is a relation on ${\displaystyle A}$, and we have ${\displaystyle R\subseteq A\times A}$. If ${\displaystyle (a,b)\in R}$, then we say that ${\displaystyle a}$ is related to ${\displaystyle b}$ by ${\displaystyle R}$, and write ${\displaystyle aRb}$. On the other hand, if ${\displaystyle (a,b)\notin R}$, then we say that ${\displaystyle a}$ is not related to ${\displaystyle b}$ by ${\displaystyle R}$, and write ${\displaystyle a\not Rb}$.

Example. Let ${\displaystyle A=\{a,b,c\}}$, ${\displaystyle B=\{1,2,3,4\}}$, and ${\displaystyle R=\{(a,1),(b,1),(b,2),(c,3)\}}$. Since the set ${\displaystyle R}$ is a subset of ${\displaystyle A\times B}$, ${\displaystyle R}$ defines a relation from set ${\displaystyle A}$ to set ${\displaystyle B}$. Also, in this relation, ${\displaystyle a}$ is related to 1, ${\displaystyle b}$ is related to 1 and 2, ${\displaystyle c}$ is related to 3. Thus, we have ${\displaystyle aR1,bR1,bR2}$ and ${\displaystyle cR3}$. But, we have, say ${\displaystyle a\not R2}$ or ${\displaystyle d\not R4}$, since ${\displaystyle (a,2),(d,4)\notin R}$.

Exercise.

(a) Suggest a set ${\displaystyle S}$ that is not a relation from set ${\displaystyle A}$ to set ${\displaystyle B}$.

(b) Suggest a set ${\displaystyle T}$ that is a relation from set ${\displaystyle A}$ to set ${\displaystyle R}$.

Solution

(a) ${\displaystyle S=\{(a,5)\}}$ (${\displaystyle (a,5)\notin A\times B}$, so ${\displaystyle S}$ is not a subset of ${\displaystyle A\times B}$).

(b) ${\displaystyle T=\left\{{\big (}a,(a,1){\big )}\right\}}$.

Exercise. Let ${\displaystyle A}$ and ${\displaystyle B}$ be two nonempty sets. Are ${\displaystyle \varnothing }$ and ${\displaystyle A\times B}$ relations from ${\displaystyle A}$ to ${\displaystyle B}$? Describe the relationships meant by these two sets.

Solution

Both ${\displaystyle \varnothing }$ and ${\displaystyle A\times B}$ are relations from ${\displaystyle A}$ to ${\displaystyle B}$ since both are subsets of ${\displaystyle A\times B}$.

For ${\displaystyle \varnothing }$, it means nothing is related, i.e., there is no relationship between elements in ${\displaystyle A}$ and elements in ${\displaystyle B}$.

For ${\displaystyle A\times B}$, it means everything is related, i.e., every element in ${\displaystyle A}$ is related to every element in ${\displaystyle B}$.

Example. Let ${\displaystyle H}$ be a set of all human beings. Then, ${\displaystyle R=\{(a,b):a{\text{ is the son of }}b\}}$. Then, ${\displaystyle R}$ is a subset of ${\displaystyle H\times H}$, and defines the relation for son and (father or mother).

Example. The concept of "less than" defines a relation on ${\displaystyle \mathbb {R} }$. To be more precise, the relation corresponding to this concept is ${\displaystyle R=\{(a,b):a. For instance, ${\displaystyle 1R2}$ but ${\displaystyle 2\not R1}$.

Example. The congruence of integers defines a relation on ${\displaystyle \mathbb {Z} }$. To be more precise, the corresponding relation is ${\displaystyle R=\{(a,b):a\equiv b{\pmod {n}}\}\subseteq \mathbb {Z} \times \mathbb {Z} }$ (${\displaystyle n\in \mathbb {N} }$ with ${\displaystyle n\geq 2}$). For example, when ${\displaystyle n=3}$, then ${\displaystyle 2R5}$ but ${\displaystyle 1\not R3}$.

Exercise. Consider the relation on ${\displaystyle \mathbb {R} }$, corresponding the concept of "equal to": ${\displaystyle R=\{(x,y):x=y\}\subseteq \mathbb {R} ^{2}}$.

(a) Sketch ${\displaystyle R}$ in the Cartesian coordinate system.

(b) Consider also the relations ${\displaystyle S,T}$ on ${\displaystyle \mathbb {R} }$ corresponding the concept of "less than" and "greater than" respectively. Sketch also ${\displaystyle S}$ and ${\displaystyle T}$ in the graph in (a).

Solution

(a) and (b):

        y
|    y=x
########|#####/%%%
########|####/%%%%
########|###/%%%%%
########|##/%%%%%%
########|#/%%%%%%%
########|/%%%%%%%%
--------*--------- x
#######/|%%%%%%%%%
######/%|%%%%%%%%%
#####/%%|%%%%%%%%%
####/%%%|%%%%%%%%%
###/%%%%|%%%%%%%%%

*----*
|####|
|####| : y>x (relation T)
*----*

*----*
|%%%%|
|%%%%| : y<x (relation S)
*----*


Remark.

• The sets ${\displaystyle R,S,T}$ give a partition of ${\displaystyle \mathbb {R} }$. As we will see, there is a close relationship between the concept of relation and the concept of partition.

Example. Let ${\displaystyle A=\{1,2\}}$. Define a relation on ${\displaystyle {\mathcal {P}}(A)}$, ${\displaystyle R=\{(S,T)\in {\mathcal {P}}(A)\times {\mathcal {P}}(A):S\subseteq T\}}$. Express ${\displaystyle R}$ by listing method.

Solution. First, we have ${\displaystyle {\mathcal {P}}(A)=\{\varnothing ,\{1\},\{2\},\{1,2\}\}}$. So,

${\displaystyle R=\{(\varnothing ,\varnothing ),(\varnothing ,\{1\}),(\varnothing ,\{2\}),(\varnothing ,\{1,2\}),(\{1\},\{1\}),(\{1\},\{1,2\}),(\{2\},\{2\}),(\{2\},\{1,2\}),(\{1,2\},\{1,2\})\}.}$

Exercise. Let ${\displaystyle A=\{1,2\}}$ and ${\displaystyle B=\{3,4\}}$. Consider a relation ${\displaystyle R}$ on ${\displaystyle A\times B}$ defined by

${\displaystyle (a,b)R(c,d){\text{ if }}a+d=b+c.}$
Express ${\displaystyle R}$ by listing method.

Solution

First, ${\displaystyle A\times B=\{(1,3),(1,4),(2,3),(2,4)\}}$. So,

${\displaystyle R=\{{\big (}(1,3),(1,3){\big )}{\big (}(1,3),(2,4){\big )},{\big (}(1,4),(1,4){\big )},{\big (}(2,3),(2,3){\big )},{\big (}(2,4),(1,3){\big )},{\big (}(2,4),(2,4){\big )}\}.}$

Definition. (Domain and range) Let ${\displaystyle R}$ be a relation from a set ${\displaystyle A}$ to a set ${\displaystyle B}$. The domain of ${\displaystyle R}$, denoted by ${\displaystyle \operatorname {dom} R}$ is the subset of ${\displaystyle A}$ defined by

${\displaystyle \operatorname {dom} R=\{a\in A:(a,b)\in R{\text{ for some }}b\in B\}.}$
The range of ${\displaystyle R}$, denoted by ${\displaystyle \operatorname {ran} R}$, is the subset of ${\displaystyle B}$ defined by
${\displaystyle \operatorname {ran} R=\{b\in B:(a,b)\in R{\text{ for some }}a\in A\}.}$

Remark.

• You may have learnt about the domain and range for functions. Using the same terminologies for both relations and functions is indeed not a coincidence. This is because a function is actually a relation. That is, a function is indeed just a special case of relation.

Example. Let ${\displaystyle A=\{a,b,c\}}$, ${\displaystyle B=\{1,2,3,4\}}$, and ${\displaystyle R=\{(a,1),(b,1),(b,2),(c,3)\}}$. Then, ${\displaystyle \operatorname {dom} R=\{a,b,c\}=A}$ and ${\displaystyle \operatorname {ran} R=\{1,2,3\}}$.

Example. Consider the relation ${\displaystyle R}$ on ${\displaystyle \mathbb {Z} }$: ${\displaystyle R=\{(a,b):a{\text{ and }}b{\text{ are both even}}\}}$. Then, ${\displaystyle \operatorname {dom} R}$ is the set of all even numbers, and ${\displaystyle \operatorname {ran} R}$ is the set of all even numbers also.

Exercise. Consider the relation ${\displaystyle R}$ on ${\displaystyle \mathbb {Z} }$: ${\displaystyle R=\{(a,b):a{\text{ and }}b{\text{ are of different parity}}\}}$. Find ${\displaystyle \operatorname {dom} R}$ and ${\displaystyle \operatorname {ran} R}$.

Solution

${\displaystyle \operatorname {dom} R=\mathbb {Z} }$ and ${\displaystyle \operatorname {ran} R=\mathbb {Z} }$.

Definition. (Inverse relation) Let ${\displaystyle R}$ be a relation from a set ${\displaystyle A}$ to a set ${\displaystyle B}$. The inverse relation ${\displaystyle R^{-1}}$ from ${\displaystyle B}$ to ${\displaystyle A}$ is

${\displaystyle R^{-1}=\{(b,a):(a,b)\in R\}\subseteq B\times A.}$

Remark.

• Again, you may have learnt a similar concept (and also a similar notation) for functions: inverse functions. Indeed, inverse functions can be defined as the inverse relation of a function, provided that the inverse relation is also a function.
• We can see that the inverse relation is obtained by "reversing" the order of elements in every ordered pair in the original relation.
• When ${\displaystyle R}$ is empty, then the inverse relation ${\displaystyle R^{-1}}$ is also empty since there is no ordered pair in the empty set.

Example. Let ${\displaystyle A=\{a,b,c\}}$, ${\displaystyle B=\{1,2,3,4\}}$, and ${\displaystyle R=\{(a,1),(b,1),(b,2),(c,3)\}}$. Then, the inverse relation ${\displaystyle R^{-1}}$ is ${\displaystyle \{(1,a),(1,b),(2,b),(3,c)\}}$.

Exercise. Construct an example of sets ${\displaystyle A,B}$ and a nonempty relation ${\displaystyle R}$ from set ${\displaystyle A}$ to set ${\displaystyle B}$ such that ${\displaystyle R=R^{-1}}$.

Solution

Take ${\displaystyle A=B=\{1\}}$, and ${\displaystyle R=\{(1,1)\}}$. Then, ${\displaystyle R^{-1}=\{(1,1)\}=R}$.

Reflexive, symmetric and transitive relations

After introducing the terminologies related to relations, we will study three properties for a relation defined on a set.

Definition. (Reflexive, symmetric and transitive) Let ${\displaystyle A}$ be a set and ${\displaystyle R}$ be a relation defined on ${\displaystyle A}$. Then,

• ${\displaystyle R}$ is reflexive if ${\displaystyle xRx}$ for every ${\displaystyle x\in A}$.
• ${\displaystyle R}$ is symmetric if for every ${\displaystyle x,y\in A}$, ${\displaystyle xRy\implies yRx}$.
• ${\displaystyle R}$ is transitive if for every ${\displaystyle x,y,z\in A}$, ${\displaystyle (xR{\color {darkgreen}y}{\text{ and }}{\color {darkgreen}y}Rz)\implies xRz}$.

Exercise. Let ${\displaystyle A}$ be a set and ${\displaystyle R}$ be a relation defined on ${\displaystyle A}$. Write down the meaning of (i) ${\displaystyle R}$ is not reflexive; (ii) ${\displaystyle R}$ is not symmetric; (iii) ${\displaystyle R}$ is not transitive.

Solution

(i) There exists ${\displaystyle x\in A}$ such that ${\displaystyle x\not Rx}$.

(ii) There exist ${\displaystyle x,y\in A}$ such that ${\displaystyle xRy}$ but ${\displaystyle y\not Rx}$.

(iii) There exist ${\displaystyle x,y,z\in A}$ such that ${\displaystyle xRy}$ and ${\displaystyle yRz}$, but ${\displaystyle x\not Rz}$.

Example. Let ${\displaystyle A=\{1,2\}}$, and let a relation defined on ${\displaystyle A}$ be

${\displaystyle R=\{(1,1),(2,2),(1,2)\}.}$
Then, ${\displaystyle R}$ is reflexive since ${\displaystyle (1,1),(2,2)\in R}$. But ${\displaystyle R}$ is not symmetric since ${\displaystyle (1,2)\in R}$ but ${\displaystyle (2,1)\notin R}$.

Exercise. Is ${\displaystyle R}$ transitive? Explain why.

Solution

${\displaystyle R}$ is transitive since

• ${\displaystyle 1R{\color {darkgreen}1}{\text{ and }}{\color {darkgreen}1}R2\implies 1R2}$;
• ${\displaystyle 1R{\color {darkgreen}1}{\text{ and }}{\color {darkgreen}1}R2\implies 1R2}$.

(There are no more ordered pairs ${\displaystyle (x,{\color {darkgreen}y})}$ and ${\displaystyle ({\color {darkgreen}y},z)}$ in the relation ${\displaystyle R}$, satisfying ${\displaystyle (x,y)\in R}$ and ${\displaystyle (y,z)\in R}$.)

Example. The congruence of integers

${\displaystyle R=\{(a,b):a\equiv b{\pmod {n}}\}}$
defines a relation on ${\displaystyle \mathbb {Z} }$ (${\displaystyle n\in \mathbb {N} }$ with ${\displaystyle n\geq 2}$). Prove that ${\displaystyle R}$ is a reflexive, symmetric and transitive.

Proof.

Reflexive: For every ${\displaystyle x\in \mathbb {Z} }$, ${\displaystyle x\equiv x{\pmod {n}}}$. So, ${\displaystyle xRx}$ for every ${\displaystyle x\in \mathbb {Z} }$.

Symmetric: For every ${\displaystyle x,y\in \mathbb {Z} }$, ${\displaystyle xRy\implies x\equiv y{\pmod {n}}\implies x-y=kn\implies y-x=(-k)n\implies y\equiv x{\pmod {n}}\implies yRx}$ where ${\displaystyle k}$ is some integer.

Transitive: For every ${\displaystyle x,y,z\in \mathbb {Z} }$,

{\displaystyle {\begin{aligned}xRy{\text{ and }}yRz&\implies x-y=kn{\text{ and }}y-z=k'n{\text{ for some }}k,k'\in \mathbb {Z} \\&\implies x-z=(x-y)+(y-z)=(k+k')n\\&\implies xRz.&(k+k'\in \mathbb {Z} )\end{aligned}}}

${\displaystyle \Box }$

Exercise. Which of the properties, reflexive, symmetric and transitive, does each of the following relations possesses? Prove your answer.

(a) ${\displaystyle R=\{(x,y)\in \mathbb {R} ^{2}:x\leq y\}}$.

(b) ${\displaystyle R=\{(x,y)\in \mathbb {R} ^{2}:x.

(c) ${\displaystyle R=\{(x,y)\in \mathbb {Z} \times \mathbb {Z} :xy>0\}}$.

Solution

(a) ${\displaystyle R}$ is reflexive, not symmetric, and transitive.

Proof.

Reflexive: For every ${\displaystyle x\in \mathbb {R} }$, ${\displaystyle x\leq x}$. So, ${\displaystyle xRx}$.

Not symmetric: Take ${\displaystyle x=1}$ and ${\displaystyle y=2}$. Then, ${\displaystyle 1\leq 2}$, so ${\displaystyle xRy}$. However, ${\displaystyle 2>1}$. So, ${\displaystyle y\not Rx}$.

Transitive: For every ${\displaystyle x,y,z\in \mathbb {R} }$, ${\displaystyle xRy{\text{ and }}yRz\implies x\leq y{\text{ and }}y\leq z{\text{ and }}x\leq z\implies xRz}$ (this actually follows from the property of "${\displaystyle \leq }$").

${\displaystyle \Box }$

(b) ${\displaystyle R}$ is not reflexive, not symmetric, and transitive.

Proof.

Reflexive: Take ${\displaystyle x=1}$. Then, 1 is not less than 1 itself. Hence, ${\displaystyle 1\not R1}$.

Not symmetric: Take ${\displaystyle x=1}$ and ${\displaystyle y=2}$. Then, ${\displaystyle 1<2}$, so ${\displaystyle xRy}$. However, ${\displaystyle 2>1}$. So, ${\displaystyle y\not Rx}$.

Transitive: For every ${\displaystyle x,y,z\in \mathbb {R} }$, ${\displaystyle xRy{\text{ and }}yRz\implies x (this actually follows from the property of "${\displaystyle <}$").

${\displaystyle \Box }$

(c) ${\displaystyle R}$ is reflexive, symmetric and not transitive.

Proof.

Reflexive: For every ${\displaystyle x\in \mathbb {Z} }$,

Case 1: ${\displaystyle x\geq 0}$. Then, ${\displaystyle x(x)\geq 0}$. So, ${\displaystyle xRx}$.

Case 2: ${\displaystyle x<0}$. Then, ${\displaystyle x(x)>0}$. So, ${\displaystyle xRx}$.

Symmetric: For every ${\displaystyle x,y\in \mathbb {Z} }$, ${\displaystyle xRy\implies xy\geq 0\implies yx=xy\geq 0\implies yRx}$.

Not transitive: Take ${\displaystyle x=1,y=0}$ and ${\displaystyle z=-1}$. Then, ${\displaystyle xy=0}$ and ${\displaystyle yz=0}$. So, ${\displaystyle xRy}$ and ${\displaystyle yRz}$. However, since ${\displaystyle xy=-1<0}$, ${\displaystyle x\not Rz}$.

${\displaystyle \Box }$

Exercise. Let ${\displaystyle R}$ be a relation on a set ${\displaystyle A}$. Prove or disprove that

(a) if ${\displaystyle R}$ is reflexive, then ${\displaystyle R^{-1}}$ is reflexive;

(b) if ${\displaystyle R}$ is symmetric, then ${\displaystyle R^{-1}}$ is symmetric;

(c) if ${\displaystyle R}$ is transitive, then ${\displaystyle R^{-1}}$ is transitive.

Equivalence relations and equivalence classes

After studying the three properties that a relation on a set can possess, let us focus on those relations that possess all three properties.

Definition. (Equivalence relation) Let ${\displaystyle A}$ be a set. A relation ${\displaystyle R}$ defined on ${\displaystyle A}$ is an equivalence relation if it is reflexive, symmetric and transitive.

Remark.

• To show that a relation is not an equivalence relation (i.e., to disprove that the relation is an equivalence relation), it suffices to show any one of the following: (i) it is not reflexive; (ii) it is not symmetric; (iii) it is not transitive, by considering the negation of the above definition.

Example. Let ${\displaystyle A=\{1,2\}}$. Also let a relation defined on ${\displaystyle A}$ be

${\displaystyle R=\{(1,1),(2,2),(1,2),(2,1)\}.}$
Prove or disprove that ${\displaystyle R}$ is an equivalence relation.

Proof.

Reflexive: Since ${\displaystyle (1,1),(2,2)\in R}$, ${\displaystyle R}$ is reflexive.

Symmetric: Since ${\displaystyle (1,1)\in R\implies (1,1)\in R}$, ${\displaystyle (2,2)\in R\implies (2,2)\in R}$, ${\displaystyle (1,2)\in R\implies (2,1)\in R}$, and ${\displaystyle (2,1)\in R\implies (1,2)\in R}$, ${\displaystyle R}$ is symmetric.

Transitive: Since for every ${\displaystyle x,y,z\in A}$, ${\displaystyle xRy{\text{ and }}yRz\implies xRz}$, ${\displaystyle R}$ is transitive.

${\displaystyle \Box }$

Exercise. Give another equivalence relation that is defined on ${\displaystyle A}$.

Solution

${\displaystyle R=\{(1,1),(2,2)\}}$. It can be shown to be reflexive, symmetric and transitive.

Example. Since the congruence of integers defines a reflexive, symmetric and transitive relation, it defines an equivalence relation on ${\displaystyle \mathbb {Z} }$.

Suppose ${\displaystyle R}$ is an equivalence relation on a set ${\displaystyle A}$. Intuitively, for elements that are related by ${\displaystyle R}$, they are quite "closely related". Thus, when we consider the set consisting elements that are related to a given element of set A, the elements inside the set are "closely related", so the set, in some sense, forms a "group" of elements that are "relatives". It then appears that we can classify the elements of set ${\displaystyle A}$ into different such "groups", according to an equivalence relation. As we will see, this is roughly the case. Hence, such "group" is quite important. Now, let us formally define what the "group" is:

Definition. (Equivalence class)

Let ${\displaystyle R}$ be an equivalence relation defined on a set ${\displaystyle A}$. For every ${\displaystyle a\in A}$, the set

${\displaystyle [a]=\{x\in A:xRa\}}$
consisting of all elements in ${\displaystyle A}$ that are related to ${\displaystyle a}$, is called an (equivalence) class of ${\displaystyle a}$ by ${\displaystyle R}$.

Example. Let ${\displaystyle A=\{1,2,3,4\}}$, and let a relation defined on ${\displaystyle A}$ be

${\displaystyle R=\{(1,1),(2,2),(3,3),(4,4),(1,2),(1,3),(2,1),(3,1),(2,3),(3,2)\}.}$
This relation ${\displaystyle R}$ can be shown to be an equivalence relation. The equivalence classes are given by
${\displaystyle [1]=\{1,2,3\},[2]=\{1,2,3\},[3]=\{1,2,3\},[4]=\{4\}.}$
Since ${\displaystyle [1]=[2]=[3]}$, there are only two distinct equivalence classes. Graphically, the situation looks like:

*----------**
|  .  .   / |
| 2   3  /  |
|  .    /.  |
| 1    /  4 |
*-----*-----*
^        ^
|        |
[1]=[2]    [4]
=[3]


Exercise. Construct an equivalence relation ${\displaystyle R}$ on ${\displaystyle A}$ such that the equivalence classes are given by

${\displaystyle [1]=\{1,2\},[2]=\{1,2\},[3]=\{3,4\},[4]=\{3,4\}.}$

Solution

${\displaystyle R=\{(1,1),(2,2),(3,3),(4,4),(1,2),(2,1),(3,4),(4,3)}$. Graphically, the situation looks like:

*---*-------*
|  .| .     |
| 2 | 3     |
|  .\    .  |
| 1  \    4 |
*-----*-----*
^        ^
|        |
[1]=[2]  [3]=[4]


Example. (Integers modulo ${\displaystyle n}$) Recall that the congruence of integers defines an equivalence relation ${\displaystyle R}$ on ${\displaystyle \mathbb {Z} }$. Using this equivalence relation, we can define the equivalence class ${\displaystyle [a]}$ for every ${\displaystyle a\in \mathbb {Z} }$, as follows:

• ${\displaystyle [0]=\{x\in \mathbb {Z} :xR0\}=\{x\in \mathbb {Z} :x\equiv 0{\pmod {n}}\}=\{\dotsc ,-2n,-n,0,n,2n,\dotsc \}}$
• ${\displaystyle [1]=\{x\in \mathbb {Z} :xR1\}=\{x\in \mathbb {Z} :x\equiv 1{\pmod {n}}\}=\{\dotsc ,-2n+1,-n+1,1,n+1,2n+1,\dotsc \}}$
• ...
• ${\displaystyle [n-1]=\{x\in \mathbb {Z} :xR(n-1)\}=\{x\in \mathbb {Z} :x\equiv n-1{\pmod {n}}\}=\{\dotsc ,-2n+(n-1),-n+(n-1),n-1,n+(n-1),2n+(n-1),\dotsc \}=\{\dotsc ,-2n-1,-n-1,-1,2n-1,\dotsc \}}$
• ${\displaystyle [n]=\{x\in \mathbb {Z} :xRn\}=\{x\in \mathbb {Z} :x\equiv n{\pmod {n}}\}=\{x\in \mathbb {Z} :x\equiv 0{\pmod {n}}\}=[0]}$
• ${\displaystyle [n+1]=\{x\in \mathbb {Z} :xR(n+1)\}=\{x\in \mathbb {Z} :x\equiv n+1{\pmod {n}}\}=\{x\in \mathbb {Z} :x\equiv 1{\pmod {n}}\}=[1]}$

We can observe that starting from ${\displaystyle [n]}$, the classes are not distinct from the previous classes. Indeed, if we consider the classes "backward":

• ${\displaystyle [-1]=\{x\in \mathbb {Z} :xR(-1)\}=\{x\in \mathbb {Z} :x\equiv -1{\pmod {n}}\}=\{x\in \mathbb {Z} :x\equiv n-1{\pmod {n}}\}=[n-1]}$
• ${\displaystyle [-2]=\{x\in \mathbb {Z} :xR(-2)\}=\{x\in \mathbb {Z} :x\equiv -2{\pmod {n}}\}=\{x\in \mathbb {Z} :x\equiv n-2{\pmod {n}}\}=[n-2]}$
• ...

They also do not give new classes.

Hence, we conclude that there are only ${\displaystyle n}$ distinct equivalence classes, namely ${\displaystyle [0],[1],\dotsc ,[n-1]}$. Usually, the set of these equivalence classes, ${\displaystyle \{[0],[1],\dotsc ,[n-1]\}}$, is denoted by ${\displaystyle \mathbb {Z} _{n}}$, and is called integers modulo ${\displaystyle n}$. Notice that ${\displaystyle \mathbb {Z} _{n}}$ is a finite set itself, but each of its elements is an infinite set.

Remark.

• We can illustrate the equivalence classes as follows (each column is an equivalence class, and the whole table is ${\displaystyle \mathbb {Z} }$):
*----*----*---...---*-----*
| .  |    |         |  .  |
| .  |    |         |  .  |
| .  |    |         |  .  |
|-n  |-n+1|         |-2n-1|
| 0  | 1  |  ....   | n-1 |
| n  |n+1 |         |2n-1 |
| .  |    |         |  .  |
| .  |    |         |  .  |
| .  |    |         |  .  |
*----*----*---...---*-----*

• When we consider integers modulo ${\displaystyle m}$ and integers modulo ${\displaystyle n}$ (${\displaystyle m\neq n}$) together, there may be some ambiguities for the elements. For example, ${\displaystyle \mathbb {Z} _{2}=\{[0],[1]\}}$ and ${\displaystyle \mathbb {Z} _{3}=\{[0],[1],[2]\}}$. However, for instance, the "${\displaystyle [0]}$" in ${\displaystyle \mathbb {Z} _{2}}$ and the "${\displaystyle [0]}$" in ${\displaystyle \mathbb {Z} _{3}}$ are different. One of them contains all even numbers, another contains all multiples of 3.
• To avoid such ambiguities, we may add a subscript to the classes. For instance, we may write ${\displaystyle \mathbb {Z} _{2}=\{[0]_{2},[1]_{2}\}}$ and ${\displaystyle \mathbb {Z} _{3}=\{[0]_{3},[1]_{3},[2]_{3}\}}$.

Exercise. A relation ${\displaystyle R}$ on ${\displaystyle \mathbb {Z} }$ is defined by

${\displaystyle aRb{\text{ if }}3a+b\equiv 0{\pmod {4}}.}$
(a) Prove that ${\displaystyle R}$ is an equivalence relation.

(b) Express each of the equivalence classes by ${\displaystyle R}$ ${\displaystyle [0]_{R},[1]_{R},[2]_{R},[3]_{R}}$ in terms of ${\displaystyle [0]_{4},[1]_{4},[2]_{4},[3]_{4}}$ (Hint: use the symmetric property of ${\displaystyle R}$).

Solution
(a)

Proof.

Reflexive: For every ${\displaystyle x\in \mathbb {Z} }$, since ${\displaystyle 3x+x=4x\equiv 0{\pmod {4}}}$, ${\displaystyle xRx}$.

Symmetric: For every ${\displaystyle x,y\in \mathbb {Z} }$, since ${\displaystyle xRy\implies 3x+y\equiv 0{\pmod {4}}\implies 9x+3y\equiv 0{\pmod {4}}\implies 9x-8x+3y\equiv \underbrace {-8x} _{\text{multiple of 4}}\equiv 0{\pmod {4}}\implies yRx}$.

Transitive: For every ${\displaystyle x,y,z\in \mathbb {Z} }$,

{\displaystyle {\begin{aligned}xRy{\text{ and }}yRz&\implies 3x+y\equiv 0{\pmod {4}}{\text{ and }}3y+z\equiv 0{\pmod {4}}\\&\implies (3x+y)+(3y+z)\equiv 0{\pmod {4}}\\&\implies 3x+z+4y\equiv 0{\pmod {4}}\\&\implies 3x+z\equiv -4y\equiv 0{\pmod {4}}\\&\implies xRz.\end{aligned}}}

${\displaystyle \Box }$

(b)

${\displaystyle [0]_{R}=\{x\in \mathbb {Z} :xR0\}=\{x\in \mathbb {Z} :0Rx\}=\{x\in \mathbb {Z} :x\equiv 0{\pmod {4}}\}=[0]_{4}.}$
(By the symmetric property of ${\displaystyle R}$, ${\displaystyle xR0\implies 0Rx}$. Also, ${\displaystyle 0Rx\implies xR0}$. So, ${\displaystyle xR0\iff 0Rx}$.)
${\displaystyle [1]_{R}=\{x\in \mathbb {Z} :xR1\}=\{x\in \mathbb {Z} :1Rx\}=\{x\in \mathbb {Z} :3+x\equiv 0{\pmod {4}}\}=\{x\in \mathbb {Z} :4+x\equiv 1{\pmod {4}}\}=\{x\in \mathbb {Z} :x\equiv 1{\pmod {4}}\}=[1]_{4}.}$
${\displaystyle [2]_{R}=\{x\in \mathbb {Z} :xR2\}=\{x\in \mathbb {Z} :2Rx\}=\{x\in \mathbb {Z} :6+x\equiv 0{\pmod {4}}\}=\{x\in \mathbb {Z} :8+x\equiv 2{\pmod {4}}\}=\{x\in \mathbb {Z} :x\equiv 2{\pmod {4}}\}=[2]_{4}.}$
${\displaystyle [3]_{R}=\{x\in \mathbb {Z} :xR3\}=\{x\in \mathbb {Z} :3Rx\}=\{x\in \mathbb {Z} :9+x\equiv 0{\pmod {4}}\}=\{x\in \mathbb {Z} :12+x\equiv 3{\pmod {4}}\}=\{x\in \mathbb {Z} :x\equiv 3{\pmod {4}}\}=[3]_{4}.}$

Properties of equivalence classes

In this section, we will discuss some properties of equivalence classes. In particular, we will address these two questions:

1. When are two equivalence classes equal?
2. Can two different equivalence classes contain a common element?

The answer to question 1 is given by the following theorem.

Theorem. Let ${\displaystyle R}$ be an equivalence relation defined on a set ${\displaystyle A}$. For every ${\displaystyle a,b\in A}$,

${\displaystyle [a]=[b]{\text{ if and only if }}aRb.}$

Proof. "${\displaystyle \Rightarrow }$" direction: Assume ${\displaystyle [a]=[b]}$. Since ${\displaystyle R}$ is an equivalence relation, and in particular, is reflexive, we have ${\displaystyle aRa}$. Thus, we have by definition ${\displaystyle a\in [a]}$. Then, since ${\displaystyle [a]=[b]}$ by assumption, we have ${\displaystyle a\in [b]}$.

"${\displaystyle \Leftarrow }$" direction: Assume ${\displaystyle aRb}$. First, for every ${\displaystyle x\in A}$,

{\displaystyle {\begin{aligned}x\in [a]&\implies xRa&({\text{definition}})\\&\implies xRb&(aRb{\text{ and }}{\text{transitivity of }}R)\\&\implies x\in [b].&({\text{definition}})\\\end{aligned}}}
So, ${\displaystyle [a]\subseteq [b]}$.

On the other hand, first, since ${\displaystyle aRb}$ by assumption, we have ${\displaystyle bRa}$ by the symmetry of ${\displaystyle R}$. Now, For every ${\displaystyle y\in A}$,

{\displaystyle {\begin{aligned}y\in [b]&\implies yRb&({\text{definition}})\\&\implies yRa&(bRa{\text{ and transitivity of }}R)\\&\implies y\in [a].&({\text{definition}})\\\end{aligned}}}
So, ${\displaystyle [b]\subseteq [a]}$.

Hence, ${\displaystyle [a]=[b]}$.

${\displaystyle \Box }$

Remark.

• From this theorem, we know that "${\displaystyle aRb}$" is the necessary and sufficient condition for "${\displaystyle [a]=[b]}$". Also, we have ${\displaystyle [a]\neq [b]}$ if and only if ${\displaystyle a\not Rb}$.

Now, let us consider the question 2. The answer to question 2 is, indeed, "No". The following corollary justifies this answer:

Corollary. Let ${\displaystyle R}$ be an equivalence relation defined on a nonempty set ${\displaystyle A}$. For every ${\displaystyle a,b\in A}$,

${\displaystyle [a]\neq [b]{\text{ if and only if }}[a]\cap [b]=\varnothing .}$

Proof. "${\displaystyle \Leftarrow }$" direction:

{\displaystyle {\begin{aligned}{}[a]\cap [b]=\varnothing &\implies [a]{\text{ and }}[b]{\text{ have distinct elements}}&([a]{\text{ and }}[b]{\text{ are nonempty}})\\&\implies [a]\neq [b].\end{aligned}}}
(${\displaystyle [a]}$ and ${\displaystyle [b]}$ are nonempty since ${\displaystyle R}$ is reflexive. So they must contain, at least, ${\displaystyle a}$ and ${\displaystyle b}$ respectively.)

"${\displaystyle \Rightarrow }$" direction: We use proof by contrapositive.

{\displaystyle {\begin{aligned}{}[a]\cap [b]\neq \varnothing &\implies \exists x\in [a]\cap [b]\\&\implies xRa{\text{ and }}xRb\\&\implies aRx{\text{ and }}xRb&(R{\text{ is symmetric}})\\&\implies aRb&(R{\text{ is transitive}})\\&\implies [a]=[b].&({\text{above theorem}})\\\end{aligned}}}

${\displaystyle \Box }$

Remark.

• From this result, we know that two equivalence classes are either equal or disjoint (since they are either equal or not equal). Hence, it is impossible for two different equivalence classes to contain a common element.

Now we have reached a key point in studying equivalence relations (and it is probably the major reason for studying equivalence relations at all): using equivalence relation on a set to construct a partition of that set, and vice versa. Before discussing it, let us define partition of a set:

Definition. (Partition) A partition of a nonempty set ${\displaystyle A}$ is a set of nonempty subset(s) of ${\displaystyle A}$ with the property that every element of ${\displaystyle A}$ belongs to exactly one of the subset(s). In other words, ${\displaystyle P}$ is a collection of pairwise disjoint and nonempty subset(s) of ${\displaystyle A}$ whose union is ${\displaystyle A}$.

Example. Let ${\displaystyle A=\{1,2,3\}}$. Then, a partition of ${\displaystyle A}$ is ${\displaystyle \{\{1\},\{2\},\{3\}\}}$. Another one is ${\displaystyle \{\{1,2\},\{3\}\}}$. However, ${\displaystyle \{\{1,2\},\{2,3\}\}}$ is not a partition of ${\displaystyle A}$ since ${\displaystyle \{1,2\}}$ and ${\displaystyle \{2,3\}}$ are not disjoint (or the element "2" belongs to two sets). Also, ${\displaystyle \{\{1\},\{3\}\}}$ is not a partition of ${\displaystyle A}$ since the union of ${\displaystyle \{1\}}$ and ${\displaystyle \{3\}}$ is not the entire set ${\displaystyle A}$ (or the element "2" does not belong to any of the sets inside the partition).

Exercise. Is ${\displaystyle \{\{1,2,3\}\}}$ a partition of ${\displaystyle A}$?

Solution

Yes, since every element of ${\displaystyle A}$ belongs to exactly one of the set inside the partition, namely the set ${\displaystyle \{1,2,3\}}$.

Example. Let ${\displaystyle A=\{1,2,3,4\}}$, and let a relation defined on ${\displaystyle A}$ be

${\displaystyle R=\{(1,1),(2,2),(3,3),(4,4),(1,2),(1,3),(2,1),(3,1),(2,3),(3,2)\}.}$
Recall that the two distinct equivalence classes are given by
${\displaystyle [1]=\{1,2,3\},[4]=\{4\}.}$
We can see that every element of ${\displaystyle A}$ belongs to exactly one of these equivalence classes. Hence, the set ${\displaystyle \{[1],[4]\}=\{\{1,2,3\},\{4\}\}}$ gives a partition of ${\displaystyle A}$.

Also, we can define another equivalence relation ${\displaystyle R}$ on ${\displaystyle A}$ such that the two distinct equivalence classes are given by

${\displaystyle [1]=\{1,2\},[3]=\{3,4\}.}$
We can also see that every element of ${\displaystyle A}$ belongs to exactly one of these equivalence classes. hence, the set ${\displaystyle \{[1],[3]\}=\{\{1,2\},\{3,4\}\}}$.

Example. Recall that the congruence of integers defines an equivalence relation ${\displaystyle R}$ on ${\displaystyle \mathbb {Z} }$. Also, there are ${\displaystyle n}$ distinct equivalence classes: ${\displaystyle [0],[1],\dotsc ,[n-1]}$. By Euclid's division lemma, every integer belongs to exactly one of these ${\displaystyle n}$ equivalence classes. Thus, the integers modulo ${\displaystyle n}$

${\displaystyle \mathbb {Z} _{n}=\{[0],[1],\dotsc ,[n-1]\}}$
gives a partition on ${\displaystyle \mathbb {Z} }$.

We can observe from the previous examples that equivalence relation of a set can be used to give a partition of that set. The following theorem suggests that, in general, an equivalence relation on a set ${\displaystyle A}$ can be used to give a partition of that set.

Theorem. Let ${\displaystyle R}$ be an equivalence relation defined on a nonempty set ${\displaystyle A}$. Then the set of all distinct equivalence classes by ${\displaystyle R}$ is a partition of ${\displaystyle A}$.

Proof. It suffices to show that every element of ${\displaystyle A}$ belongs to exactly one of the distinct equivalence classes.

For every ${\displaystyle x\in A}$, since ${\displaystyle R}$ is reflexive, we have ${\displaystyle x\in [x]}$. From this, we can ensure that every element of ${\displaystyle A}$ belongs to at least one of the distinct classes. It now remains to show that every element of ${\displaystyle A}$ also belongs to at most one of the distinct classes.

Assume that ${\displaystyle x}$ also belongs to the class ${\displaystyle [y]}$. Then, we have ${\displaystyle xRy}$. Since ${\displaystyle R}$ is an equivalence relation, it means ${\displaystyle [x]=[y]}$ by a previous theorem. Thus, any two equivalence classes to which ${\displaystyle x}$ belongs are equal. This means every element of ${\displaystyle A}$ cannot belong to more than one of the distinct classes.

Hence, every ${\displaystyle x}$ in ${\displaystyle A}$ belongs to exactly one of the distinct classes, and thus the set of all distinct equivalence classes by ${\displaystyle R}$ gives a partition of ${\displaystyle A}$.

${\displaystyle \Box }$

The following theorem suggests the converse of the above theorem is also true. To be more precise, we can use a partition of a set to construct an equivalence relation on that set. Before introducing the theorem, let us make some intuitive guesses on how to construct the equivalence relation in this way. First, from the previous theorem, roughly speaking, using an equivalence relation on a set, we can create several "groups" of elements in different classes, in which the elements are "relatives".

Now, given a partition of a set, it means we have several "groups" of elements. Such "grouping" intuitively indicates the elements inside the group are "relatives" in some sense. So, intuitively, a relation that relates the "relatives" seems to make the relation quite "close", and hence an equivalence relation.

The following theorem formalizes this intuition:

Theorem. Let ${\displaystyle P}$ be a partition of a nonempty set ${\displaystyle A}$. Define a relation ${\displaystyle R}$ on ${\displaystyle A}$ by

${\displaystyle xRy{\text{ if there exists }}S\in P{\text{ such that }}x,y\in S.}$
Then, the relation ${\displaystyle R}$ is an equivalence relation on the set ${\displaystyle A}$.

Proof. It suffices to prove that ${\displaystyle R}$ defined in this way is reflexive, symmetric, and transitive.

Reflexive: By the definition of partition, for every ${\displaystyle x\in A}$, ${\displaystyle x}$ belongs to exactly one of ${\displaystyle S\in P}$, so there exists ${\displaystyle S\in P}$ such that ${\displaystyle x\in S}$. Hence, ${\displaystyle xRx}$.

Symmetric: For every ${\displaystyle x,y\in A}$,

{\displaystyle {\begin{aligned}xRy&\implies \exists S\in P,x,y\in S\\&\implies \exists S\in P,y,x\in S\\&\implies yRx.\end{aligned}}}
Transitive: For every ${\displaystyle x,y,z\in A}$, assume ${\displaystyle xRy}$ and ${\displaystyle yRz}$. Then, there exist ${\displaystyle S,T\in P}$ such that ${\displaystyle x,{\color {blue}y\in S}}$ and ${\displaystyle {\color {blue}y},z{\color {blue}\in T}}$. But by the definition of partition, ${\displaystyle y}$ belongs to exactly one of the set in the partition ${\displaystyle P}$. So, we have ${\displaystyle S=T}$. Hence, there exists a set ${\displaystyle S}$ (${\displaystyle =T}$) such that ${\displaystyle x,z\in S}$, and thus ${\displaystyle xRz}$.

${\displaystyle \Box }$

Example. Let ${\displaystyle R}$ be a relation defined on ${\displaystyle \mathbb {Z} }$ by

${\displaystyle aRb{\text{ if }}|a|=|b|.}$

(a) Prove that ${\displaystyle R}$ is an equivalence relation.

(b) Determine all distinct equivalence classes by ${\displaystyle R}$ and hence give a partition on ${\displaystyle \mathbb {Z} }$.

Solution.

(a)

Proof. Reflexive: For every ${\displaystyle x\in \mathbb {Z} }$, ${\displaystyle |x|=|x|}$. So, ${\displaystyle xRx}$.

Symmetric: For every ${\displaystyle x,y\in \mathbb {Z} }$, ${\displaystyle xRy\implies |x|=|y|\implies |y|=|x|\implies yRx}$.

Transitive: For every ${\displaystyle x,y,z\in \mathbb {Z} }$, ${\displaystyle xRy{\text{ and }}yRz\implies |x|=|y|{\text{ and }}|y|=|z|\implies |x|=|z|\implies xRz}$.

${\displaystyle \Box }$

(b) First, some equivalence classes are

{\displaystyle {\begin{aligned}{}[0]&=\{x\in \mathbb {Z} :xR0\}=\{x\in \mathbb {Z} :|x|=0\}=\{0\},\\{}[1]&=\{x\in \mathbb {Z} :xR1\}=\{x\in \mathbb {Z} :|x|=1\}=\{-1,1\},\\{}[2]&=\{x\in \mathbb {Z} :xR2\}=\{x\in \mathbb {Z} :|x|=2\}=\{-2,2\},\dotsc \\\end{aligned}}}
So, all distinct equivalence classes are ${\displaystyle [0],[1],[2],\dotsc }$ (${\displaystyle -1\in [1]}$, so ${\displaystyle [-1]}$ is not distinct from them, etc.). Hence, a partition on ${\displaystyle A}$ is
${\displaystyle \{[0],[1],[2],\dotsc \}=\{[n]:n{\text{ is a nonnegative integer}}\}}$
(that is, every integer belongs to exactly one of ${\displaystyle [0],[1],[2],\dotsc }$.)

Exercise. Let ${\displaystyle R}$ be a relation defined on ${\displaystyle \mathbb {Z} }$ by

${\displaystyle aRb{\text{ if }}a+b{\text{ is even}}.}$

(a) Prove that ${\displaystyle R}$ is an equivalence relation.

(b) Determine all distinct equivalence classes by ${\displaystyle R}$, and hence give a partition on ${\displaystyle \mathbb {Z} }$.

Solution
(a)

Proof. Reflexive: For every ${\displaystyle x\in \mathbb {Z} }$, since ${\displaystyle x+x=2x}$ is even, ${\displaystyle xRx}$.

Symmetric: For every ${\displaystyle x,y\in \mathbb {Z} }$, ${\displaystyle xRy\implies x+y{\text{ is even}}\implies y+x=x+y{\text{ is even}}\implies yRx}$.

Transitive: For every ${\displaystyle x,y,z\in \mathbb {Z} }$,

{\displaystyle {\begin{aligned}xRy{\text{ and }}yRz&\implies x+y{\text{ is even}}{\text{ and }}y+z{\text{ is even}}\\&\implies (x+y)+(y+z)=x+2y+z{\text{ is even}}\\&\implies x+2y+z-2y{\text{ is even}}&(-2y{\text{ is even}})\\&\implies x+z{\text{ is even}}\\&\implies xRz.\\\end{aligned}}}

${\displaystyle \Box }$

(b) First, some equivalence classes are

{\displaystyle {\begin{aligned}{}[0]_{R}&=\{x\in \mathbb {Z} :xR0\}=\{x\in \mathbb {Z} :x{\text{ is even}}\}=[0]_{2},\\{}[1]_{R}&=\{x\in \mathbb {Z} :xR1\}=\{x\in \mathbb {Z} :x+1{\text{ is even}}\}=\{x\in \mathbb {Z} :x{\text{ is odd}}\}=[1]_{2}.\\\end{aligned}}}
Since every integer belongs to exactly one of ${\displaystyle [0]_{2}}$ and ${\displaystyle [1]_{2}}$ (i.e., all other equivalence classes are not distinct from them), it follows that ${\displaystyle [0]_{R}}$ and ${\displaystyle [1]_{R}}$ are all distinct equivalence classes.

Remark.

• Recall that the sum of two integers is even if and only if they have the same parity. So, this relation relates every pair of integers that have the same parity. So, intuitively, the relation ${\displaystyle R}$ can partition the integers into two "pieces": set of all odd integers and set of all even integers.