Class 12 Maths, Worked in Full Past papersGet updates
Chapter 1 · Relations and Functions

Example 21: f(a)=f(b)f(a)=f(b) defines an equivalence relation

ExamplesEquivalence relations · Miscellaneous Examples
The question

Let f:X→Yf : X \to Y be a function. Define a relation RR in XX given by R={(a,b):f(a)=f(b)}.R = \{(a, b) : f(a) = f(b)\}. Examine whether RR is an equivalence relation or not.

Exam answer

Reflexive: For every a∈Xa \in X⁠, f(a)=f(a)f(a) = f(a)⁠, so (a,a)∈R(a, a) \in R⁠. Thus RR is reflexive.

Symmetric: Let (a,b)∈R(a, b) \in R⁠. Then f(a)=f(b)⇒f(b)=f(a)f(a) = f(b) \Rightarrow f(b) = f(a)⁠, so (b,a)∈R(b, a) \in R⁠. Thus RR is symmetric.

Transitive: Let (a,b),(b,c)∈R(a, b), (b, c) \in R⁠. Then f(a)=f(b)f(a) = f(b) and f(b)=f(c)f(b) = f(c)⁠, so f(a)=f(c)f(a) = f(c) and (a,c)∈R(a, c) \in R⁠. Thus RR is transitive.

Hence RR is an equivalence relation.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

a R ba\,R\,b says "aa and bb have the same image under ff". The three properties of an equivalence relation then come straight from three properties of the ordinary equals sign: everything equals itself, p=q⇒q=pp = q \Rightarrow q = p⁠, and p=q, q=r⇒p=rp = q,\ q = r \Rightarrow p = r⁠. So the answer is yes, RR is always an equivalence relation, whatever the function ff is. Its classes are the groups of points that ff sends to the same place.

Given, to examine, and the plan
Given
An arbitrary function f:X→Yf : X \to Y (nothing else is known about it), and the relation a R b  ⟺  f(a)=f(b)a\,R\,b \iff f(a) = f(b) on XX⁠.
To examine
Whether RR is reflexive, symmetric and transitive.
Plan
(1) Note that f(a)f(a) is a single, definite element of YY for each aa⁠. (2) Check each property for arbitrary elements, using only properties of "==". (3) Conclude, then look at a concrete ff to see the classes.

Basics you need

1A function gives exactly one output

For f:X→Yf : X\to Y⁠, each a∈Xa \in X has exactly one image f(a)∈Yf(a)\in Y⁠. So "f(a)f(a)" names a definite element, and comparing f(a)f(a) with f(b)f(b) makes sense. Basics: what a function is

2Three properties of equality

For any elements p,q,rp, q, r of a set: p=pp = p⁠; if p=qp = q then q=pq = p⁠; if p=qp = q and q=rq = r then p=rp = r⁠.

3Reflexive, symmetric, transitive

Reflexive: (a,a)∈R(a,a)\in R for all aa⁠. Symmetric: (a,b)∈R⇒(b,a)∈R(a,b)\in R\Rightarrow (b,a)\in R⁠. Transitive: (a,b),(b,c)∈R⇒(a,c)∈R(a,b), (b,c)\in R \Rightarrow (a,c)\in R⁠. Basics: reflexive, symmetric, transitive

4Equivalence classes

An equivalence relation sorts XX into disjoint classes of mutually related elements. Basics: equivalence classes

5Proving for an arbitrary function

Since ff could be any function, the proof may use only the fact that ff is a function, and must work for arbitrary a,b,c∈Xa, b, c \in X⁠. Basics: proving and disproving

