← Back to JEE

Sets, Relations & Functions

Foundational chapter for JEE covering set theory, types of relations, function classification, composition, inverse functions, and special functions — the building blocks of higher mathematics.

0% complete5 units
01 Sets & Operations

Types of sets, set operations, Venn diagrams, De Morgan's laws, and cardinality — essential for JEE problem solving across all chapters.

Types of Sets & Set Operations
Definition — Set A set is a well-defined collection of distinct objects. Sets are denoted by capital letters $A, B, C, \ldots$ and elements by lowercase $a, b, c, \ldots$. We write $a \in A$ if $a$ belongs to $A$.

Important types:

  • Empty set $\emptyset$ — contains no elements. $|\emptyset| = 0$.
  • Finite set — has a definite number of elements. Infinite set — otherwise.
  • Subset: $A \subseteq B$ if every element of $A$ is in $B$. Proper subset: $A \subset B$ if $A \subseteq B$ and $A \neq B$.
  • Power set: $\mathcal{P}(A)$ is the set of all subsets of $A$. If $|A| = n$, then $|\mathcal{P}(A)| = 2^n$.
Set Operations Union: $A \cup B = \{x : x \in A \text{ or } x \in B\}$
Intersection: $A \cap B = \{x : x \in A \text{ and } x \in B\}$
Difference: $A - B = \{x : x \in A \text{ and } x \notin B\}$
Complement: $A' = U - A$ where $U$ is the universal set.
Symmetric Difference: $A \triangle B = (A - B) \cup (B - A)$
De Morgan's Laws $(A \cup B)' = A' \cap B'$ and $(A \cap B)' = A' \cup B'$.
JEE Trick: To find complement of a union, take intersection of complements (and vice versa). This extends to any finite number of sets.
Inclusion-Exclusion Principle $|A \cup B| = |A| + |B| - |A \cap B|$
For three sets: $|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |B \cap C| - |A \cap C| + |A \cap B \cap C|$
JEE Shortcut: In Venn diagram problems, always start filling from the innermost region outward.
📝 Example
In a class of 100 students, 55 study Mathematics, 45 study Physics, and 30 study both. How many study neither?
$|M \cup P| = |M| + |P| - |M \cap P| = 55 + 45 - 30 = 70$. Students studying neither $= 100 - 70 = \boxed{30}$.
02 Relations

Types of relations — reflexive, symmetric, transitive, equivalence relations, and equivalence classes. Key for JEE Advanced.

Types of Relations
Definition — Relation A relation $R$ from set $A$ to set $B$ is a subset of $A \times B$. A relation on set $A$ is a subset of $A \times A$. We write $aRb$ if $(a, b) \in R$.

Properties of relations on a set $A$:

  • Reflexive: $(a, a) \in R$ for all $a \in A$
  • Symmetric: $(a, b) \in R \Rightarrow (b, a) \in R$
  • Transitive: $(a, b) \in R$ and $(b, c) \in R \Rightarrow (a, c) \in R$
  • Anti-symmetric: $(a, b) \in R$ and $(b, a) \in R \Rightarrow a = b$
Equivalence Relation A relation that is reflexive, symmetric, and transitive simultaneously is called an equivalence relation. It partitions the set into disjoint equivalence classes.
JEE Trick — Counting Relations Total relations from $A$ to $B$: $2^{|A| \cdot |B|}$.
Number of reflexive relations on $A$ with $|A| = n$: $2^{n^2 - n}$.
Number of symmetric relations on $A$: $2^{\frac{n(n+1)}{2}}$.
📝 Example
Check whether $R = \{(a,b) : a - b \text{ is divisible by } 3\}$ on $\mathbb{Z}$ is an equivalence relation.
Reflexive: $a - a = 0$ is divisible by 3. Yes.
Symmetric: If $3 | (a-b)$, then $3 | (b-a)$. Yes.
Transitive: If $3 | (a-b)$ and $3 | (b-c)$, then $3 | ((a-b)+(b-c)) = 3 | (a-c)$. Yes.
So $R$ is an equivalence relation. Equivalence classes: $[0] = \{\ldots,-3,0,3,6,\ldots\}$, $[1] = \{\ldots,-2,1,4,7,\ldots\}$, $[2] = \{\ldots,-1,2,5,8,\ldots\}$.
03 Functions

Domain, range, types of functions (injective, surjective, bijective), composition, and inverse functions.

