Relations and Functions

Two sets, and a question that sounds almost too simple to deserve a whole chapter: which elements of one are linked to which elements of the other? Every relation you will ever meet — brother of, taller than, congruent to, has the same remainder as — is an answer to exactly that question, and this chapter's entire opening half is devoted to sharpening the vague word "linked" into something a proof can grip. Out of every possible link, one kind turns out to organise almost all of higher mathematics: the equivalence relation, a link that is reflexive, symmetric and transitive all at once, and that quietly slices any set into tidy, non-overlapping equivalence classes — same-remainder numbers, congruent triangles, parallel lines, all sorted into their own drawers without a single element left out or double-counted. The second half of the chapter turns from relations to their best-behaved special case, functions, and asks a sharper question still: when can a function be run backwards? A function is one-one if distinct inputs never collide into the same output, onto if every element of the target set actually gets hit, and bijective when both hold together — and it is exactly the bijective functions that possess a genuine inverse, a function that undoes them perfectly in both directions. Along the way you will meet the composition of two functions, g∘fg \circ f, and discover the sobering fact that composing in the other order, f∘gf \circ g, usually gives something completely different. Building on the Class XI groundwork of sets, domain, codomain and range, this chapter is where "relation" and "function" finally earn rigorous definitions you can prove things with — definitions that JEE and NEET lean on constantly, from counting equivalence relations on a three-element set to proving invertibility of a rational function on sight. Class XI gave you the vocabulary; this chapter gives you the machinery.

Key takeaways
  • A relation RR in a set AA is any subset of A×AA \times A; the two extremes are the empty relation (R=φR = \varphi) and the universal relation (R=A×AR = A \times A).
  • RR is reflexive if (a,a)∈R(a,a) \in R for every a∈Aa \in A; symmetric if (a1,a2)∈R(a_1,a_2) \in R forces (a2,a1)∈R(a_2,a_1) \in R; transitive if (a1,a2),(a2,a3)∈R(a_1,a_2), (a_2,a_3) \in R forces (a1,a3)∈R(a_1,a_3) \in R.
  • An equivalence relation is reflexive, symmetric and transitive together — the single most important type of relation in all of mathematics.
  • Every equivalence relation on a set XX splits XX into disjoint equivalence classes [a][a], whose union is all of XX, with all elements inside one class mutually related and no element of one class related to any element of another.
  • A function f:X→Yf: X \to Y is one-one (injective) if f(x1)=f(x2)f(x_1) = f(x_2) forces x1=x2x_1 = x_2, and onto (surjective) if every y∈Yy \in Y has some preimage in XX; it is bijective if it is both.
  • The composition (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)) builds a new function from AA to CC out of f:A→Bf: A \to B and g:B→Cg: B \to C; in general g∘f≠f∘gg \circ f \neq f \circ g.
  • A function is invertible exactly when it is bijective, and the inverse, when it exists, is unique — checking only one-one or only onto is never enough to claim invertibility.
  • For a finite set XX, a self-map f:X→Xf: X \to X is one-one exactly when it is onto — a shortcut that fails for infinite sets, where a function can be one-one but not onto (or the reverse).
  • Key idea: a relation is any subset of A cross A, an equivalence relation (reflexive, symmetric, transitive together) partitions its set into disjoint equivalence classes, and among functions it is exactly the bijective ones — one-one and onto together — that are invertible, with the finite-versus-infinite distinction being the chapter's sharpest trap.
The core insight

An equivalence relation (reflexive, symmetric and transitive) partitions a set into disjoint equivalence classes, and a function is invertible exactly when it is bijective (one-one and onto), a pairing that, for finite sets only, collapses into a single condition since one-one and onto become equivalent on a self-map of a finite set.

What this chapter covers

The chapter runs in two connected halves. The first half, types of relations, opens with the two trivial extremes (empty and universal relations), then builds the three defining properties — reflexive, symmetric, transitive — and assembles them into the equivalence relation, together with the equivalence classes it generates and the way those classes partition the underlying set. The second half, types of functions, revisits domain, codomain and range from Class XI just long enough to define one-one and onto precisely, combines them into bijective, and then builds the composition of two functions before asking the central question of the chapter: which functions can be inverted? The answer — a function is invertible if and only if it is bijective — is the theorem the whole chapter has been building toward, and the closing remark about finite versus infinite sets (one-one and onto coincide only on a finite self-map) is the chapter's most tested subtlety.

The core ideas

Reflexive, symmetric and transitive relations

A relation RR in a set AA is, by definition, nothing more than a subset of A×AA \times A — membership in RR is the only rule there is. The two extreme cases fix the vocabulary before anything more refined is possible.

R=φ⊆A×A  (empty relation),R=A×A  (universal relation).(1)R = \varphi \subseteq A \times A \ \ (\text{empty relation}), \qquad R = A \times A \ \ (\text{universal relation}). \qquad (1)

where: the empty relation relates nothing to anything (no pair satisfies its defining condition), while the universal relation relates every element of AA to every element of AA, with no exceptions. Both are called trivial relations precisely because neither one discriminates between elements the way an interesting relation should. Between these two extremes sit the three properties that matter most:

reflexive: (a,a)∈R  ∀ a∈A;symmetric: (a1,a2)∈R⇒(a2,a1)∈R;transitive: (a1,a2),(a2,a3)∈R⇒(a1,a3)∈R.(2)\text{reflexive: } (a,a) \in R\ \ \forall\, a \in A; \quad \text{symmetric: } (a_1,a_2) \in R \Rightarrow (a_2,a_1) \in R; \quad \text{transitive: } (a_1,a_2), (a_2,a_3) \in R \Rightarrow (a_1,a_3) \in R. \qquad (2)

where: a,a1,a2,a3a, a_1, a_2, a_3 range over AA in each clause, and every implication must hold for every choice of the elements involved — a single counterexample anywhere destroys the property. Reflexivity is checked one element at a time and must never be skipped for an "obvious" or isolated element; symmetry is checked pair by pair, in both directions; transitivity is checked over chains of two pairs at a time. For the set {1,2,3}\{1,2,3\}, R={(1,1),(2,2),(3,3),(1,2),(2,3)}R = \{(1,1),(2,2),(3,3),(1,2),(2,3)\} is reflexive (all three diagonal pairs are present) but neither symmetric ((1,2)∈R(1,2) \in R while (2,1)∉R(2,1) \notin R) nor transitive ((1,2),(2,3)∈R(1,2), (2,3) \in R but (1,3)∉R(1,3) \notin R). By contrast, R={(a,b):2 divides a−b}R = \{(a,b) : 2 \text{ divides } a-b\} on the integers Z\mathbb{Z} is reflexive (a−a=0a - a = 0 is divisible by 22), symmetric (if 2∣a−b2 \mid a-b then 2∣b−a2 \mid b-a), and transitive (if 2∣a−b2 \mid a-b and 2∣b−c2 \mid b-c, then a−c=(a−b)+(b−c)a - c = (a-b)+(b-c) is a sum of two even numbers, hence even) — all three at once, which is exactly what earns it the name equivalence relation.

Definition. A relation RR in a set AA is an equivalence relation if RR is reflexive, symmetric and transitive. Equivalence relations are the single most important type of relation in mathematics because they formalise the everyday idea of "essentially the same," whether that means congruent triangles, parallel lines, or integers with the same remainder on division by some fixed number.

Equivalence classes and partitions of a set

Once a relation is known to be an equivalence relation, it does something remarkable: it sorts the whole set into non-overlapping groups automatically. For the relation R={(a,b):2 divides a−b}R = \{(a,b) : 2 \text{ divides } a-b\} on Z\mathbb{Z}, every even integer turns out to be related to 00, and every odd integer to 11, and never the two mixed — the set of even integers EE and the set of odd integers OO are disjoint, their union is all of Z\mathbb{Z}, and all elements inside each one are mutually related. This subset is called an equivalence class.

[a]={b∈X:(a,b)∈R},X=⋃iAi,Ai∩Aj=φ  (i≠j).(3)[a] = \{ b \in X : (a,b) \in R \}, \qquad X = \bigcup_i A_i, \quad A_i \cap A_j = \varphi\ \ (i \neq j). \qquad (3)

where: [a][a], the equivalence class containing aa, collects every element of XX related to aa; the second pair of statements records that the full collection of distinct classes AiA_i (also written [a][a] for various choices of aa) covers XX completely and never overlaps. In the example above, [0]=E[0] = E and [1]=O[1] = O, and note [0]=[2r][0] = [2r] for every even 2r2r, since any two even numbers generate the same class. A richer illustration: on X={1,2,…,9}X = \{1,2,\ldots,9\}, the relation R1={(x,y):x−y is divisible by 3}R_1 = \{(x,y) : x-y \text{ is divisible by } 3\} produces exactly three classes, {1,4,7}\{1,4,7\}, {2,5,8}\{2,5,8\} and {3,6,9}\{3,6,9\} — every element of XX falls into exactly one of the three, and the three classes are disjoint and exhaust XX. This reverse direction works too: starting from any partition of a set into disjoint, exhaustive subsets, defining "related" as "lying in the same subset" always produces a genuine equivalence relation — partitions and equivalence relations are two descriptions of the same underlying structure.

One-one, onto and bijective functions

Turn now from arbitrary relations to the special, well-behaved subset of relations called functions, and ask two independent questions about a function f:X→Yf: X \to Y: does it ever send two different inputs to the same output, and does its output ever miss part of YY?

one-one (injective): f(x1)=f(x2)⇒x1=x2  ∀ x1,x2∈X;onto (surjective): ∀ y∈Y, ∃ x∈X such that f(x)=y.(4)\text{one-one (injective): } f(x_1) = f(x_2) \Rightarrow x_1 = x_2\ \ \forall\, x_1, x_2 \in X; \qquad \text{onto (surjective): } \forall\, y \in Y,\ \exists\, x \in X \text{ such that } f(x) = y. \qquad (4)

where: a function that is not one-one is called many-one — some element of the codomain has more than one preimage. A function that is not onto has a range strictly smaller than its codomain — some element of YY is never hit. Definition. A function that is both one-one and onto is bijective, and only bijective functions can be paired with a true two-sided inverse. Three worked contrasts fix the ideas: f:N→Nf: \mathbb{N} \to \mathbb{N}, f(x)=2xf(x) = 2x is one-one (doubling never collides) but not onto (odd numbers are never hit); f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2 is neither one-one (f(−1)=f(1)=1f(-1) = f(1) = 1) nor onto (negative numbers are never hit, since a square is never negative); f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=2xf(x) = 2x is both one-one and onto, since f(x1)=f(x2)⇒x1=x2f(x_1) = f(x_2) \Rightarrow x_1 = x_2 and every real yy has preimage y/2y/2.

Figure
Four small arrow diagrams comparing four functions labelled f1 to f4 showing one-one not onto, many-one not onto, many-one onto, and one-one onto which is bijective
Four functions — only one is both one-one and onto f1: one-one, not onto one unused f2: many-one, not onto two inputs collide f3: many-one, onto every target hit f4: one-one and onto bijective Only f4 is bijective — a perfect one-to-one matching with nothing left over on either side. A dot on the right with no incoming arrow means the function is not onto; two arrows into one dot means it is not one-one.

Composition of functions and invertibility

Given a function ff from AA to BB and a second function gg from BB to CC, feeding the output of ff straight into gg builds a single new function from AA to CC, called the composition of ff and gg.

(g∘f)(x)=g(f(x)),  ∀ x∈A,f:A→B,  g:B→C,  g∘f:A→C.(5)(g \circ f)(x) = g\big(f(x)\big),\ \ \forall\, x \in A, \qquad f: A \to B,\ \ g: B \to C,\ \ g \circ f: A \to C. \qquad (5)

where: the notation g∘fg \circ f is read "gg of ff," and the order matters critically — ff acts first, on the original input, and gg acts second, on ff's output. For f(x)=cos⁡xf(x) = \cos x and g(x)=3x2g(x) = 3x^2, both mapping R\mathbb{R} to R\mathbb{R}, (g∘f)(x)=g(cos⁡x)=3cos⁡2x(g \circ f)(x) = g(\cos x) = 3\cos^2 x, while (f∘g)(x)=f(3x2)=cos⁡(3x2)(f \circ g)(x) = f(3x^2) = \cos(3x^2) — genuinely different functions, since 3cos⁡2x≠cos⁡(3x2)3\cos^2 x \neq \cos(3x^2) at x=0x=0 already (3≠13 \neq 1). This asymmetry is the source of the chapter's most reliable trap: never assume g∘f=f∘gg \circ f = f \circ g without checking. With composition available, invertibility can be defined precisely: a function f:X→Yf: X \to Y is invertible if there is a function g:Y→Xg: Y \to X that undoes it in both directions at once.

f invertible  ⟺  ∃ g:Y→X such that g∘f=IX  and  f∘g=IY.(6)f \text{ invertible} \iff \exists\, g: Y \to X \text{ such that } g \circ f = I_X \ \text{ and } \ f \circ g = I_Y. \qquad (6)

where: IXI_X and IYI_Y denote the identity functions on XX and YY (IX(x)=xI_X(x) = x for every x∈Xx \in X), and the function gg, when it exists, is called the inverse of ff and written f−1f^{-1}. The double condition matters: g∘f=IXg \circ f = I_X alone (a "left inverse") is not the same guarantee as f∘g=IYf \circ g = I_Y (a "right inverse") — invertibility demands both simultaneously. NCERT states, as a working remark, that this happens exactly when ff is one-one and onto; the full two-directional proof is worked out below.

Two derivations of the central theorem, and the finite-set shortcut

Derivation AInvertibility of a function is equivalent to being bijective

NCERT states as a remark that a function is invertible exactly when it is one-one and onto, without walking through both directions of the argument in the main text. Because this equivalence is the single most load-bearing fact in the composition-and-invertibility section — everything from constructing an explicit inverse to disproving invertibility rests on it — the goal here is to prove both directions in full: first that invertibility forces bijectivity, and then, the more constructive direction, that bijectivity alone is enough to build an inverse from scratch.

Step 1. Assume f:X→Yf: X \to Y is invertible, so there exists g:Y→Xg: Y \to X with g∘f=IXg \circ f = I_X and f∘g=IYf \circ g = I_Y. To show ff is one-one, suppose f(x1)=f(x2)f(x_1) = f(x_2) for some x1,x2∈Xx_1, x_2 \in X. Apply gg to both sides: g(f(x1))=g(f(x2))g(f(x_1)) = g(f(x_2)), which by definition of composition is (g∘f)(x1)=(g∘f)(x2)(g \circ f)(x_1) = (g \circ f)(x_2). Since g∘f=IXg \circ f = I_X, this reads x1=x2x_1 = x_2. So ff is one-one.

Step 2. To show ff is onto, take any y∈Yy \in Y and set x=g(y)∈Xx = g(y) \in X. Since f∘g=IYf \circ g = I_Y, we have f(g(y))=yf(g(y)) = y, that is, f(x)=yf(x) = y. Since y∈Yy \in Y was arbitrary, every element of YY has a preimage in XX under ff, so ff is onto. Steps 1 and 2 together show invertible ⇒\Rightarrow bijective.

Step 3. Conversely, assume ff is bijective. Define g:Y→Xg: Y \to X as follows: for each y∈Yy \in Y, onto-ness guarantees at least one x∈Xx \in X with f(x)=yf(x) = y, and one-one-ness guarantees this xx is the only such element. So the rule g(y)=g(y) = the unique xx with f(x)=yf(x) = y genuinely defines a function — existence of the value comes from onto, uniqueness (so gg is well defined, not multi-valued) comes from one-one.

Step 4. Verify gg is a two-sided inverse. For any x∈Xx \in X, g(f(x))g(f(x)) is, by the definition in Step 3, the unique element that ff sends to f(x)f(x) — and xx itself is one such element, so by uniqueness g(f(x))=xg(f(x)) = x, i.e. g∘f=IXg \circ f = I_X. For any y∈Yy \in Y, writing x=g(y)x = g(y), the definition of gg says precisely f(x)=yf(x) = y, i.e. f(g(y))=yf(g(y)) = y, so f∘g=IYf \circ g = I_Y. Both conditions of equation (6)(6) hold, so ff is invertible. Combining both directions: ff is invertible if and only if ff is bijective, and the inverse, when it exists, is completely determined by ff and therefore unique.

Go deeper · Derivation B · 2 minFor a finite self-map, one-one and onto are the same property
Derivation BFor a finite self-map, one-one and onto are the same property

NCERT verifies this only for the three-element set {1,2,3}\{1,2,3\} in two short worked examples, then asserts in a remark that the same equivalence holds for every finite set XX, contrasting it sharply with two other examples on N\mathbb{N} where the two properties split apart on an infinite set. The goal here is to supply the general argument for an arbitrary finite set XX with n(X)=nn(X) = n elements, and to isolate exactly where finiteness gets used, so the boundary between the finite and infinite cases is understood rather than merely memorised.

Step 1. Let f:X→Xf: X \to X with n(X)=nn(X) = n, a finite number. Suppose ff is one-one. Consider the image f(X)={f(x):x∈X}f(X) = \{f(x) : x \in X\}. Because ff is one-one, distinct elements of XX produce distinct values of ff, so listing f(x)f(x) for each of the nn elements of XX produces nn genuinely distinct outputs — no repeats. Hence f(X)f(X) has exactly nn elements.

Step 2. But f(X)f(X) is, by definition, a subset of the codomain XX, and XX itself has exactly nn elements. A subset of a finite nn-element set that itself contains all nn elements must be the whole set — a proper subset of a finite set always has strictly fewer elements than the set itself, since removing even one element strictly reduces the count. So f(X)=Xf(X) = X, meaning every element of the codomain is hit by ff: ff is onto. This proves one-one ⇒\Rightarrow onto, for finite self-maps.

Step 3. Conversely, suppose ff is onto, so f(X)=Xf(X) = X and the nn values f(x)f(x), as xx ranges over XX, together cover all nn elements of XX. Suppose, for contradiction, that ff is not one-one: then some two distinct elements x1≠x2x_1 \neq x_2 satisfy f(x1)=f(x2)f(x_1) = f(x_2), so the list of nn outputs f(x)f(x) for x∈Xx \in X contains at least one repeat. A list of nn values with at least one repeated entry can name at most n−1n-1 distinct values — too few to cover all nn elements of XX, contradicting onto-ness. So ff must be one-one, proving onto ⇒\Rightarrow one-one for finite self-maps.

Step 4. Both directions used only one fact about finiteness: that a subset of an nn-element set with exactly nn elements must be the entire set. This fails for infinite sets, because an infinite set can contain a proper subset that is still infinite — exactly as large in the sense that matters for this argument. Concretely, f:N→Nf: \mathbb{N} \to \mathbb{N}, f(x)=2xf(x) = 2x is one-one (doubling never collides) but its image, the even numbers, is a proper subset of N\mathbb{N} that is still infinite, so it is not onto (odd numbers are never hit); conversely f:N→Nf: \mathbb{N} \to \mathbb{N} with f(1)=f(2)=1f(1) = f(2) = 1 and f(x)=x−1f(x) = x - 1 for x>2x > 2 is onto (every natural number is hit) but not one-one (f(1)=f(2)f(1) = f(2)). Finiteness is exactly the missing ingredient, and this is, as NCERT notes, a genuine characteristic difference between finite and infinite sets.

Worked examples

Board level - testing reflexivity, symmetry and transitivity (Exercise 1.1, Q3 pattern)

Check whether the relation R defined on the set A = {1, 2, 3, 4, 5, 6} by R = {(a, b) : b = a + 1} is reflexive, symmetric or transitive.

Step 1. List the pairs directly from the rule. For a=1,2,3,4,5a = 1,2,3,4,5, b=a+1b = a+1 gives 2,3,4,5,62,3,4,5,6, all inside AA; for a=6a=6, b=7b=7 falls outside AA, so it is excluded. Hence R={(1,2),(2,3),(3,4),(4,5),(5,6)}R = \{(1,2),(2,3),(3,4),(4,5),(5,6)\}.

Step 2. Reflexive test: we would need (a,a)∈R(a,a) \in R for every a∈Aa \in A, i.e. a=a+1a = a+1, which is false for every real number. In particular (1,1)∉R(1,1) \notin R, so RR fails reflexivity at once — no need to check further elements once a single failure is found.

Step 3. Symmetric test: (1,2)∈R(1,2) \in R; is (2,1)∈R(2,1) \in R? That would require 1=2+1=31 = 2+1 = 3, false. So (2,1)∉R(2,1) \notin R, and RR is not symmetric.

Step 4. Transitive test: (1,2)∈R(1,2) \in R and (2,3)∈R(2,3) \in R; transitivity would demand (1,3)∈R(1,3) \in R, i.e. 3=1+1=23 = 1+1 = 2, false. So (1,3)∉R(1,3) \notin R, and RR is not transitive. Answer: R is neither reflexive, nor symmetric, nor transitive.

Board level - proving a linear function is bijective and finding its inverse (Exercise 1.2, Q7(i) and Example 17 pattern)

Let f : R to R be defined by f(x) = 3 - 4x. Show that f is one-one and onto, and hence find its inverse.

Step 1. One-one: assume f(x1)=f(x2)f(x_1) = f(x_2). Then 3−4x1=3−4x2⇒−4x1=−4x2⇒x1=x23 - 4x_1 = 3 - 4x_2 \Rightarrow -4x_1 = -4x_2 \Rightarrow x_1 = x_2. By the definition in equation (4)(4), ff is one-one.

Step 2. Onto: take an arbitrary y∈Ry \in \mathbb{R} (the codomain) and try to solve y=3−4xy = 3 - 4x for xx: x=3−y4x = \dfrac{3-y}{4}. Since yy is any real number, 3−y4\dfrac{3-y}{4} is also a well-defined real number, so a preimage x∈Rx \in \mathbb{R} exists for every yy. Hence ff is onto.

Step 3. Since ff is both one-one and onto, it is bijective, and by the invertibility theorem proved above, ff is invertible. Its inverse is exactly the rule found while proving onto-ness: g(y)=3−y4g(y) = \dfrac{3-y}{4}, so f−1(x)=3−x4f^{-1}(x) = \dfrac{3-x}{4}.

Step 4. Verify both compositions: (g∘f)(x)=g(3−4x)=3−(3−4x)4=4x4=x(g \circ f)(x) = g(3-4x) = \dfrac{3-(3-4x)}{4} = \dfrac{4x}{4} = x, and (f∘g)(y)=f(3−y4)=3−4⋅3−y4=3−(3−y)=y(f \circ g)(y) = f\left(\dfrac{3-y}{4}\right) = 3 - 4 \cdot \dfrac{3-y}{4} = 3-(3-y) = y. Both check out. Answer: f is one-one and onto, hence invertible, with inverse f⁻¹(x) = (3 - x)/4.

Competitive level (JEE / NEET) - counting equivalence relations containing two given pairs (Example 24 pattern)

Let A = {1, 2, 3}. Find the number of equivalence relations on A that contain the pairs (1, 2) and (2, 1).

Step 1. Any equivalence relation must contain (1,1),(2,2),(3,3)(1,1), (2,2), (3,3) by reflexivity, regardless of anything else. Together with the two given pairs, the smallest possible candidate is R1={(1,1),(2,2),(3,3),(1,2),(2,1)}R_1 = \{(1,1),(2,2),(3,3),(1,2),(2,1)\}. This is already a valid equivalence relation: reflexive by construction, symmetric since (1,2)(1,2) and (2,1)(2,1) are both present, and transitive vacuously — the only chain to check is (1,2)(1,2) with (2,1)(2,1), which forces (1,1)(1,1), already present.

Step 2. The only undecided pairs link 33 to {1,2}\{1,2\}: namely (1,3),(3,1),(2,3),(3,2)(1,3), (3,1), (2,3), (3,2). Suppose we try adding just one of these, say (1,3)(1,3). Symmetry immediately forces (3,1)(3,1) as well. Then transitivity, applied to (3,1)∈R(3,1) \in R and (1,2)∈R(1,2) \in R, forces (3,2)∈R(3,2) \in R; symmetry then forces (2,3)∈R(2,3) \in R too. Adding a single cross-connection between 33 and the {1,2}\{1,2\} block forces, through the closure demanded by symmetry and transitivity, the addition of all four remaining pairs at once — there is no way to add "a little bit" of a new relationship to an equivalence relation.

Step 3. So there are exactly two possibilities: either 33 remains in a class of its own, giving R1R_1 with equivalence classes {1,2}\{1,2\} and {3}\{3\}; or all four remaining pairs get added at once, merging 33 fully into the {1,2}\{1,2\} block and producing the universal relation R2=A×AR_2 = A \times A, with one single class {1,2,3}\{1,2,3\}. Step 2 shows there is nothing strictly between these two, because admitting any single cross-pair forces closure to the full universal relation.

Step 4. Counting the possibilities from Steps 1 to 3 gives exactly two valid equivalence relations. Answer: there are exactly 2 equivalence relations on {1, 2, 3} containing (1, 2) and (2, 1). Timing note: budget under two minutes. The fast method is to count set partitions rather than re-deriving symmetry and transitivity closure from scratch: an equivalence relation on a finite set corresponds exactly to a partition of that set into disjoint classes, and forcing (1,2)∈R(1,2) \in R and (2,1)∈R(2,1) \in R simply forces 11 and 22 into the same class. What remains is only the question of where 33 goes — its own singleton class, or merged into the {1,2}\{1,2\} block — exactly 22 partitions, hence 22 equivalence relations. This partition-counting shortcut is the standard technique for every "count the equivalence relations containing such-and-such pairs" question on JEE and NEET.

Common traps

The single most common slip is checking transitivity (or symmetry) only against the pairs explicitly listed, mistaking "no counterexample among the pairs I listed" for a genuine proof — a rule-based relation like {(a,b):2 divides a−b}\{(a,b): 2 \text{ divides } a-b\} needs an argument that holds for every triple, not a spot check of a few numbers. A closely related mistake is forgetting that reflexivity must hold for literally every element of AA, including isolated elements with no other relationships at all. Many students also believe symmetric-and-transitive together force reflexivity — and indeed, if (a,b)∈R(a,b) \in R for some bb, symmetry gives (b,a)∈R(b,a) \in R and transitivity then gives (a,a)∈R(a,a) \in R — but this only works for elements that already appear in some pair; an isolated element is never forced into (a,a)(a,a), so symmetric-and-transitive can still fail to be reflexive overall. On the function side, students often assume an element of the codomain with two preimages breaks onto-ness — it does not; onto only demands at least one preimage per codomain element, which is exactly what "many-one but onto" describes. Composition order is another reliable trap: (g∘f)(x)(g \circ f)(x) applies ff first and gg second, and g∘f≠f∘gg \circ f \neq f \circ g in general. Finally, students over-apply the finite-set shortcut to infinite sets, or to a function between two finite sets of different sizes — it applies only to a self-map f:X→Xf: X \to X on one and the same finite set.

You should be able to…

  • Test any given relation for reflexivity, symmetry and transitivity directly against the formal definitions in equation (2)(2), checking every element or pair the definition requires, not just a sample.
  • State the definition of an equivalence relation and prove a given relation satisfies all three properties in general, using an arbitrary element or triple rather than a finite check.
  • Compute the equivalence classes of a given equivalence relation, and explain why they always partition the underlying set into disjoint, exhaustive groups.
  • Distinguish one-one, onto and bijective functions using the formal quantifier definitions in equation (4)(4), and correctly identify which property fails for a given function, with a stated reason.
  • Compute the composition g∘fg \circ f of two functions, evaluate it at specific points, and recognise that g∘fg \circ f generally differs from f∘gf \circ g.
  • Prove a function is invertible by showing it is bijective, and construct its explicit inverse using the method in the first derivation.
  • State and correctly apply the finite-set shortcut (one-one is onto for a self-map on a finite set), and explain, with the two standard counterexamples on N\mathbb{N}, exactly why it fails on infinite sets.
  • Count the number of relations or equivalence relations on a small finite set satisfying given constraints, using the partition-counting technique from the competitive worked example.

Ask the tutor: Want to work through proving a trickier relation is an equivalence relation, or counting equivalence relations on a four-element set, step by step together?

What exactly makes an equivalence relation more special than just being reflexive, symmetric and transitive on their own?

Any one of the three properties alone tells you very little — a relation can be purely reflexive and do almost nothing interesting. What makes the combination special is that reflexive, symmetric and transitive together are exactly the conditions needed to guarantee the relation sorts the whole set into clean, non-overlapping groups (the equivalence classes), with every element belonging to exactly one group and every pair of elements inside a group genuinely related to each other. Drop any one property and the sorting breaks: without transitivity, elements can be "locally" related without the groups closing up consistently; without symmetry, "related to" stops meaning the same thing in both directions; without reflexivity, an element might not even belong to its own group.

Why is R = {(a, b) : a is less than or equal to b} on the real numbers not an equivalence relation, even though it is reflexive and transitive?

It fails symmetry, and that single failure is enough to disqualify it. Reflexivity holds (a≤aa \le a for every real aa), and transitivity holds (a≤ba \le b and b≤cb \le c together force a≤ca \le c), but symmetry demands that a≤ba \le b force b≤ab \le a as well — which is false whenever aa and bb are different (for instance 2≤52 \le 5 is true, but 5≤25 \le 2 is false). A relation needs all three properties simultaneously to be called an equivalence relation; being "mostly there," with two out of three, is not enough, and this exact relation is the standard example used to show reflexive-and-transitive does not imply symmetric.

Why does g composed with f generally differ from f composed with g, even when both make sense?

Because composition is about the order of two separate transformations, and most pairs of transformations genuinely do not commute. (g∘f)(x)(g \circ f)(x) means "first apply ff to xx, then apply gg to that result," while (f∘g)(x)(f \circ g)(x) means the reverse order — first gg, then ff. For f(x)=cos⁡xf(x) = \cos x and g(x)=3x2g(x) = 3x^2, (g∘f)(x)=3cos⁡2x(g \circ f)(x) = 3\cos^2 x takes the cosine first and squares afterward, while (f∘g)(x)=cos⁡(3x2)(f \circ g)(x) = \cos(3x^2) squares first and takes the cosine of that — completely different formulas, confirmed numerically at x=0x=0 where 3cos⁡2(0)=33\cos^2(0) = 3 but cos⁡(3⋅02)=1\cos(3 \cdot 0^2) = 1. Only in special cases, such as when g=f−1g = f^{-1}, does the order stop mattering in the relevant sense (both compositions then become identity functions, though even that equality is on different domains in general).

Why do I need to check both one-one and onto before calling a function invertible? Isn't finding a formula for the inverse enough?

Because an algebraic manipulation that looks like it produces an "inverse formula" can silently hide a failure of one-one or onto, and the resulting formula will not actually satisfy both composition conditions in equation (6)(6). For example, solving y=x2y = x^2 for xx gives x=yx = \sqrt{y}, which looks like an inverse formula, but f(x)=x2f(x) = x^2 on all of R\mathbb{R} is not one-one (both x=2x=2 and x=−2x=-2 give y=4y=4), so y\sqrt{y} cannot recover the original input in general — it silently throws away the negative branch. The theorem proved above is precise: invertibility requires both properties together, because one-one guarantees the candidate inverse is well defined (no ambiguity about which preimage to return) and onto guarantees it is defined everywhere on the target set (no gaps). Skipping either check can produce a rule that works for some inputs but is not a genuine two-sided inverse.

Does one-one implies onto really fail for every function on an infinite set, or just some functions?

Just some functions — the finite-set shortcut is not "always false on infinite sets," it is simply "not automatic" on infinite sets, and both outcomes remain possible. The identity function f:N→Nf: \mathbb{N} \to \mathbb{N}, f(x)=xf(x) = x, is one-one and onto simultaneously, exactly as it would be on a finite set — infinite sets are not forbidden from having nice bijective self-maps. What changes on an infinite set is only that one-one no longer guarantees onto, and onto no longer guarantees one-one: counterexamples become possible where none existed before, as shown by f(x)=2xf(x) = 2x (one-one, not onto) and the shifted function f(1)=f(2)=1f(1)=f(2)=1, f(x)=x−1f(x)=x-1 for x>2x>2 (onto, not one-one). So on an infinite set, both properties must always be checked independently and explicitly, using the full definitions in equation (4)(4), rather than inferred from each other.

Where this leads