Solution

  1. Read the rule

    By definition,

    (a,b)∈R  ⟺  f(a)=f(b).(a,b)\in R \iff f(a) = f(b).

    Because ff is a function, f(a)f(a) and f(b)f(b) are definite elements of YY⁠, so for any a,b∈Xa, b\in X the question "is f(a)=f(b)f(a) = f(b)⁠?" has a definite yes or no answer. Thus RR is a well-defined relation in XX⁠.

    Every property we test will be turned into a statement about equality of images in YY⁠. This only works because each element has a single image (Basic 1). If ff were allowed to give two outputs for one input, "f(a)=f(b)f(a) = f(b)" would be ambiguous.
    A function assigns exactly one image to each element of its domain. Basics: what a function is
  2. Reflexive

    Take any a∈Xa\in X⁠. Then f(a)=f(a)f(a) = f(a)⁠, since any element equals itself. So (a,a)∈R(a,a)\in R for every a∈Xa\in X⁠, and RR is reflexive.

    (a,a)∈R(a,a)\in R means f(a)=f(a)f(a) = f(a)⁠, which compares an element of YY with itself. That is always true, for every aa⁠, whatever ff is.
    Equality is reflexive: p=pp = p (Basic 2).
  3. Symmetric

    Suppose (a,b)∈R(a,b)\in R⁠. Then

    f(a)=f(b) ⟹ f(b)=f(a) ⟹ (b,a)∈R.f(a) = f(b) \ \Longrightarrow\ f(b) = f(a) \ \Longrightarrow\ (b,a)\in R.

    So RR is symmetric.

    "f(a)=f(b)f(a) = f(b)" and "f(b)=f(a)f(b) = f(a)" are the same statement read in two directions. The first is the meaning of (a,b)∈R(a,b)\in R⁠, the second the meaning of (b,a)∈R(b,a)\in R⁠.
    Equality is symmetric: p=q⇒q=pp = q \Rightarrow q = p (Basic 2).
  4. Transitive

    Suppose (a,b)∈R(a,b)\in R and (b,c)∈R(b,c)\in R⁠. Then

    f(a)=f(b)  and  f(b)=f(c)⟹ f(a)=f(c) ⟹ (a,c)∈R.\begin{aligned} &f(a) = f(b) \ \text{ and } \ f(b) = f(c)\\ \Longrightarrow\ &f(a) = f(c) \ \Longrightarrow\ (a,c)\in R. \end{aligned}

    So RR is transitive.

    The middle element bb appears only through its image f(b)f(b)⁠, which is equal to both f(a)f(a) and f(c)f(c)⁠. Two things equal to the same thing are equal to each other, so f(a)=f(c)f(a) = f(c)⁠, and bb has disappeared, as transitivity requires.
    Equality is transitive: p=qp = q and q=r⇒p=rq = r \Rightarrow p = r (Basic 2).
  5. Conclude

    RR is reflexive, symmetric and transitive. Hence RR is an equivalence relation in XX, for every function f:X→Yf : X\to Y⁠.

    The question says "examine whether … or not", so the answer could have been "no". It is "yes", and the proof used nothing about ff except that it is a function. So the conclusion holds for every function, with no exceptions to look for.
    Definition 4: a relation that is reflexive, symmetric and transitive is an equivalence relation. Lesson: types of relations
  6. See the classes on a concrete function

    Take X={−2,−1,0,1,2}X = \{-2,-1,0,1,2\}⁠, Y={0,1,4}Y = \{0,1,4\} and f(x)=x2f(x) = x^2⁠. The images are f(±2)=4f(\pm2) = 4⁠, f(±1)=1f(\pm1) = 1⁠, f(0)=0f(0) = 0⁠. Two elements are related exactly when their squares are equal, so the equivalence classes are

    {−2,2},{−1,1},{0}.\{-2, 2\}, \qquad \{-1, 1\}, \qquad \{0\}.
    −2−1012014XYclasses of R: {−2, 2}, {−1, 1}, {0}f(x) = x², arrows coloured by the image they reach
    Arrows of f(x)=x2f(x) = x^2⁠, coloured by the image they reach. Each colour is one equivalence class of RR⁠: the elements of XX sent to the same point of YY⁠. In general the class of aa is {x∈X:f(x)=f(a)}\{x\in X : f(x) = f(a)\}⁠, the set of all elements with the same image as aa⁠.

    Two special cases are worth noting. If ff is one-one, then f(a)=f(b)f(a) = f(b) only when a=ba = b⁠, so R={(a,a):a∈X}R = \{(a,a) : a\in X\} and every class has a single element. If ff is constant, then all images are equal, so R=X×XR = X\times X and there is one class.

    This construction is how many equivalence relations in the chapter arise. In Example 5 and Example 6, take f(a)f(a) to be the remainder of aa on division by 2: "same parity" is "same image". In Example 20, take f(x)f(x) to be the remainder on division by 3. Seeing a relation as "same value of some function" is a quick way to know it is an equivalence relation.
    One-one means f(a)=f(b)⇒a=bf(a) = f(b)\Rightarrow a = b⁠. Basics: one-one and onto The classes of an equivalence relation are disjoint and cover XX⁠. Basics: equivalence classes
