Skip to main content

Section 15.1 Equivalence relations

Consider the relation \(R\) on \(X=\{a,b,c,d,e,f,g\}\text{,}\) where

\begin{align*} R = \Big\{ \amp (a,a), (a,d), (a,g), (b,b), (b,c), (b,e), (b,f),\\ \amp (c,b), (c,c), (c,e), (c,f), (d,a), (d,d), (d,g), (e,b),\\ \amp (e,c), (e,e), (e,f), (f,b), (f,c), (f,e), (f,f) \Big\}. \end{align*}

The digraph is drawn below:

The directed graph of the above relation. There is a loop at each element. The elements \(a\text{,}\) \(d\text{,}\) and \(g\) are all related to each other in both directions, as are \(b\text{,}\) \(c\text{,}\) \(e\text{,}\) and \(f\text{.}\)
Figure 15.1.1.

The directed graph of the above relation. There is a loop at each element. The elements \(a\text{,}\) \(d\text{,}\) and \(g\) are all related to each other in both directions, as are \(b\text{,}\) \(c\text{,}\) \(e\text{,}\) and \(f\text{.}\)

The most visually striking feature of this directed graph is that the set \(X\) is partitioned into separated “blocks”: the piece with \(a\text{,}\) \(d\text{,}\) and \(g\text{,}\) and the piece with \(b\text{,}\) \(c\text{,}\) \(e\text{,}\) and \(f\text{.}\)

To understand this phenomenon, let's try to understand what properties \(R\) has? It is reflexive, it is symmetric, and it is transitive. (Verify these for yourself.) Taken together they imply a “fullness” of the relation in the blocks: the arrow \((a,d)\) brings with it the arrows \((a,a)\text{,}\) \((d,a)\text{,}\) and \((d,d)\text{,}\) and if we add \((d,g)\text{,}\) we get \((a,g)\text{,}\) \((g,d)\text{,}\) \((g,a)\text{,}\) and \((g,g)\text{.}\)

A relation with this set of properties is useful enough to earn its own title.

Definition 15.1.2.

An equivalence relation is any relation that is reflexive, symmetric, and transitive.

The idea is that an equivalence relation behaves like equality, as evidenced in the examples below.

The relation given by the statement \(x=y\) on any set \(X\) is an equivalence relation. In fact it is the prototypical equivalence relation, in the sense that the point of an equivalence relations is to get the idea of equality in a less strict way.

