Digital Garden
Maths
Discrete Maths
Relations & Functions
Equivalence Relations

Equivalence Relations

A relation RR is an equivalence relation if it is reflex, symmetric and transitive. To show that the relation RR is an equivalence relation, we can write instead of aRbaRb, aba \equiv b or aba \sim b if the relation is clear and aa is related to bb. If the relation is not clear, we can write aRba \equiv_R b or aRba \sim_R b.

Therefore we know that a relation RR is an equivalence relation if it satisfies the following properties:

  • aA,aRa\forall a \in A, a \equiv_R a (reflexive)
  • a,bA,aRb    bRa\forall a, b \in A, a \equiv_R b \implies b \equiv_R a (symmetric)
  • a,b,cA,aRbbRc    aRc\forall a, b, c \in A, a \equiv_R b \land b \equiv_R c \implies a \equiv_R c (transitive)

This makes sense if we think of we compare it to our normal understandin of "equivalence":

  • We say that two things that are the same are equivalent to each other (reflexive).
  • If something is equivalent to something else, then that something else is equivalent to the first thing (symmetric).
  • If something is equivalent to something else, and that something else is equivalent to another thing, then the first thing is equivalent to the other thing (transitive).
Example

For the set A={1,2,3}A = \{1, 2, 3\}, the relation R={(1,1),(2,2),(3,3),(2,3),(3,2)}R = \{(1, 1), (2, 2), (3, 3), (2,3), (3, 2)\} is an equivalence relation.

  • The relation RR is reflexive because (1,1),(2,2),(3,3)R(1, 1), (2, 2), (3, 3) \in R.
  • The relation RR is symmetric because (2,3),(3,2)R(2, 3), (3, 2) \in R. (1,2)(1,2) and (2,1)(2,1) do not have to be in RR.
  • The relation RR is transitive because (2,3),(3,2)R(2, 3), (3, 2) \in R and (2,2),(3,3)R(2, 2), (3, 3) \in R.

Equivalence Classes

Given an equivalence relation RR on a set AA, the equivalence class is a subset of AA that contains all the elements that are equivalent to a given element aAa \in A. The equivalence class of aa is denoted by [a][a] if the relation is clear, or [a]R[a]_R if the relation is not clear. More formally, the equivalence class of aa is defined as:

[a]R={bAaRb}[a]_R = \{b \in A | a \equiv_R b\}

Because of the reflexive, symmetric and transitive properties of the equivalence relation, the equivalence classes partition the set AA into subsets that must either be equal or disjoint. So for any elements a,bAa, b \in A:

  • If aRba \equiv_R b, then [a]R=[b]R[a]_R = [b]_R
  • Or if a̸Rba \not\equiv_R b, then [a]R[b]R=[a]_R \cap [b]_R = \emptyset.
Example

For the set A={1,2,3}A = \{1, 2, 3\} and the equivalence relation R={(1,1),(2,2),(3,3),(2,3),(3,2)}R = \{(1, 1), (2, 2), (3, 3), (2,3), (3, 2)\}, the equivalence classes are:

  • [1]R={1}[1]_R = \{1\}
  • [2]R={2,3}[2]_R = \{2, 3\}
  • [3]R={2,3}[3]_R = \{2, 3\}

As we can see, [2]R=[3]R[2]_R = [3]_R and [1]R[2]R=[1]_R \cap [2]_R = \emptyset and therefore the equivalence classes partition the set AA.

Equivalence Classes as Modulo

interesting but not really important