Domain, Range & Types of Functions
Definition — Function A function $f: A \to B$ is a relation from $A$ to $B$ such that every element of $A$ is related to exactly one element of $B$. Here $A$ is the domain and $f(A) \subseteq B$ is the range.
  • Injective (One-one): $f(a_1) = f(a_2) \Rightarrow a_1 = a_2$. Horizontal line test — each $y$-value hit at most once.
  • Surjective (Onto): For every $b \in B$, there exists $a \in A$ with $f(a) = b$. Range $= $ codomain.
  • Bijective: Both injective and surjective. Has a unique inverse.
JEE Shortcut — Counting Functions From set $A$ ($m$ elements) to set $B$ ($n$ elements):
Total functions: $n^m$
Injective functions (if $m \leq n$): $n \cdot (n-1) \cdots (n-m+1) = \frac{n!}{(n-m)!}$
Surjective functions: $\sum_{k=0}^{n} (-1)^k \binom{n}{k}(n-k)^m$
Composition & Inverse Functions
Composition If $f: A \to B$ and $g: B \to C$, then $g \circ f: A \to C$ defined by $(g \circ f)(x) = g(f(x))$.
Note: $g \circ f \neq f \circ g$ in general. Composition is associative: $h \circ (g \circ f) = (h \circ g) \circ f$.
Inverse Function If $f: A \to B$ is bijective, then $f^{-1}: B \to A$ exists with $f^{-1}(f(x)) = x$ and $f(f^{-1}(y)) = y$.
Key facts: $(f^{-1})^{-1} = f$; $(g \circ f)^{-1} = f^{-1} \circ g^{-1}$; graph of $f^{-1}$ is the reflection of graph of $f$ about $y = x$.
📝 Example
If $f(x) = \frac{2x+3}{x-1}$, find $f^{-1}(x)$.
Let $y = \frac{2x+3}{x-1}$. Then $y(x-1) = 2x+3 \Rightarrow xy - y = 2x + 3 \Rightarrow x(y-2) = y+3 \Rightarrow x = \frac{y+3}{y-2}$.
So $f^{-1}(x) = \frac{x+3}{x-2}$. Notice $f^{-1} = f$ — this is an involution.
04 Special Functions

Floor, ceiling, fractional part, signum, and greatest integer functions — frequently tested in JEE Mains and Advanced.

Floor, Ceiling & Fractional Part
Definitions Floor (Greatest Integer): $\lfloor x \rfloor = [x]$ = greatest integer $\leq x$.
Ceiling: $\lceil x \rceil$ = least integer $\geq x$.
Fractional Part: $\{x\} = x - \lfloor x \rfloor$, so $0 \leq \{x\} < 1$.
Key Properties $[x + n] = [x] + n$ for $n \in \mathbb{Z}$
$[x] + [-x] = \begin{cases} 0 & \text{if } x \in \mathbb{Z} \\ -1 & \text{if } x \notin \mathbb{Z} \end{cases}$
$\{x\} + \{-x\} = \begin{cases} 0 & \text{if } x \in \mathbb{Z} \\ 1 & \text{if } x \notin \mathbb{Z} \end{cases}$
JEE Trick: $[x] \leq x < [x] + 1$. For solving $[f(x)] = k$, convert to $k \leq f(x) < k+1$.
Signum Function $\text{sgn}(x) = \begin{cases} 1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0 \end{cases}$
Useful identity: $x = |x| \cdot \text{sgn}(x)$.
📝 Example
Find the domain of $f(x) = \frac{1}{\sqrt{[x] - x}}$.
We need $[x] - x > 0$, i.e., $[x] > x$. But $[x] \leq x$ always. So $[x] > x$ is never true. Domain $= \emptyset$.
JEE Trap: Students often forget that $[x] \leq x$ by definition. The domain is the empty set.
05 Graphs of Functions & Transformations

Graph transformations — shifts, reflections, scaling — and recognising standard function graphs. Critical for JEE Advanced curve-based problems.

