Curvingo · Made in India

Glossary

Select one of the keywords on the left…

Relations and FunctionsTypes of Relations

Reading time: ~45 min

A relation in a set A is a subset of A \times A. So two relations sit at the very ends of the scale: the empty set \varphi, which contains no pair at all, and A \times A itself, which contains every pair there is.

Take A = \{1, 2, 3, 4\} and the relation R = \{(a, b) : a - b = 10\}. The largest difference between two elements of A is , so no pair passes the test and R is the empty set.

Now take R' = \{(a, b) : |a - b| \geq 0\}. A modulus is never , so every pair passes and R' = A \times A. These two extreme relations get names of their own.

Definition 1: A relation R in a set A is called the empty relation if no element of A is related to any element of A, i.e., R = \varphi \subset A \times A.

Definition 2: A relation R in a set A is called the universal relation if each element of A is related to every element of A, i.e., R = A \times A.

Both are sometimes called trivial relations — not because they are unimportant, but because they carry no information. One says "nothing is related to anything", the other "everything is related to everything", so neither can tell two elements of A apart. Every interesting relation lies somewhere between them.

Example 1 : Let A be the set of all students of a boys' school. Show that the relation R in A given by R = {(a, b) : a is a sister of b} is the empty relation and R′ = {(a, b) : the difference between the heights of a and b is less than 3 metres} is the universal relation.

Solution : In a boys' school, no student can be the sister of any student. So belongs to R, and R = \varphi is the empty relation.

No two people differ in height by 3 metres or more, so every pair of students belongs to R′. Hence R' = A \times A is the relation.

Note

In Class XI you wrote relations in roster form and in set-builder form. Many books also write a relation such as R = \{(a, b) : b = a + 1\} in the set \{1, 2, 3, 4\} as "a R b if and only if b = a + 1". We use this notation too, whenever it is convenient.

Quick check. In a girls' hostel H, which of these relations in H is the empty relation?

a is a sister of b
a is a brother of b
a is older than b
a shares a room with b

Nobody in a girls' hostel is anybody's brother, so that relation is empty — the hostel version of Example 1.

Three Tests for Any Relation

Think of the relation "is the same height as" among the students of your class. Three things are true of it without measuring anyone: everyone is the same height as themselves; if Aman is the same height as Riya, then Riya is the same height as Aman; and if Aman matches Riya and Riya matches Kabir, then Aman matches Kabir. Those three facts have names, and they are the three tests every relation in this chapter will face.

Definition 3: A relation R in a set A is called

(i) reflexive, if (a, a) \in R for every a \in A,

(ii) symmetric, if (a_1, a_2) \in R implies that (a_2, a_1) \in R, for all a_1, a_2 \in A,

(iii) transitive, if (a_1, a_2) \in R and (a_2, a_3) \in R imply that (a_1, a_3) \in R, for all a_1, a_2, a_3 \in A.

On a grid of A \times A, each test has a picture. Reflexive: the whole diagonal, (1, 1), (2, 2), \ldots, is filled. Symmetric: the filled squares are a mirror image of themselves across that diagonal. Transitive: whenever (a, b) and (b, c) are filled, the shortcut (a, c) is filled too.

Definition 4: A relation R in a set A is said to be an equivalence relation if R is reflexive, symmetric and transitive.

An equivalence relation is mathematics' way of saying "these two things are not identical, but for our purpose they count as the same" — just like "is the same height as".

The relation lab. The grid is a relation in A = \{1, 2, 3\}; row a, column b is the pair (a, b). It starts as the relation of Example 4 below. Tap a square to put that pair in or take it out. The three tests update as you go, and a red outline marks the pair a test is missing. Build all four relations in the list.

Common trap

The three properties are independent — a relation can have any one of them without the other two — so test all three before you call R an equivalence relation. Reflexive needs (a, a) \in R for every a in A; one missing element is enough to fail. And mind the two directions of proof: showing a property holds needs a general argument ("let (a, b) \in R …"), while showing it fails needs just one counterexample.

Testing Relations

Example 2 : Let T be the set of all triangles in a plane, and let R be the relation in T given by R = \{(T_1, T_2) : T_1 \text{ is congruent to } T_2\}. Show that R is an equivalence relation.

Solution : R is reflexive, since every triangle is congruent to .

If (T_1, T_2) \in R, then T_1 is congruent to T_2, so T_2 is congruent to T_1 and (T_2, T_1) \in R. Hence R is .

If (T_1, T_2) and (T_2, T_3) are in R, then T_1 \cong T_2 and T_2 \cong T_3, so T_1 \cong T_3 and (T_1, T_3) \in R. So R is transitive too, and R is an equivalence relation.

Example 3 : Let L be the set of all lines in a plane and R the relation in L defined as R = \{(L_1, L_2) : L_1 \text{ is perpendicular to } L_2\}. Show that R is symmetric but neither reflexive nor transitive.

Solution : A line is never perpendicular to , so (L_1, L_1) \notin R and R is not reflexive.

R is symmetric: if L_1 is perpendicular to L_2, then L_2 is perpendicular to L_1.

R is not transitive: if L_1 \perp L_2 and L_2 \perp L_3, then L_1 is to L_3. So (L_1, L_2) \in R and (L_2, L_3) \in R, but (L_1, L_3) \notin R.

Example 4 : Show that the relation R in the set \{1, 2, 3\} given by R = \{(1, 1), (2, 2), (3, 3), (1, 2), (2, 3)\} is reflexive but neither symmetric nor transitive.

