EQUIVALENCE RELATIONS
A partition $\Pi$ of a set S is a set of nonempty subsets of S which are pairwise disjoint and whose union is all of S. An equivalence relation on a set S is a reflexive, symmetric, transitive relation on S. Both of these structures is motivated by the idea of grouping objects that are alike in some respect. Partition and equivalence relation provide exactly the same class of structures. Each definition is a different way of presenting the same type of structure. This chapter spells this out in detail.
Contents
Equivalence relations and partitions
An equivalence relation determines a partition
A partition determines an equivalence relation
The fundamental theorem on equivalence relations
Consciousness-raising examples
Abstraction of similarity
This section concerns the idea of objects being alike in some respect.
• With poker chips, some are red, some are white and some are blue. You can group them into three subsets — the red ones, the white ones, and the blue ones. You can say two red chips are alike in having the same color, and a red and a blue chip are not alike because they have different colors.
• With natural numbers, some are divisible by 2 and some are not. You can group them into even ones and odd ones. We can say 4 and 10 are alike in that they are both even, and 5 and 11 are alike in that they are both odd. However, 4 and 5 are not alike in that respect.
In both these examples, we can abstract the idea of being alike in some respect by grouping the like objects together (clumping) or by making a statement that two given objects are alike or different. (See two.) These two ideas can be abstracted into the idea of partition and of equivalence relation.
Partitions
Definitions
Definition: Partition
If S is a set, a family $\Pi$ of subsets of S (called the blocks or equivalence classes of $\Pi$ ) is a partition of S if it satisfies the following axioms:
PAR.1 Every block of $\Pi$ is nonempty.
PAR.2 Every element of S is an element of exactly one block of $\Pi$.
Alternative Definition: Partition
If S is a set, a family $\Pi$ of subsets of S is a partition of S if
APAR.1 Every block of $\Pi$ is nonempty.
APAR.2 S is the union of all the blocks in $\Pi$.
APAR.3 If B and C are blocks in $\Pi$ and $B\ne C$, then $B\cap C=\emptyset$.
Remarks
• $\Pi$ is the Greek letter capital pi.
• The word “partition” has several other meanings in math.
• In everyday English, the word “partition” can refer to the division of something into pieces, but it can also refer to a wall that divides a room in two. Don’t let this mess with your mind: the mathematical idea has nothing to do with walls.
• A partition is a set of blocks. Don’t refer to one block as a partition.
• APAR.3 means by definition that $\Pi$ is pairwise disjoint.
Simple examples
Here are four partitions of the set {1, 2, 3, 4, 5}:
• $\Pi_1=\{\{1,2\},\{3,4\},\{5\}\}$
• $\Pi_2=\{\{1,2,5\},\{3,4\}\}$
• $\Pi_3=\{\{1,2,3,4,5\}\}$
• $\Pi_4=\{\{1\},\{2\},\{3\},\{4\},\{5\}\}$
Remarks
Think about the remarks below until you see why they are correct:
• $\{\{1,2,5\},\{3,4\}\}$ and $\{\{3,4\},\{1,2,5\}\}$ are the same partition (see here).
• $\{\{1,2,5\},\{3,4\}\}$ and $\{\{1,2,4\},\{3,5\}\}$ are different partitions, because they have different blocks.
• In $\Pi_2$, as in any partition with two blocks, each block is the complement of the other one.
• $\Pi_3$ is the only partition of {1, 2, 3, 4, 5} with exactly one block. Every nonempty set has a partition consisting of the whole set as the only block.
• $\Pi_4$ is the only partition with five blocks. Every nonempty set has a partition whose blocks are all the singleton subsets of the set.
• The empty set has just one partition, whose set of blocks is empty.
Non-examples
• $\{\{1,2\},\{3,5\}\}$ is not a partition of the set {1, 2, 3, 4, 5} because the element 4 is not in any block. It is, however, a partition of the set {1, 2, 3, 5}.
• $\{\{1,2,4\},\{3,4,5\}\}$ is not a partition (of any set) because 4 is in two different blocks, violating PAR.1. It violates APAR.3, too, because $\{1,2,4\}\ne\{3,4,5\}$ but $\{1,2,4\}\cap\{3,4,5\}\ne\emptyset$.
• $\{\{1,2\},\{3,4,5\},\emptyset\}$ is not a partition because one of its blocks is empty.
Representing partitions
Small finite partitions can be represented by diagrams like the following, which represents $\Pi_1$:

In this diagram, the circles are merely for grouping. The fact that they are circles has no significance. All that matters is which elements are in which circles.
Counting Partitions
The functions that count partitions are the Bell numbers and the Stirling numbers of the second kind.
•
The set {1, 2, 3, 4, 5} has 52 different partitions altogether. The
•
There are 25 different partitions of the set {1, 2, 3, 4, 5} that have
three blocks each ( $\Pi_1$ is one of them). The
Notation
Blocks
If $\Pi$ is a partition of a set S and $x\in S$, then there is a unique block of $\Pi$ that contains x as an element. This block is denoted by $[x]_\Pi$. For example, $[1]_{\Pi_1}=\{1,2\}$, $[5]_{\Pi_1}=\{5\}$ and $[3]_{\Pi_1}=[4]_{\Pi_1}$.
Sequence notation
It may happen that an author refers to a partition as if it were a sequence of sets. For example, they might say $\Pi_1$ is the partition $(B_1,B_2,B_3)$, where $B_1=\{1,2\}$, $B_2=\{3,4\}$ and $B_3=\{5\}$. Be warned: the order the blocks are listed in doesn’t matter, even though in sequence notation it usually does matter.
Exercise PAR
Provide an example with the given property of a partition $\Pi$ of the set $\mathbb{R}$ of real numbers. Answers.
a) $\Pi$ has at least one block with exactly three elements.
b) {1,2} and {3} are blocks of $\Pi$.
c) $\Pi$ has at least one finite block and at least one infinite block.
d) $\Pi$ has an infinite number of finite blocks.
e) $\Pi$ has an infinite number of infinite blocks.
Exercise IIZ
Find a partition of $\mathbb{Z}$ that has an infinite number of infinite blocks. Answer.
Equivalence relations
The concept of equivalence relation is an abstraction of the idea of two math objects being like each other in some respect.
• If an object a is like an object b in some specified way, then b is like a in that respect.
• a is like itself in every respect!
So if you want to give an abstract definition of a type of relation intended to capture the idea of being alike in some respect, two of the properties you could require are reflexivity and symmetry. The nearness relations are reflexive and symmetric. Relations with those two properties are studied in applied math NEED REFERENCE but here we are going to require the additional property of transitivity, which roughly speaking forces the objects to fall into discrete types, making a partition of the set of objects being studied.
Definition: Equivalence relation
An equivalence relation on a set S is a reflexive, symmetric, transitive relation on S.
Note This definition is an abstraction of the idea of “being like each other”. You don’t have to have some property or mode of similarity in mind to define an equivalence relation.
Examples
See also these examples.
• The relation “equals” on any set is an equivalence relation. On the set {1, 2, 3}, “equals” is the relation {(1,1),(2,2),(3,3)}.
• The relation E on the real numbers defined by $x\,E\,y$ if and only if $x^2=y^2$ is an equivalence relation. In this case, x and y are like each other in this respect: They have the same square.
• Let A = {1, 2, 3, 4, 5} and let $\alpha=\{(1,1),(1,2),(1,5),(2,1),(2,2),(2,5),(3,3),(3,4),(4,3),(4,4),(5,1),(5,2),(5,5)\}$. Then $\alpha$ is an equivalence relation on A. You can define this relation more easily by saying: “ $x\,\alpha\,y$ if and only if x and y are in the same block of $\Pi_2$ (above).” This is the key to the relationship between equivalence relations and partitions.
• For any integer k, congruence (mod k) is an equivalence relation, discussed here.
Non-examples
• The relation “ $\le$ ” on the set of real numbers is not an equivalence relation. It is reflexive and transitive but not symmetric: For example, $3\le 5$ is true but $5\le 3$ is false. This relation is an example of an ordering.
• The relation E defined on the real numbers by $x\,E\,y$ if and only if $x>0$ and $y>0$ is not an equivalence relation. It is symmetric and transitive but not reflexive. It is a partial equivalence relation.
• The relation D defined on a set of sets by x D y if and only if x and y are disjoint is not an equivalence relation. It is reflexive and symmetric but not transitive.
Equivalence relations and partitions
This is the fundamental fact connecting equivalence relations and partitions:
Every equivalence relation on a set S determines a specific partition of S and every partition of S determines a specific equivalence relation on S. These operations are inverse to each other.
This statement is not a theorem because I haven’t told you how each equivalence relation induces a partition and vice versa. The proper statement is the Fundamental Theorem on Equivalence Relations below, but to state it requires several definitions. A more detailed explanation with proofs is given here.
An equivalence relation determines a partition
If an equivalence relation E is given on a set S, the elements of S can be collected together into subsets, with two elements in the same subset if and only if they are related by E. This collection of subsets of S is a set denoted S/E, the quotient set of S by E. Here is the formal definition of S/E:
Definition: quotient set of an equivalence relation
Let E be an equivalence relation on a set S. For each $x\in S$, the equivalence class of x mod E, denoted by $[x]_E$, is the subset $\{y\in S\mid y\,E\,x\}$ of S. The quotient set of E is the set of equivalence classes of x mod E for all $x\in S$.
Warning
I have now defined two notations that look like $[x]_s$ for some symbol s. If s denotes a partition, $[x]_s$ is the block of the partition that contains x. If s denotes an equivalence relation, $[x]_s$ denotes the set $\{y\in S\mid y\,s\,x\}$. Thus the notation “ $[x]_s$ ” is overloaded. However, the fundamental theorem below says don’t worry, be happy about this.
Example
Let A = {1, 2, 3, 4, 5} and let
$\alpha=\{(1,1),(1,2),(1,5),(2,1),(2,2),(2,5),(3,3),(3,4),(4,3),(4,4),(5,1),(5,2),(5,5)\}$
(We looked at this example before.) Notice that $[2]_\alpha=\{1,2,5\}$, because by definition
$[2]_\alpha=\{x\mid(x,2)\in\alpha\}$
and you can see that the only three pairs in $\alpha$ whose second coordinate is 2 are (1,2), (2,2) and (5,2). Reasoning in the same way, we have
$[1]_\alpha=[2]_\alpha=[5]_\alpha=\{1,2,5\}$ and $[3]_\alpha=[4]_\alpha=\{3,4\}$
so by definition the quotient set of $\alpha$ is the partition $\{\{1,2,5\},\{3,4\}\}$, which I called $\Pi_2$ above. In other words, $A/\alpha=\Pi_2$.
The fact that the quotient set is a partition is always true:
Theorem
If S is a set and E is an equivalence relation on S, then the quotient set S/E is a partition of S.
Proof
• Proof of Par.1: Any block of S/E is of the form $[x]_E$ for some $x\in S$. By definition, $[x]_E=\{y\in S\mid y\,E\,x\}$. Since E is reflexive, x E x, so $[x]_E$ is nonempty because it contains x.
• Proof of Par.2: We know that x is in at least one set because $x\in[x]_E$ by reflexivity. Suppose $x\in[y]_E$ and $x\in[z]_E$. We must show that $[y]_E=[z]_E$ as sets. That means by definition of set equality we must show that for any element w, $w\in[y]_E$ if and only if $w\in[z]_E$. Suppose (modus ponens) that $w\in[y]_E$. Then by comprehension, w E y. Then $x\in[y]_E$, so x E y. By symmetry, y E x. So by transitivity, w E x. Since $x\in[z]_E$, we know x E z. So by transitivity, w E z, which means $w\in[z]_E$. That is half the proof. You do the other half.
How to think about S/E
If E is an equivalence relation on S, you can think of the quotient set S/E as obtained by merging equivalent elements of S. In the example above, 3 and 4 are equivalent so they are merged into the equivalence class {3, 4}, which is both $[3]_\alpha$ and $[4]_\alpha$.
One often says that one identifies equivalent elements. Here, “identify” means “make identical” rather than “discover the identity of”. Mathematicians may also say we glue equivalent elements together. Thus we form the Möbius strip by gluing the left and right edge of the unit square together in a certain way.
Exercises
BTWO Let S = {1, 2, 3, 4}. Find two different equivalence relations E and E' with the property that the subset {1, 2} is a block of both S/E and S/E'. Answer.
INTB Give an example of an equivalence relation E on the set $\mathbb{R}$ of real numbers with the property that the interval [0, 1] is one of the equivalence classes of E. Answer
A partition determines an equivalence relation
Given a partition $\Pi$, you get an equivalence relation $E_\Pi$ by the definition:
$x\,E_\Pi\,y\iff[x]_\Pi=[y]_\Pi$
In other words, $x\,E_\Pi\,y$ if and only if x and y are in the same block of $\Pi$. The relation $E_\Pi$ is well-defined because each element is in exactly one block of $\Pi$ by PAR.2.
Theorem
For a partition $\Pi$ of S, the relation $E_\Pi$ is an equivalence relation on S.
Proof
All three steps in this proof depend on the fact that each element of S is in exactly one block (Par.2).
• Since x is in the same block as itself, $x\,E_\Pi\,x$, so $E_\Pi$ is reflexive.
• If $x\,E_\Pi\,y$, then x and y are in the same one and only block, which is the same thing as saying that y and x are in the same block, so $y\,E_\Pi\,x$. So $E_\Pi$ is symmetric.
• If $x\,E_\Pi\,y$ and $z\,E_\Pi\,y$, then x is in the same block as y and z is in the same block as y. By Par.2, x and z must be in the same block, so $x\,E_\Pi\,z$ Hence $E_\Pi$ is transitive.
The fundamental theorem on equivalence relations
One way to state the fundamental theorem
Above we showed how to take an equivalence relation E and construct a partition S/E. Then we showed how to take a partition $\Pi$ of a set S and construct an equivalence relation $E_\Pi$.
The fundamental theorem on equivalence relations says that if you perform one construction and then the other you get back what you started with. In other words:
• If you have an equivalence relation E, construct the quotient set S/E, which is a partition, and then construct the equivalence relation $E_{S/E}$ corresponding to that partition, you get the equivalence relation E you started with.
• If you have a partition $\Pi$ of S, construct the corresponding equivalence relation $E_\Pi$ and then construct the quotient set $S/E_\Pi$ of $E_\Pi$, you get the partition $\Pi$ back again.
$E_{S/E}=E$ and $S/E_\Pi=\Pi$
Note This pair of equations condenses the information down to two cryptic statements. It is worthwhile spending a few minutes trying to spell out to yourself in detail just what they say.
Lots of math in research papers is excruciatingly succinct.
You need to practice unwinding what they say.
The proof of the fundamental theorem involves the same sort of arguments given above.
Another way to state the fundamental theorem
Let S be a set, let $\Pi(S)$ be the set of all partitions of S, and let E(S) be the set of all equivalence relations on S. The fundamental theorem says that the two constructions given above produce a function $R:\Pi(S)\to E(S)$ and a function $Q:E(S)\to\Pi(S)$ that are inverses to each other. This means they are bijections. In fact, E and $\Pi$ are functors that are naturally isomorphic by these bijections.
Example
If S = {1, 2}, then
• $\Pi(S)$ is the set {{{1}, {2}}, {{1, 2}}}. It has two elements, the partition {{1}, {2}} and the partition {{1, 2}}.
• E(S) is the set {{1, 1), (2, 2)}, {(1, 1), (2, 2), (1, 2), (2, 1)}}. It contains the two equivalence relations {1, 1), (2, 2)} and {(1, 1), (2, 2), (1, 2), (2, 1)}.
• R[{{1}, {2}}] = {(1, 1), (2, 2)} and R[{{1, 2}}] = {(1, 1), (2, 2), (1, 2), (2, 1)}.
• Q[ {(1, 1), (2, 2)} ] = {{1}, {2}} and Q[ {(1, 1), (2, 2), (1, 2), (2, 1)}] = {{1, 2}}.
According to the fundamental theorem,
An equivalence relation is the same thing as a partition
Of course, they are described differently, but once you have an equivalence relation you have a partition and vice versa. All you know about the partition is determined by the data of the equivalence relation and all you know about the equivalence relation is determined by the data of the partition.
The relationship between equivalence relations and partitions is a basic and important example of the fact that two different looking kinds of structures can actually be two different descriptions of the same kind of structure.
Consciousness-raising examples
Partition of Z by remainders To Do
For now, read about this in Wikipedia here.
The quotient of the squaring function
Let $\Pi$ be the partition of $\mathbb{R}$ whose blocks are all subsets of the form $\{r,-r\}$ for all $r\ge 0$. $\Pi$ is the quotient set of the squaring function $f:\mathbb{R}\to\mathbb{R}$ defined by $f(x)=x^2$. Observe that:
• $\Pi$ has an infinite number of blocks.
• $\{1,-1\}$, $\{2,-2\}$ and $\{0\}$ are blocks of $\Pi$.
• Every block of $\Pi$ except $\{0\}$ has exactly two elements.
A foliation of the real plane
For any given real number c, let $f_c(x)=x^2+c$. This defines an infinite family of functions $f_c:\mathbb{R}\to\mathbb{R}$. For a given c, the graph of $f_c$ is the subset $\{(x,x^2+c)\mid x\in\mathbb{R}\}$, which I will denote by $G_c$, of the real plane $\mathbb{R}\times\mathbb{R}$. You can check that these subsets $G_c$ are a partition of $\mathbb{R}\times\mathbb{R}$. The picture below shows some of the blocks.
• These blocks are dense in $\mathbb{R}\times\mathbb{R}$, meaning that between any two of them there is an infinite number of others. There is no block next to a given block. They are dense in $\mathbb{R}\times\mathbb{R}$ just like the points on the real line are dense.
• This is a baby example of a foliation (Wikipedia, MathWorld).

Answers to
exercises
Answers to Exercise PAR. Each problem has many possible answers. I give only one for each.
a) Let $B_1=\{1,3,5\}$ and $B_2=$ the set of all real numbers except 1, 3 and 5.
b) Let $B_1=\{1,2\}$. $B_2=\{3\}$ and $B_3=$ the set of all real numbers except 1, 2 and 3.
c) The answers to a) and to b) also work for this one.
d) For each positive integer n, let $B_n=\{n,-n\}$, and let $B_0=$ the set of all real numbers that are not integers.
e) For each integer n, let $B_n=\{x\in\mathbb{R}\mid n\le x<n+1\}$. Can you think of a partition of the integers $\mathbb{Z}$ that has an infinite number of infinite blocks?
Answer to Exercise IIZ
For each prime p, let $B_p=\{p^n\mid n\ge 1\}$. Let $C=\mathbb{Z}\setminus\bigcup\limits_{p\text{ prime}}B_p$. (See set subtraction). Then set $\Pi=\{B_p\mid p\text{ prime}\}\cup\{C\}$. Then $\Pi$ is a partition of $\mathbb{Z}$ with an infinite number of infinite blocks. Note: I have deliberately used succinct notation that you may have to unwind extensively before you understand it. (Pretend you are a kitten attacking a ball of yarn.)
Answer to Exercise BTWO
There are exactly two such equivalence relations, namely {(1,1), (2,2), (3,3), (4,4), (1,2), (2,1)} and {(1,1), (2,2), (3,3), (4,4), (1,2), (2,1), (3,4), (4,3)} . Note that {(1,1), (2,2), (3,3), (4,4), (1,2), (2,1), (1,3), (3,1), (2,3), (3,2)} is not an answer. Its partition is {{1, 2, 3}, {4}}, and althouogh 1 and 2 are indeed in the same block, {1, 2} is not a block.
Answer to Exercise INTB.
The easiest way to answer questions like this is to put everything outside of [0, 1] into singleton blocks, so the answer would be
$x\,E\,y\text{ if and only if }x=y\text{ or }x,y\in[0,1]$
There is an infinite number of other answers.