The typical way to define equivalence between sets is to say that two sets \(X\) and \(Y\) are isomorphic if \(|X|=|Y|\text{.}\) This relation is an equivalence relation, but \(X\) and \(Y\) do not need to actually be equal to be equivalent. (You may have noticed often we relabel the elements of a set in proofs and examples. This is because, when we are just looking at things on the set level, we don't care what the elements are but rather how many there are.)

Let \(\mathscr{S}\) be a family of propositional statements on a set of statement letters and define the relation \(\phi \equiv \psi\) to mean that \(\phi \to \psi\) and \(\psi \to \phi\) are both always true regardless of the truth values of the statement letters that compose \(\phi\) and \(\psi\text{.}\)

This relation, which should be familiar from the first few chapters of this book, is an equivalence relation. It is reflexive because \(\phi \to \phi\) is a tautology. It is symmetric because “\(\phi \to \psi\) and \(\psi \to \phi\) are both tautologies” is the same sentence as “\(\psi \to \phi\) and \(\phi \to \psi\) are both tautologies”. Finally, it is transitive because the conditional is. Let \(\gamma\) be a third statement and suppose \(\phi \to \psi\) and \(\psi \to \gamma\) are both tautologies. Then, \(\phi \to \gamma\) is a tautology as well.

Definition 15.1.6.

Let \(R\) be an equivalence relation on a set \(X\text{.}\) The equivalence class of \(x \in X\) is the set of all elements to which it is equivalent:

\begin{equation*} [x] = \{ y \in X \; | \; (x,y) \in R \}. \end{equation*}

Let again

\begin{align*} R = \Big\{ \amp (a,a), (a,d), (a,g), (b,b), (b,c), (b,e), (b,f),\\ \amp (c,b), (c,c), (c,e), (c,f), (d,a), (d,d), (d,g), (e,b),\\ \amp (e,c), (e,e), (e,f), (f,b), (f,c), (f,e), (f,f) \Big\}. \end{align*}

be a relation on \(X = \{a,b,c,d,e,f,g\}\) whose directed graph is reproduced below. This relation divides its underlying set into the equivalence classes

\begin{equation*} [a] = \{a,d,g\} \end{equation*}

and

\begin{equation*} [b]=\{b,c,e,f\}, \end{equation*}

precisely the discrete “blocks” of the digraph. Note that the name of the equivalence class is an arbitrarily chosen representative: \([b]\text{,}\) \([c]\text{,}\) \([e]\text{,}\) and \([f]\) all refer to the same set.

Let's do something a little weird, and order the elements of the set as follows: \((a, d, g, b, c, e, f)\text{.}\) The following Boolean matrix is constructed in that order, so that the second row represents the elements that \(d\) is related to. What do you notice?

\begin{equation*} M_R = \left( \begin{array}{ccccccc} 1 \amp 1 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \\ 1 \amp 1 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \\ 1 \amp 1 \amp 1 \amp 0 \amp 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \amp 1 \amp 1 \amp 1 \amp 1 \\ 0 \amp 0 \amp 0 \amp 1 \amp 1 \amp 1 \amp 1 \\ 0 \amp 0 \amp 0 \amp 1 \amp 1 \amp 1 \amp 1 \\ 0 \amp 0 \amp 0 \amp 1 \amp 1 \amp 1 \amp 1 \\ \end{array} \right) \end{equation*}

Consider the set \(\mathscr{B}_2\) of all \(2\times 2\) Boolean matrices. Define an equivalence relation on this set by saying that \(A \sim B\) if and only if \(A\) and \(B\) have the same number of ones. Confirm for yourself that this relation is reflexive, symmetric, and transitive.

The equivalence classes under this relation are as follows:

\begin{equation*} \left[ \left( \begin{array}{cc} 0 \amp 0 \\ 0 \amp 0 \end{array} \right) \right] = \left\{ \left( \begin{array}{cc} 0 \amp 0 \\ 0 \amp 0 \end{array} \right) \right\} \end{equation*}
\begin{equation*} \left[ \left( \begin{array}{cc} 1 \amp 0 \\ 0 \amp 0 \end{array} \right) \right] = \left\{ \left( \begin{array}{cc} 1 \amp 0 \\ 0 \amp 0 \end{array} \right), \left( \begin{array}{cc} 0 \amp 1 \\ 0 \amp 0 \end{array} \right), \left( \begin{array}{cc} 0 \amp 0 \\ 1 \amp 0 \end{array} \right), \left( \begin{array}{cc} 0 \amp 0 \\ 0 \amp 1 \end{array} \right) \right\} \end{equation*}
\begin{equation*} \left[ \left( \begin{array}{cc} 1 \amp 1 \\ 0 \amp 0 \end{array} \right) \right] = \left\{ \left( \begin{array}{cc} 1 \amp 1 \\ 0 \amp 0 \end{array} \right), \left( \begin{array}{cc} 1 \amp 0 \\ 1 \amp 0 \end{array} \right), \left( \begin{array}{cc} 1 \amp 0 \\ 0 \amp 1 \end{array} \right), \left( \begin{array}{cc} 0 \amp 1 \\ 1 \amp 0 \end{array} \right), \left( \begin{array}{cc} 0 \amp 1 \\ 0 \amp 1 \end{array} \right), \left( \begin{array}{cc} 0 \amp 0 \\ 1 \amp 1 \end{array} \right) \right\} \end{equation*}
\begin{equation*} \left[ \left( \begin{array}{cc} 1 \amp 1 \\ 1 \amp 0 \end{array} \right) \right] = \left\{ \left( \begin{array}{cc} 1 \amp 1 \\ 1 \amp 0 \end{array} \right), \left( \begin{array}{cc} 1 \amp 1 \\ 0 \amp 1 \end{array} \right), \left( \begin{array}{cc} 1 \amp 0 \\ 1 \amp 1 \end{array} \right), \left( \begin{array}{cc} 0 \amp 1 \\ 1 \amp 1 \end{array} \right) \right\} \end{equation*}
\begin{equation*} \left[ \left( \begin{array}{cc} 1 \amp 1 \\ 1 \amp 1 \end{array} \right) \right] = \left\{ \left( \begin{array}{cc} 1 \amp 1 \\ 1 \amp 1 \end{array} \right) \right\} \end{equation*}

Observe that, in this case, each equivalence class contains \({{4}\choose{r}}\) matrices. Do you see why?