Result

Yes, RR is an equivalence relation for every function f:X→Yf : X \to Y⁠. It is reflexive because f(a)=f(a)f(a) = f(a)⁠, symmetric because f(a)=f(b)⇒f(b)=f(a)f(a) = f(b) \Rightarrow f(b) = f(a)⁠, and transitive because f(a)=f(b)f(a) = f(b) and f(b)=f(c)f(b) = f(c) give f(a)=f(c)f(a) = f(c)⁠. Its classes are the sets of elements with a common image. This agrees with the textbook's solution.

Check it with numbers

With f(x)=x2f(x) = x^2 on {−2,…,2}\{-2,\dots,2\}⁠: (−2) R 2(-2)\,R\,2 since 4=44 = 4⁠, and 2 R (−2)2\,R\,(-2) as well. (−1) R 1(-1)\,R\,1 and 1 R (−1)1\,R\,(-1)⁠. No chain links two different classes, since 1≠41 \ne 4⁠. The relation has 4+4+1=94 + 4 + 1 = 9 pairs. The verification script also tests the result by brute force: for every one of the 34=813^4 = 81 functions from {1,2,3,4}\{1,2,3,4\} to {1,2,3}\{1,2,3\}⁠, it builds RR and confirms it is reflexive, symmetric and transitive.

Common mistakes
  1. Confusing RR with ff⁠. RR relates elements of XX to elements of XX⁠. It is not the set of pairs (a,f(a))(a, f(a))⁠.
  2. Assuming ff must be one-one or onto. The proof works for any function. If ff is one-one, RR is just the identity relation; that is still an equivalence relation.
  3. Proving it only for one function, such as x2x^2⁠. The example illustrates; the proof must be for an arbitrary ff⁠.
  4. Leaving the answer as a calculation. "Examine whether" needs a clear verdict: yes, it is an equivalence relation.
What to take away
  1. "Same value of a function" is always an equivalence relation, because equality itself is reflexive, symmetric and transitive.
  2. Its classes are the sets of points with the same image, one class for each value in the range of ff⁠.
  3. Many relations in this chapter (same parity, same remainder, equal ratio) are of this kind: find the function and the proof is immediate.

Every fact used, and where it comes from

FactUsed inSource
A function gives each element exactly one imageStep 1Meaning of a function (Basics: what a function is)
Equality is reflexive, symmetric and transitiveSteps 2–4Logic of equality
Reflexive, symmetric, transitive; equivalence relationSteps 2–5Definitions 3 and 4, Section 1.2 (Lesson: types of relations)
One-one functionStep 6Definition 5, Section 1.3 (Lesson: types of functions)
Equivalence classesStep 6Section 1.2, after Example 5 (Lesson: equivalence relations)
The x2x^2 classes and the 81-function brute forceStep 6, CheckRecomputed in the site's verification script
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →