ExamSaathi learning library · School · CBSE Class 12 Mathematics 2026-27; teacher review pending · Mathematics

Relations and functions for Class 12: equivalence relations, one-one and onto

Test a relation on a set for the reflexive, symmetric and transitive properties, recognise equivalence relations and the classes they split a set into, and decide whether a function is one-one, onto or both, with counts for small finite sets.

Status: original pilot lesson. Teacher review is pending. It is not a complete course or official exam material.

You will learn to

Before you start

This lesson builds on the Class 11 lesson on relations and functions. A relation from a set A to a set B is any subset of the Cartesian product A x B; when B is the same set as A, we call it a relation on A. We write a R b when the pair (a, b) belongs to R. A function f from A to B links every element of A to exactly one element of B: A is the domain, B is the co-domain, and the outputs actually reached form the range. Real variables are named t in this lesson, since x already stands for multiplication and for the Cartesian product. Two extreme relations on A are worth naming: the empty relation, which contains no pair at all, and the universal relation A x A, which contains every pair.

Reflexive, symmetric and transitive relations

Let R be a relation on a set A. R is reflexive if every element is related to itself: (a, a) is in R for every a in A. R is symmetric if pairs come in both directions: whenever (a, b) is in R, (b, a) is in R too. R is transitive if links chain together: whenever (a, b) and (b, c) are in R, (a, c) is in R as well. Each property is a 'for every' statement, so one counterexample shows that it fails, while showing that it holds needs a reason that covers every case. Think of the students of a school. 'Is in the same section as' has all three properties. 'Is older than' is transitive, but it is not reflexive, since nobody is older than themselves, and it is not symmetric. 'Lives within 1 km of' is reflexive and symmetric but need not be transitive: if Asha lives 0.8 km from Bina, Bina lives 0.8 km from Charu, and Asha and Charu live 1.6 km apart, the chain breaks. On a small finite set, test reflexivity by looking for every pair (a, a), symmetry by flipping each pair, and transitivity by checking every chain (a, b), (b, c). A relation with no such chain is transitive automatically, because nothing can fail.

Equivalence relations and equivalence classes

A relation that is reflexive, symmetric and transitive is an equivalence relation. It behaves like 'is the same as' in one chosen respect: same section, same remainder, same slope. The equivalence class [a] of an element a is the set of all elements related to a. Two classes are either exactly the same or have no element in common, and together they cover the whole set, so an equivalence relation splits the set into disjoint parts. For example, on the set Z of integers let a R b mean that a - b is a multiple of 5. Then [0] = {..., -10, -5, 0, 5, 10, ...} and [1] = {..., -9, -4, 1, 6, 11, ...}, and so on up to [4]: five classes, one for each remainder 0, 1, 2, 3 and 4 on division by 5. Here [6] is the same class as [1], because 6 - 1 = 5. The idea also works backwards: if a set is cut into non-empty, disjoint parts that cover it, then 'is in the same part as' is an equivalence relation whose classes are exactly those parts. On the set of non-vertical lines in a plane, 'has the same slope as' is an equivalence relation, and each class is a family of parallel lines.

One-one and onto functions

A function f from A to B is one-one (injective) if different inputs always give different outputs; in symbols, f(a1) = f(a2) forces a1 = a2. Otherwise it is many-one. It is onto (surjective) if every element of the co-domain B is the output of at least one input, that is, if the range equals B. A function that is both is called bijective; it pairs the elements of A with those of B exactly. To test a formula, start from f(a1) = f(a2) and see whether a1 = a2 must follow; then take any k in the co-domain and try to solve f(t) = k with t in the domain. For f(t) = 3t + 4 from R to R, 3a1 + 4 = 3a2 + 4 gives a1 = a2, and t = (k - 4)/3 solves f(t) = k for every real k, so f is bijective. For a real function drawn as a graph, the horizontal line test applies: f is one-one when no horizontal line meets the graph more than once, and onto R when every horizontal line meets it at least once. The answer depends on the stated domain and co-domain: t^2 is neither one-one nor onto from R to R, onto but not one-one from R to the non-negative reals, and bijective from the non-negative reals to the non-negative reals.

Counting functions between finite sets

Suppose A and B are non-empty finite sets, with m and k elements. Each element of A can be sent to any of the k elements of B, independently, so there are k^m functions from A to B. For a one-one function the first element of A has k choices, the second k - 1, the third k - 2, and so on, giving k x (k - 1) x ... x (k - m + 1) one-one functions when m is at most k. If m is more than k, two inputs must share an output, so no function from A to B is one-one; in the same way, a function can be onto only when A has at least as many elements as B. For a finite set mapped to itself, m = k and the two ideas meet: a one-one function reaches all k elements, so it is onto, and an onto function cannot repeat an output, so it is one-one. There are k! such bijections; a set of 4 elements has 4! = 24. This shortcut fails for infinite sets: on the natural numbers, f(n) = n + 1 is one-one but not onto, because 1 is never an output.

Common mistakes

1. Checking reflexivity for only some elements. On {1, 2, 3}, a relation that contains (1, 1) and (2, 2) but not (3, 3) is not reflexive. 2. Assuming that symmetric and transitive together force reflexive. On {1, 2, 3}, the relation {(1, 1), (1, 2), (2, 1), (2, 2)} is symmetric and transitive, yet 3 is not related to itself. 3. Calling a relation not transitive when it has no chains at all: such a relation is transitive. 4. Proving a 'for every' property by checking one convenient case. A favourable case proves nothing unless it is the only case; one genuine counterexample, such as a missing loop, a missing flipped pair or a chain whose end pair is missing, is enough to disprove the property. 5. Testing onto against the range instead of the co-domain: f(t) = 2t from the integers to the integers misses every odd number, so it is not onto. 6. Judging one-one from positive inputs only: t^2 looks one-one for t greater than 0, but on R both 3 and -3 give 9.

A short routine

For a relation R on a set A: 1. List or describe its pairs. 2. Reflexive: check that every element of A is related to itself. 3. Symmetric: flip every pair and check that the flipped pair is in R. 4. Transitive: for every chain (a, b), (b, c), check that (a, c) is in R; no chain means transitive. 5. If all three hold, write the classes [a] and check that they are disjoint and cover A. For a function f from A to B: 1. One-one: suppose f(a1) = f(a2) and try to show a1 = a2, or find two inputs with the same output. 2. Onto: take any k in B and solve f(t) = k inside the domain, or find a k that is never reached. 3. For finite sets, compare sizes first: if A has more elements than B, f cannot be one-one, and if A has fewer elements than B, f cannot be onto.

Worked examples

  1. On A = {1, 2, 3}, decide which of the three properties each relation has: R1 = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)}, R2 = {(1, 1), (1, 2), (2, 1)} and R3 = {(1, 3)}.

    1. 1. R1 contains (1, 1), (2, 2) and (3, 3), so it is reflexive. Its only other pairs, (1, 2) and (2, 1), are flips of each other, so it is symmetric.
    2. 2. Chains in R1: (1, 2) then (2, 1) needs (1, 1), and (2, 1) then (1, 2) needs (2, 2); any chain that uses a loop such as (1, 1), (2, 2) or (3, 3) just gives back a pair already in R1. All the needed pairs are present, so R1 is transitive and is an equivalence relation, with classes {1, 2} and {3}.
    3. 3. R2 is not reflexive, since (2, 2) and (3, 3) are missing. Flipping (1, 2) gives (2, 1), which is present, and (1, 1) flips to itself, so R2 is symmetric.
    4. 4. R2 is not transitive: (2, 1) and (1, 2) form a chain that needs (2, 2), which is missing.
    5. 5. R3 has no loops, so it is not reflexive, and (3, 1) is missing, so it is not symmetric. Its only pair is (1, 3), and no pair in R3 begins with 3, so no chain (a, b), (b, c) can be formed; nothing can fail, and R3 is transitive.

    Answer: R1 is reflexive, symmetric and transitive, an equivalence relation with classes {1, 2} and {3}; R2 is symmetric only; R3 is transitive only.

  2. On the set Z of integers, let a R b mean that a - b is divisible by 4. Show that R is an equivalence relation, describe its classes, and find the classes that contain -7 and 2026.

    1. 1. Reflexive: a - a = 0 = 4 x 0, which is divisible by 4, so a R a for every integer a.
    2. 2. Symmetric: if a - b = 4m for an integer m, then b - a = 4 x (-m), so b R a.
    3. 3. Transitive: if a - b = 4m and b - c = 4p for integers m and p, then a - c = (a - b) + (b - c) = 4(m + p), so a R c. Hence R is an equivalence relation.
    4. 4. Two integers are related exactly when they leave the same remainder on division by 4, so there are four classes, [0], [1], [2] and [3]; for example [1] = {..., -7, -3, 1, 5, 9, ...}.
    5. 5. -7 = 4 x (-2) + 1, so -7 lies in [1]. 2026 = 4 x 506 + 2, so 2026 lies in [2].

    Answer: R is reflexive, symmetric and transitive, so it is an equivalence relation with four classes [0], [1], [2] and [3]; -7 lies in [1] and 2026 lies in [2].

  3. Decide whether f: R -> R, f(t) = 5 - 2t, and g: R -> R, g(t) = t^2 + 1, are one-one and whether they are onto. Then count the functions, and the one-one functions, from A = {1, 2, 3} to B = {p, q, r, s}.

    1. 1. f is one-one: if 5 - 2a = 5 - 2b, then -2a = -2b, so a = b.
    2. 2. f is onto: for any real k, the input t = (5 - k)/2 is a real number and f(t) = 5 - (5 - k) = k. So f is bijective.
    3. 3. g is not one-one: g(-3) = g(3) = 10, two different inputs with the same output.
    4. 4. g is not onto R: t^2 + 1 is at least 1 for every real t, so an output such as 0 is never reached.
    5. 5. Counting: each of the 3 elements of A can go to any of the 4 elements of B, so there are 4^3 = 64 functions. For a one-one function, 1 has 4 choices, 2 has the 3 that are left and 3 has the last 2: 4 x 3 x 2 = 24.
    6. 6. No function from A to B is onto, because 3 inputs cannot reach all 4 elements of B.

    Answer: f is one-one and onto (bijective); g is neither, since g(-3) = g(3) = 10 and 0 is never an output. From A to B there are 64 functions, 24 of them one-one and none onto.

Practice checks

  1. On A = {1, 2, 3}, which relation is reflexive and symmetric but not transitive?
  2. On A = {1, 2, 3, 4, 5, 6, 7, 8, 9}, let a R b mean that a - b is divisible by 3. What are the equivalence classes of R?
  3. Which function is one-one but not onto?
  4. How many one-one functions are there from A = {a, b, c} to B = {1, 2, 3, 4, 5}?
  5. g: R -> [4, infinity) is given by g(t) = t^2 + 4. Which statement is true?

Sources checked