In this chapter: empty and universal relations, reflexive, symmetric and transitive relations, equivalence relations and equivalence classes, one-one (injective), onto (surjective) and bijective functions, composition of functions, invertible functions, and the standard counting results used in JEE.Types of relations
A relation R from a set A to a set B is any subset of A × B. A relation on A is a subset of A × A. We write (a, b) ∈ R or a R b.
- Empty relation: no element of A is related to any element, so R = φ ⊂ A × A. Example: on the set of students of a boys' school, R = {(a, b) : a is a sister of b}.
- Universal relation: every element is related to every element, so R = A × A.
These two are called trivial relations. The useful ones are defined by three properties.
| Property | Condition | How to check quickly |
|---|---|---|
| Reflexive | (a, a) ∈ R for every a ∈ A | All diagonal pairs must be present; one missing pair kills it |
| Symmetric | (a, b) ∈ R ⇒ (b, a) ∈ R | Every pair must have its mirror image |
| Transitive | (a, b) ∈ R and (b, c) ∈ R ⇒ (a, c) ∈ R | Chain every pair with every other pair that starts where it ends |
A relation that is reflexive, symmetric and transitive is an equivalence relation. The standard examples: "is congruent to" and "is similar to" on triangles, "is parallel to" on lines (NCERT counts a line as parallel to itself), and a − b divisible by a fixed integer n on Z. On the other hand, "is perpendicular to" is symmetric but neither reflexive nor transitive, and a ≤ b on R is reflexive and transitive but not symmetric.
Equivalence classes
An equivalence relation R on A splits A into pairwise disjoint subsets called equivalence classes. The class of a is [a] = {x ∈ A : (x, a) ∈ R}. Two classes are either identical or disjoint, and together they cover A. Elements inside one class are all related to each other, and no element of one class is related to an element of another.
Worked example: Show that R = {(a, b) : 3 divides a − b} on Z is an equivalence relation and find its equivalence classes.Solution: Reflexive: a − a = 0 is divisible by 3. Symmetric: if 3 divides a − b, then 3 divides −(a − b) = b − a. Transitive: if 3 divides a − b and b − c, it divides their sum a − c. So R is an equivalence relation. Two integers are related exactly when they leave the same remainder on division by 3, so there are three classes: [0] = {..., −3, 0, 3, 6, ...}, [1] = {..., −2, 1, 4, 7, ...} and [2] = {..., −1, 2, 5, 8, ...}. Note that [3] is the same class as [0].
Counting relations on a set with n elements
A × A has n² ordered pairs, and each pair is either in R or not. That one idea gives all the results below.
| Type of relation on A, |A| = n | Number | Reason |
|---|---|---|
| All relations | 2n² | Each of the n² pairs is in or out |
| Reflexive | 2n² − n | n diagonal pairs are forced in |
| Symmetric | 2n(n + 1)/2 | n diagonal pairs free, plus n(n − 1)/2 mirror couples |
| Reflexive and symmetric | 2n(n − 1)/2 | Only the mirror couples are free |
For n = 3 this gives 512 relations, 64 reflexive, 64 symmetric and 8 that are both. There is no simple closed formula for transitive relations, so JEE asks about them only for very small sets. The number of equivalence relations on a 3-element set is 5, one for each way of partitioning the set.
Types of functions
A function f : X → Y assigns to each element of X exactly one element of Y. X is the domain, Y the codomain, and the set of values actually taken is the range.
- One-one (injective): different inputs give different outputs. To prove it, assume f(x1) = f(x2) and show x1 = x2. On a graph, no horizontal line cuts the curve more than once. Otherwise f is many-one.
- Onto (surjective): every element of Y is the image of at least one element of X, that is, range = codomain. To prove it, take any y in Y, solve f(x) = y for x and check that x lies in X.
- Bijective: both one-one and onto.
The codomain matters. f(x) = x² is neither one-one nor onto as a map R → R (f(−1) = f(1), and −1 has no pre-image). As a map from N to N it is one-one but not onto, since 2 is not a perfect square. f(x) = x³ from R to R is bijective. The greatest integer function f(x) = [x] from R to R is neither, because f(1.2) = f(1.9) = 1 and non-integers have no pre-image.
One result from NCERT is worth remembering: if X is a finite set, a function f : X → X is one-one if and only if it is onto. This fails for infinite sets, as f(x) = 2x on N shows (one-one, but odd numbers are missed).
Counting functions (|A| = m, |B| = n)
| Functions from A to B | Number |
|---|---|
| All functions | nm |
| One-one (needs n ≥ m) | nPm = n!/(n − m)! |
| Bijections (needs m = n) | n! |
| Onto (needs m ≥ n) | nm − nC1(n − 1)m + nC2(n − 2)m − ... |
Worked example: How many onto functions are there from A = {1, 2, 3, 4} to B = {a, b, c}?Solution: Total functions = 34 = 81. Remove those that miss at least one element of B using inclusion-exclusion: functions missing a given element = 24 = 16, and there are 3 such elements; functions missing a given pair = 14 = 1, and there are 3 pairs. Onto functions = 81 − 3(16) + 3(1) = 36. Check another way: choose which two elements of A share an image, 4C2 = 6 ways, then arrange the three groups on a, b, c in 3! = 6 ways, giving 36.
Composition of functions
If f : A → B and g : B → C, the composition g∘f : A → C is defined by (g∘f)(x) = g(f(x)). Apply f first, then g. For g∘f to exist, the range of f must lie inside the domain of g.
- In general g∘f ≠ f∘g. With f(x) = x + 1 and g(x) = x², (g∘f)(x) = (x + 1)² while (f∘g)(x) = x² + 1.
- Composition is associative: h∘(g∘f) = (h∘g)∘f.
- If f and g are both one-one, so is g∘f. If both are onto, so is g∘f.
Invertible functions
f : X → Y is invertible if there is a function g : Y → X with g∘f = IX and f∘g = IY. Then g is called the inverse, written f−1. The key theorem: f is invertible if and only if f is bijective. So before finding an inverse, check one-one and onto. To find it, put y = f(x), solve for x in terms of y, and rename.
Worked example: Show that f : R → R, f(x) = 4x + 3 is invertible and find f−1.Solution: One-one: 4x1 + 3 = 4x2 + 3 gives x1 = x2. Onto: for any real y, x = (y − 3)/4 is real and f(x) = y. So f is bijective and invertible, with f−1(y) = (y − 3)/4. Check: f(f−1(y)) = 4 · (y − 3)/4 + 3 = y.
The graphs of f and f−1 are mirror images in the line y = x. If they intersect, the points of intersection often (not always) lie on y = x; for an increasing f, solving f(x) = x is enough.
Common mistakes: (1) Calling a relation reflexive because a few pairs (a, a) are present. Every element of A must be related to itself. (2) Forgetting that the empty relation on a non-empty set is symmetric and transitive (there is nothing to violate) but not reflexive. (3) Declaring a function onto without comparing the range with the stated codomain. (4) Writing (g∘f)(x) as f(g(x)). The function written nearest x acts first. (5) Finding a formula for f−1 without first checking that f is a bijection.JEE and MHT‑CET focus
- Testing a given relation for reflexive, symmetric and transitive properties, especially on small finite sets and on Z with divisibility conditions.
- Equivalence classes for "a − b divisible by n" and similar relations.
- Counting relations (all, reflexive, symmetric) and functions (all, one-one, onto, bijective).
- Deciding one-one and onto for polynomial, modulus, greatest integer and rational functions with a given domain and codomain.
- Evaluating f∘g and g∘f, and finding the inverse of a bijection.
Practice questions
The number of relations on a set with 3 elements is:
- 9
- 64
- 512
- 8
Show answer
The number of reflexive relations on A = {1, 2, 3} is:
- 8
- 64
- 512
- 27
Show answer
On A = {1, 2, 3}, the relation R = {(1, 2), (2, 1)} is:
- Reflexive
- Symmetric but not transitive
- Transitive but not symmetric
- An equivalence relation
Show answer
The number of equivalence relations on {1, 2, 3} containing (1, 2) is:
- 1
- 2
- 3
- 5
Show answer
f : N → N defined by f(x) = 2x is:
- One-one and onto
- One-one but not onto
- Onto but not one-one
- Neither one-one nor onto
Show answer
If f(x) = x² + 1 and g(x) = 2x − 3, then (f∘g)(2) is:
- 2
- 7
- 5
- 1
Show answer
The number of onto functions from a set with 4 elements to a set with 2 elements is:
- 16
- 14
- 8
- 12
Show answer
If f : R → R is given by f(x) = 5x − 7, then f−1(x) is:
- (x − 7)/5
- 5x + 7
- (x + 7)/5
- 1/(5x − 7)