Solution : (1, 1), (2, 2) and (3, 3) all lie in R, so R is .

R is not symmetric, because (1, 2) \in R but (2, 1) .

R is not transitive, because (1, 2) \in R and (2, 3) \in R, but is not in R.

Tip

For a relation given as a list of pairs, make three sweeps. Reflexive: look only at the diagonal pairs (1, 1), (2, 2), \ldots. Symmetric: for each pair, hunt for its mirror image. Transitive: follow every two-step path a \to b \to c and check that (a, c) is there.

Example 5 : Show that the relation R in the set Z of integers given by

R = \{(a, b) : 2 \text{ divides } a - b\}

is an equivalence relation.

Solution : For every integer a, a - a = , and 2 divides 0. So R is reflexive.

If (a, b) \in R, then 2 divides a - b, so 2 also divides b - a = -(a - b). Hence (b, a) \in R and R is .

If (a, b) \in R and (b, c) \in R, then a - b = 2m and b - c = 2n for some integers m, n. Adding,

a - c = (a - b) + (b - c) = 2m + 2n = 2(m + n),

which is . So (a, c) \in R, R is transitive, and R is an equivalence relation in Z.

Notice that each test used exactly one arithmetic fact: 0 is even; b - a = -(a - b); and even plus even is even.

Speed Round: Which Test Fails?

Every relation below fails at most one of the three tests. Find the one that fails — or say that all three hold. After each answer you will see the reason.

Get five right to move on.

Sorting Into Classes

Go back to Example 5. Every even integer is related to 0, because (0, \pm 2), (0, \pm 4), \ldots lie in R, and no odd integer is related to 0. In the same way every odd integer is related to 1, and no even integer is. So the set E of even integers and the set O of odd integers satisfy:

(i) all elements of E are related to each other, and all elements of O are related to each other;

(ii) no element of E is related to any element of O, and vice versa;

(iii) E and O are disjoint and \mathbf{Z} = E \cup O.

E is called the equivalence class containing 0, written [0], and O is the equivalence class containing 1, written [1]. Note that [0] \neq [1], while [0] = [2r] and [1] = [2r + 1] for every r \in \mathbf{Z} — a class can be named after any of its members.

Now you sort. Use the relation "3 divides a - b" instead. Drop each integer into the bin of the number it is related to.

−5
9
−4
4
−3
8
10
−1
6
−2
5
0
Related to 0
Related to 1
Related to 2

What you just did works for every equivalence relation, not only these two. Given an arbitrary equivalence relation R in an arbitrary set X, R divides X into mutually disjoint subsets A_i, called partitions or subdivisions of X, such that

(i) all elements of A_i are related to each other, for all i;

(ii) no element of A_i is related to any element of A_j, i \neq j;

(iii) \cup A_j = X and A_i \cap A_j = \varphi, i \neq j.

The subsets A_i are called equivalence classes. Why can two classes never merely overlap? Suppose some c lay in both [a] and [b], so a R c and b R c. By symmetry c R b, and then by transitivity a R b. So [a] and [b] are the — one shared element makes two classes collapse into one.

The road also runs the other way: a partition gives an equivalence relation. Split Z into the three disjoint subsets whose union is Z:

A_1 = \{x \in \mathbf{Z} : x \text{ is a multiple of } 3\} = \{\ldots, -6, -3, 0, 3, 6, \ldots\}

A_2 = \{x \in \mathbf{Z} : x - 1 \text{ is a multiple of } 3\} = \{\ldots, -5, -2, 1, 4, 7, \ldots\}

A_3 = \{x \in \mathbf{Z} : x - 2 \text{ is a multiple of } 3\} = \{\ldots, -4, -1, 2, 5, 8, \ldots\}

Define R = \{(a, b) : 3 \text{ divides } a - b\} in Z. The argument of Example 5, with 3 in place of 2, shows that R is an equivalence relation — and its classes are exactly the bins you just filled: A_1 = [0], A_2 = [1], and A_3 is the class containing . In fact A_1 = [3r], A_2 = [3r + 1] and A_3 = [3r + 2] for every r \in \mathbf{Z}.

You use such a partition every day: a 12-hour clock shows the same position for 3, 15 and 27 hours, because they leave the same remainder on division by 12. Each position on the clock face is one equivalence class.

Example 6 : Let R be the relation defined in the set A = \{1, 2, 3, 4, 5, 6, 7\} by R = {(a, b) : both a and b are either odd or even}. Show that R is an equivalence relation. Further, show that all the elements of the subset \{1, 3, 5, 7\} are related to each other and all the elements of the subset \{2, 4, 6\} are related to each other, but no element of the subset \{1, 3, 5, 7\} is related to any element of the subset \{2, 4, 6\}.

Solution : Any a in A has the same parity as itself, so (a, a) \in R and R is .

If (a, b) \in R, then a and b are both odd or both even, so (b, a) \in R: R is symmetric. If (a, b), (b, c) \in R, then a, b, c all share the parity of b, so (a, c) \in R: R is transitive. Hence R is an equivalence relation.

The elements of \{1, 3, 5, 7\} are all odd, so they are related to each other; the elements of \{2, 4, 6\} are all even, so they are related to each other. An odd number and an even number never share a parity, so no element of the first subset is related to any element of the second. These two subsets are the equivalence classes [1] and [2] of R, and every element of A lies in exactly of them.

Sina