Binary Relations and Equivalence Relations

Intuitively, a binary R on a A is a proposition such that, for every (a, b) ∈ A × A, one can decide if a is related to b or not. Therefore, such a relationship can be viewed as a restricted set of ordered pairs. Formally,

Definition 1.1 A in a set A is a R ⊂ A × A. The statement “(a, b) ∈ R” is written as a R b.

Example 1.2 (a) For any set A the ∆ = {(a, a) | a ∈ A} is the relation of . The relation (A × A) \ ∆ is the relation of .

(b) The relation ≤ between two real numbers is the set

{(x, y) | x ≤ y} ⊂ R × R .

(c) In P(A) the relation of inclusion is given by

{(A, B) ∈ P(A) × P(A) |B ⊂ A} .

If A is a set with a binary relation R and B ⊂ A then the relation R ∩ (B × B) is a binary relation on the set B. This is the relation on B induced by R.

Of all the relations, one of the most important is the .

Definition 1.3 An equivalence relation on a set X is a binary relation on X which is reflexive, symmetric and transitive, i.e.

(a) ∀a ∈ A : a R a (reflexive).

(b) a R b ⇒ b R a (symmetric).

(c) a Rb and b R c ⇒ a R c (transitive).

If a R b we say that a is equivalent to b.

Example 1.4 (a) The relation ∆ is an equivalence relation.

1 (b) In Z the relation {(x, y) ∈ Z × Z | x − y is divisible by 2} is an equivalence relation.

(c) Let f : X → Y be a . Then {(x1, x2) | f(x1) = f(x2)} is an equivalence relation in X.

Let us check the assertion (b). First, reflexibity. ∀x we have x−x = 0 and 0 is divisible by 2. Hence the relation is reflexive. Moreover, since y − x = (−1) (x − y) it is clear that if 2|(x − y then 2|(y − x). Hence the relation is symmetric. Finally, if 2|(x − y) and 2|(y − z), then since x − z = (x − y) + (y − z), it is clear that 2|(x − z). So the relation is also transitive and hence is an equivalence relation.

Suppose that R is an equivalence relation on the set X. If x ∈ X let E(x, R) denote the set of all elements y ∈ X such that xRy. The set E(x, R) is called the equivalence of x for the equivalence relation R. Since R is an equivalence relation, the equivalence classes have the following properties:

1. Each E(x, R) is non-empty for, since xRx, x ∈ E(x, R).

2. Let x and y be elements of X. Since R is symmetric, y ∈ E(x; R) if and only if x ∈ E(y; R).

3. If x, y ∈ X the equivalence classes E(x; R) and E(y; R) are either identical or they have no members in common.

Indeed, suppose, first, that xRy. Let z ∈ E(x; R). Then, by , since zRx we have also xRz. Hence, by transitivity, zRy and so, by symmetry, yRz. This shows that E(x; R) ⊂ E(y; R). By the symmetry of R we see that E(y; R) ⊂ E(x; R). Hence E(x; R) = E(y; R).

Finally, notice that if the points x, y ∈ X are not related then E(x; R)∩E(y; R) = ∅. Indeed, if z ∈ E(x; R) ∩ E(y; R) then xRz and yRz and so xRz and zRy. Therefore xRy which is a contradiction.

These facts lead to the following assertions concerning the family, F, of equivalence classes for the equivalence relation R:

1. Every of the family F is non-empty.

2. Each element x ∈ X belongs to one and only one of the sets in the family F.

3. xRy if and only if x and y belong to the same set in the family F.

2 Otherwise said, and equivalence relation subdivides a set (or partitions the set) into the of a family of non-overlapping, non-smpty .

Here is an example which is perhaps the first most students see when they discuss number systems.

Example 1.5 :In the construction of the rational numbers, which we will denote by Q, we first introduce ratios of p/q where p ∈ N and q ∈ Z. If p/q represents a point on the number line, then the ratios kp/kq must represent the same point and hence the same . Thus, two ratios p/q and r/s represent the same rational number and can be treated as equal and can be substituted for one another in proofs involving rational numbers whenever the equality

ps = rq is true.

Now, let us define a relation on N × Zby (p, q) R (r, s) if and only if ps = rq. We check that this is an equivalence relation as follows:

(a) (Reflexivity): pq = pq hence (p, q) R (p, q).

(b) (Symmetry): If ps = rq then rq = ps and so

(pq) R (r, s) ⇒ (r, s) R (p, q) .

(c) (Transitivity): If ps = rq and rt = vs, then

(pt) · s = (ps) · t = (rq) · t = (rt) · q = (vs) · q = (vq) · s

and thur pt = vq since s 6= 0. Hence (p, q) R (r, s) and (r, s) R (v, t) implies (p, q) R (v, t).

From this we see that the rational numbers can be viewed as equivalence classes of ratios of integers the relation R given in the example.

As a final example consider the following:

3 Example 1.6 : Consider the set Z and let n be a fixed positive . Define a relation Rn by

xRny provided (x − y) is divisible by n .

This relation is called the relation of congruence modulo n. It is easy to check that this is an equivalence relation on Z. (See the special case for n = 2 treated above.) Moreover, there are n equivalence classes. Each integer x is uniquely expressible in the form x = q n + r, where q and r are integers and 0 ≤ R ≤ n − 1. (The integers q and r are called the and the remainder respectively. Hence each x is congruent modulo n to one of the n integers 0, 1, . . . , n − 1. The equivalence classes are

E0 = {..., −2n, −n, 0, n, 2n, . . .}

E1 = {..., 1 − 2n, 1 − n, 1 + n, 1 + 2n, . . .} . . . .

En−1 = {. . . , n − 1 − 2n, n − 1 − n, n − 1, n − 1 + n, n − 1 + 2n, . . .}

Formallly, the domain of a relation, R, is the set of all first coordinates of the members of R while, in this context, the range is the set of all second coordinates. Formally

dom (R) = {x ∈ X | for some y ∈ Y, (x, y) ∈ R} , while

rng (R) = {y ∈ Y | for some x ∈ X, (x, y) ∈ R} .

The inverse of a relation R, denoted R−1, is obtained by reversing each of the pairs belonging to R. Thus

R−1 = {(y, x) ∈ Y × X | (x, y) ∈ R} . Hence the domain of the inverse is the range of R and the range of R−1 is always the domain of R.

If R and S are relations, then the composition R ◦ S is defined as

{(x, z) ∈ X × Z | for some y, (x, y) ∈ S and (y, z) ∈ R} .

4 Example 1.7 If R = {(1, 2)} and S = {(0, 1)} then R ◦ S = {(0, 1)} while S ◦ R = ∅.

Concerning compositions and inverses we have the following result

Proposition 1.8 Let R, S, and T be relations. Then

(a) (R−1)−1 = R.

(b) (R ◦ S)−1 = S−1 ◦ R−1 .

(c) R ◦ (S ◦ T ) = (R ◦ S) ◦ T

Proof: (of (b)) We have

(x, a) ∈ (R ◦ S)−1 ⇔ (x, z) ∈ R ◦ S ⇔ for some y , (x, y) ∈ S and (y, z) ∈ R.

Consequently, (z, x) ∈ (R ◦ S)−1 if and only if (y, z) ∈ R−1 and (y, a) ∈ S−1 for some y. But this is the condition that (z, x) ∈ S−1 ◦ R−1. 2

5