Standard Transformations
Transformation Rules Given $y = f(x)$:
$y = f(x - a)$: shift right by $a$ units
$y = f(x) + b$: shift up by $b$ units
$y = -f(x)$: reflect about $x$-axis
$y = f(-x)$: reflect about $y$-axis
$y = |f(x)|$: take the part below $x$-axis, reflect it above
$y = f(|x|)$: keep the right half, mirror it to the left
JEE Shortcut — Graph of $|y| = f(x)$ Remove all portions where $f(x) < 0$, then reflect the remaining curve about the $x$-axis. This gives a graph symmetric about the $x$-axis.
Even & Odd Functions Even: $f(-x) = f(x)$ — symmetric about $y$-axis.
Odd: $f(-x) = -f(x)$ — symmetric about origin.
Trick: Every function $f$ can be written as $f(x) = \frac{f(x)+f(-x)}{2} + \frac{f(x)-f(-x)}{2}$ (even + odd parts).
📝 Example
If $f(x) = x^3 + x$, determine if $f$ is even, odd, or neither.
$f(-x) = (-x)^3 + (-x) = -x^3 - x = -(x^3 + x) = -f(x)$. So $f$ is odd. Its graph is symmetric about the origin.
★ Key Takeaways
✎ Practice Problems
Problem 1
If $A = \{1, 2, 3, \ldots, 10\}$ and $R$ is a relation on $A$ defined by $R = \{(a,b): a + 2b = 10\}$, find the domain and range of $R$.
Show Solution ▼
Pairs: $(2,4), (4,3), (6,2), (8,1)$. Domain $= \{2, 4, 6, 8\}$, Range $= \{1, 2, 3, 4\}$.
Problem 2
Find the number of surjective functions from a set of 4 elements to a set of 3 elements.
Show Solution ▼
Using inclusion-exclusion: $\sum_{k=0}^{3} (-1)^k \binom{3}{k}(3-k)^4 = 3^4 - 3 \cdot 2^4 + 3 \cdot 1^4 - 0 = 81 - 48 + 3 = \boxed{36}$.
Problem 3
Let $f: \mathbb{R} \to \mathbb{R}$ be defined by $f(x) = \frac{x}{\sqrt{1+x^2}}$. Is $f$ injective? Find the range of $f$.
Show Solution ▼
$f'(x) = \frac{1}{(1+x^2)^{3/2}} > 0$ for all $x$, so $f$ is strictly increasing, hence injective. As $x \to \infty$, $f(x) \to 1$; as $x \to -\infty$, $f(x) \to -1$. Range $= (-1, 1)$. Note $f$ is not surjective onto $\mathbb{R}$.
Problem 4
Solve the equation $[x]^2 - 5[x] + 6 = 0$, where $[x]$ denotes the greatest integer function.
Show Solution ▼
$[x]^2 - 5[x] + 6 = 0 \Rightarrow ([x]-2)([x]-3) = 0 \Rightarrow [x] = 2$ or $[x] = 3$. So $x \in [2,3) \cup [3,4) = [2, 4)$.
Problem 5
Find the number of equivalence relations on the set $\{1, 2, 3\}$.
Show Solution ▼
Equivalence relations correspond to partitions. The partitions of $\{1,2,3\}$ are: $\{\{1,2,3\}\}$, $\{\{1,2\},\{3\}\}$, $\{\{1,3\},\{2\}\}$, $\{\{2,3\},\{1\}\}$, $\{\{1\},\{2\},\{3\}\}$. Total $= \boxed{5}$ (this is the Bell number $B_3$).
🎯 Interactive MCQs
1. If $A$ has $m$ elements and $B$ has $n$ elements, the number of non-empty relations from $A$ to $B$ is:
A $2^{mn}$
B $2^{mn} - 1$
C $2^{m+n} - 1$
D $mn$
2. Let $f: \mathbb{R} \to \mathbb{R}$ be defined by $f(x) = x^2 - 3x + 2$. Then $f$ is:
A One-one but not onto
B Both one-one and onto
C Neither one-one nor onto
D Not one-one but onto
3. The value of $\left[\frac{1}{3}\right] + \left[\frac{1}{3} + \frac{1}{99}\right] + \left[\frac{1}{3} + \frac{2}{99}\right] + \cdots + \left[\frac{1}{3} + \frac{98}{99}\right]$ is:
A 32
B 33
C 34
D 66
4. If $f(x) = \frac{4^x}{4^x + 2}$, then $f(x) + f(1-x)$ equals:
A $1$
B $2$
C $\frac{1}{2}$
D Depends on $x$
5. The domain of $f(x) = \sqrt{\{x\}^2 - 3\{x\} + 2}$, where $\{x\}$ is the fractional part, is:
A $\mathbb{R}$
B $[n, n+1) \cup \mathbb{Z}$ — i.e., $\mathbb{R}$
C $\mathbb{Z}$ only
D $\emptyset$