NCERT Chapter 2

Relations & Functions

From ordered pairs and arrow diagrams to mastering domains, ranges, and standard functions for Class 11 exams.

~45 min read 6–8 marks in exam kemh102.pdf

What you will learn in this chapter

  1. Cartesian Product of Sets — Ordered pairs & $A \times B$
  2. Relations — Concept, Domain, Codomain, Range & Arrow Diagrams
  3. Functions Explained — Why every function is a relation, but not vice-versa
  4. 7 Standard Real Functions & Their Graphs (Modulus, Signum, GIF, etc.)
  5. Algebra of Real Functions — Addition, Subtraction, Multiplication & Division
  6. How to Find Domain & Range (The Complete Checklist)
  7. Worked Examples — Easy to Hard
  8. NCERT Key Exercise Questions Solved
  9. Common Exam Traps & Pitfalls
  10. Quick Self-Check Quiz

1. Cartesian Product of Sets

Definition: Ordered Pair

An ordered pair consists of two elements written in a specific order: $(a, b)$, where $a$ is the first element and $b$ is the second element. Note that $(a, b) \ne (b, a)$ unless $a = b$.

Equality of Ordered Pairs

Two ordered pairs are equal if and only if their corresponding first and second elements are equal:

$$(x_1, y_1) = (x_2, y_2) \iff x_1 = x_2 \text{ and } y_1 = y_2$$

Classic Exam Question: If $(x + 1, y - 2) = (3, 1)$, find $x$ and $y$.

Comparing coordinates: $x + 1 = 3 \implies x = 2$; and $y - 2 = 1 \implies y = 3$.

Definition: Cartesian Product $A \times B$

Given two non-empty sets $A$ and $B$, the Cartesian product $A \times B$ is the set of all ordered pairs $(a, b)$ such that $a \in A$ and $b \in B$.

$$A \times B = \{(a, b) : a \in A, b \in B\}$$

Crucial Properties of Cartesian Products

2. Relations: Connecting Two Sets

Intuition: What is a Relation?

In English, a relation is a connection between people (e.g., "is brother of", "is taller than"). In mathematics, a relation between two sets $A$ and $B$ is simply a rule or condition that pairs certain elements of $A$ with elements of $B$.

Formal Definition of Relation

A relation $R$ from set $A$ to set $B$ is simply any subset of the Cartesian product $A \times B$. That is, $R \subseteq A \times B$.

How Many Relations Can Exist?

Since any relation $R$ from $A$ to $B$ is a subset of $A \times B$, and $A \times B$ has $p \cdot q$ elements:

$$\text{Total number of relations from } A \text{ to } B = 2^{n(A) \cdot n(B)} = 2^{pq}$$

Example: If $n(A) = 2$ and $n(B) = 3$, there are $2^{2 \times 3} = 2^6 = 64$ possible relations!

Domain of $R$

The set of all first elements of the ordered pairs in $R$.

$$\text{Domain} = \{a \in A : (a, b) \in R\}$$

Range of $R$

The set of all second elements actually used in $R$.

$$\text{Range} = \{b \in B : (a, b) \in R\}$$

Codomain of $R$

The entire target set $B$, whether all elements are matched or not. Always: $\mathbf{\text{Range} \subseteq \text{Codomain}}$.

Arrow Diagram

Visual depiction: Draw two ellipses for $A$ and $B$, write elements inside, and draw directed arrows from $a$ to $b$ whenever $(a, b) \in R$.

3. Functions: The Special Relation

The Vending Machine Metaphor

Think of a function like a reliable vending machine:

Formal Definition of a Function

A relation $f$ from set $A$ to set $B$ is called a function if:

  1. Every element of $A$ has an image in $B$. (No orphan inputs).
  2. Each element of $A$ has one and only one image in $B$. (No ambiguous multi-outputs).

We write $f: A \to B$, and if $(x, y) \in f$, we write $y = f(x)$, where $y$ is the image of $x$ under $f$, and $x$ is the pre-image of $y$.

Summary: Is It a Function or Not?

4. Standard Real Functions & Their Graphs

Function Name Formula $f(x)$ Domain Range Key Characteristics
Identity Function $f(x) = x$ $\mathbb{R}$ $\mathbb{R}$ Straight line through origin at $45^\circ$ angle ($y = x$).
Constant Function $f(x) = c$ $\mathbb{R}$ $\{c\}$ Horizontal line parallel to the x-axis at height $y = c$.
Square Function $f(x) = x^2$ $\mathbb{R}$ $[0, \infty)$ Parabola opening upwards with vertex at $(0, 0)$.
Cube Function $f(x) = x^3$ $\mathbb{R}$ $\mathbb{R}$ S-shaped curve passing through origin.
Reciprocal Function $f(x) = 1/x$ $\mathbb{R} \setminus \{0\}$ $\mathbb{R} \setminus \{0\}$ Rectangular hyperbola in 1st and 3rd quadrants; never touches axes.
Modulus Function $f(x) = |x|$ $\mathbb{R}$ $[0, \infty)$ V-shaped graph: $x$ for $x \ge 0$, $-x$ for $x < 0$. Always non-negative.
Signum Function $\text{sgn}(x)$ $\mathbb{R}$ $\{-1, 0, 1\}$ Outputs $1$ if $x > 0$, $0$ if $x = 0$, and $-1$ if $x < 0$. Discontinuous at $0$.
Greatest Integer Function (GIF) $f(x) = [x]$ $\mathbb{R}$ $\mathbb{Z}$ (Integers) Step function ("Floor"): outputs greatest integer $\le x$. E.g. $[2.9]=2, [-1.2]=-2$.

Deep Dive: Greatest Integer Function $[x]$

The greatest integer function rounds any real number DOWN to the nearest integer on the number line:

5. Algebra of Real Functions

Operations on Real Functions

Let $f: X \to \mathbb{R}$ and $g: X \to \mathbb{R}$ be two real functions. Their domain for basic operations is the intersection of their domains: $D_f \cap D_g$.

6. Systematic Guide: Finding Domain & Range

Rule 1: Denominators Cannot Be Zero

For $f(x) = \frac{P(x)}{Q(x)}$, set $Q(x) \ne 0$. Exclude roots of $Q(x)$ from $\mathbb{R}$.

Example: $f(x) = \frac{1}{x - 3} \implies \text{Domain} = \mathbb{R} \setminus \{3\}$.

Rule 2: Expressions Inside Even Roots $\ge 0$

For $f(x) = \sqrt{g(x)}$, require $g(x) \ge 0$.

Example: $f(x) = \sqrt{9 - x^2} \implies 9 - x^2 \ge 0 \implies x^2 \le 9 \implies -3 \le x \le 3$.

Rule 3: Square Root in Denominator

For $f(x) = \frac{1}{\sqrt{g(x)}}$, require strict inequality $g(x) > 0$.

How to Find Range: Two Reliable Methods

Method A (Express $x$ in terms of $y$): Let $y = f(x)$, solve for $x = g(y)$, find values of $y$ for which real $x$ exists.

Method B (Inequality chaining): Start with known bounds (e.g. $x^2 \ge 0$ or $-3 \le x \le 3$) and build $y$.

7. Worked Examples — Easy to Hard

Example 1: Equality of Ordered Pairs Easy
If $\left(\frac{x}{3} + 1, y - \frac{2}{3}\right) = \left(\frac{5}{3}, \frac{1}{3}\right)$, find the values of $x$ and $y$.
Step 1: Equate corresponding components. $$\frac{x}{3} + 1 = \frac{5}{3} \quad \text{and} \quad y - \frac{2}{3} = \frac{1}{3}$$
Step 2: Solve for $x$: $\frac{x}{3} = \frac{5}{3} - 1 = \frac{2}{3} \implies x = 2$.
Step 3: Solve for $y$: $y = \frac{1}{3} + \frac{2}{3} = \frac{3}{3} = 1$.

Final Answer: $x = 2,\; y = 1$.

Example 2: Elements of Cartesian Product & Number of Relations Easy
Let $A = \{1, 2\}$ and $B = \{3, 4\}$. Write $A \times B$. How many relations are there from $A$ to $B$? Write three such relations.
Step 1: Form all ordered pairs: $$A \times B = \{(1, 3), (1, 4), (2, 3), (2, 4)\}$$
Step 2: Find total relations: Since $n(A \times B) = 4$, the number of subsets of $A \times B$ is $2^4 = 16$. Hence, there are 16 relations.
Step 3: Three examples of relations: $R_1 = \phi$ (empty relation), $R_2 = \{(1, 3), (2, 4)\}$, $R_3 = A \times B$ (universal relation).
Example 3: Ordered Triplet $P \times P \times P$ Medium
If $P = \{-1, 1\}$, form the set $P \times P \times P$.
Step 1: First compute $P \times P$: $$P \times P = \{(-1, -1), (-1, 1), (1, -1), (1, 1)\}$$
Step 2: Combine each pair with each element of $P$: $$P \times P \times P = \{(-1,-1,-1), (-1,-1,1), (-1,1,-1), (-1,1,1), (1,-1,-1), (1,-1,1), (1,1,-1), (1,1,1)\}$$

Total elements: $2 \times 2 \times 2 = 8$.

Example 4: Relation Domain, Range, and Arrow Diagram Medium
Let $A = \{1, 2, 3, 4, 5, 6\}$. Define a relation $R$ from $A$ to $A$ by $R = \{(x, y) : y = x + 1\}$.
(i) Write $R$ in roster form. (ii) Write down its domain, codomain, and range.
Step 1: Substitute values of $x \in A$ such that $y = x + 1 \in A$:
  • $x = 1 \implies y = 2$
  • $x = 2 \implies y = 3$
  • $x = 3 \implies y = 4$
  • $x = 4 \implies y = 5$
  • $x = 5 \implies y = 6$
  • $x = 6 \implies y = 7 \notin A$ (cannot include!)
Roster form: $R = \{(1, 2), (2, 3), (3, 4), (4, 5), (5, 6)\}$.
Step 2: Determine Domain, Range, and Codomain: $$\text{Domain} = \{1, 2, 3, 4, 5\}$$ $$\text{Range} = \{2, 3, 4, 5, 6\}$$ $$\text{Codomain} = A = \{1, 2, 3, 4, 5, 6\}$$
Example 5: Testing if a Piecewise Relation is a Function Medium
The relation $f$ is defined by: $$f(x) = \begin{cases} x^2, & 0 \le x \le 3 \\ 3x, & 3 \le x \le 10 \end{cases}$$ The relation $g$ is defined by: $$g(x) = \begin{cases} x^2, & 0 \le x \le 2 \\ 3x, & 2 \le x \le 10 \end{cases}$$ Show that $f$ is a function and $g$ is not a function.
For relation $f$: The overlap occurs at $x = 3$. From first piece: $f(3) = 3^2 = 9$. From second piece: $f(3) = 3(3) = 9$. Both definitions yield the exact same value $9$ at the boundary. For every other $x \in [0, 10]$, $x$ belongs to only one piece and has a unique output. Thus, each input has exactly one image. $f$ is a function!
For relation $g$: The overlap occurs at $x = 2$. From first piece: $g(2) = 2^2 = 4$. From second piece: $g(2) = 3(2) = 6$. Here, the single input $x = 2$ gives two distinct outputs ($4$ and $6$). This violates the uniqueness condition of a function. $g$ is NOT a function!
Example 6: Domain and Range of Radical Function $\sqrt{9 - x^2}$ Hard
Find the domain and range of the real-valued function $f(x) = \sqrt{9 - x^2}$.
Step 1: Domain For $f(x)$ to be a real number, the term under the square root must be non-negative: $$9 - x^2 \ge 0 \implies x^2 \le 9 \implies -3 \le x \le 3$$ $$\mathbf{\text{Domain} = [-3, 3]}$$
Step 2: Range Let $y = \sqrt{9 - x^2}$. Since the square root symbol represents the principal (positive) square root: $y \ge 0$. Squaring both sides: $y^2 = 9 - x^2 \implies x^2 = 9 - y^2$. Since $x \in [-3, 3]$, we know $x^2 \ge 0$, which gives: $$9 - y^2 \ge 0 \implies y^2 \le 9 \implies -3 \le y \le 3$$ Combining with $y \ge 0$: $$0 \le y \le 3$$ $$\mathbf{\text{Range} = [0, 3]}$$
Example 7: Domain of a Rational Function Hard
Find the domain of the function: $$f(x) = \frac{x^2 + 2x + 1}{x^2 - 8x + 12}$$
Step 1: The numerator is a polynomial defined for all $x \in \mathbb{R}$.
Step 2: For a rational function, division by zero is undefined. Hence, we must find where the denominator equals zero: $$x^2 - 8x + 12 = 0 \implies (x - 2)(x - 6) = 0 \implies x = 2 \text{ or } x = 6$$
Step 3: Exclude these values from $\mathbb{R}$: $$\mathbf{\text{Domain} = \mathbb{R} \setminus \{2, 6\} = (-\infty, 2) \cup (2, 6) \cup (6, \infty)}$$
Example 8: Algebra of Functions Medium
Let $f(x) = \sqrt{x}$ and $g(x) = x$. Find $(f + g)(x)$, $(f - g)(x)$, $(f \cdot g)(x)$ and $\left(\frac{f}{g}\right)(x)$ along with their domains.
Domains of individual functions: Domain of $f$ is $[0, \infty)$ because $x$ is under a square root. Domain of $g$ is $\mathbb{R}$. Their intersection is $D_f \cap D_g = [0, \infty)$.
Sum, Difference, Product:
  • $(f + g)(x) = \sqrt{x} + x$, Domain: $[0, \infty)$
  • $(f - g)(x) = \sqrt{x} - x$, Domain: $[0, \infty)$
  • $(f \cdot g)(x) = \sqrt{x} \cdot x = x^{3/2}$, Domain: $[0, \infty)$
Quotient: $\left(\frac{f}{g}\right)(x) = \frac{\sqrt{x}}{x} = \frac{1}{\sqrt{x}}$. Since denominator $g(x) = x \ne 0$, we must exclude $0$. Domain of $\frac{f}{g}$ is $(0, \infty)$.

8. NCERT Key Exercise Questions Solved

NCERT Exercise 2.1 — Question 5 & 7

Q: If $A \times B$ has 6 elements and three of them are $(1, 4), (2, 6), (3, 4)$, find the sets $A$ and $B$, and the remaining elements of $A \times B$.
View Full Solution

First elements belong to $A$: $\{1, 2, 3\} \subseteq A$.

Second elements belong to $B$: $\{4, 6\} \subseteq B$.

Since $n(A \times B) = n(A) \cdot n(B) = 6$, and $|\{1, 2, 3\}| = 3$, $|\{4, 6\}| = 2$, we have $3 \times 2 = 6$.

Therefore, $A = \{1, 2, 3\}$ and $B = \{4, 6\}$.

The full set $A \times B = \{(1, 4), (1, 6), (2, 4), (2, 6), (3, 4), (3, 6)\}$.

Remaining elements: $\{(1, 6), (2, 4), (3, 6)\}$.

NCERT Exercise 2.2 — Question 2

Q: Define a relation $R$ on the set $\mathbb{N}$ of natural numbers by $R = \{(x, y) : y = x + 5,\; x \text{ is a natural number less than } 4,\; x, y \in \mathbb{N}\}$. Depict this relationship using roster form. Write down the domain and the range.
View Full Solution

Natural numbers less than 4 are $x \in \{1, 2, 3\}$.

For $x = 1 \implies y = 1 + 5 = 6$.

For $x = 2 \implies y = 2 + 5 = 7$.

For $x = 3 \implies y = 3 + 5 = 8$.

Roster form: $R = \{(1, 6), (2, 7), (3, 8)\}$.

Domain: $\{1, 2, 3\}$.

Range: $\{6, 7, 8\}$.

NCERT Exercise 2.3 — Question 2

Q: Find the domain and range of the following real functions:
(i) $f(x) = -|x|$
(ii) $f(x) = \sqrt{9 - x^2}$
View Full Solution

(i) For $f(x) = -|x|$:

Domain: Since $|x|$ is defined for all real numbers, Domain = $\mathbb{R}$.

Range: For all $x \in \mathbb{R}$, $|x| \ge 0$. Multiplying by $-1$ reverses the inequality: $-|x| \le 0$. Hence, Range = $(-\infty, 0]$.

(ii) For $f(x) = \sqrt{9 - x^2}$:

Domain: $9 - x^2 \ge 0 \implies x^2 \le 9 \implies -3 \le x \le 3$. Domain = $[-3, 3]$.

Range: At $x = \pm 3$, $f(x) = 0$. At $x = 0$, $f(x) = \sqrt{9} = 3$. Hence, Range = $[0, 3]$.

NCERT Miscellaneous Exercise — Question 11 & 12

Q: Let $A = \{9, 10, 11, 12, 13\}$ and let $f: A \to \mathbb{N}$ be defined by $f(n) = \text{the highest prime factor of } n$. Find the range of $f$.
View Full Solution

Find prime factorisation of each element in $A$:

  • $9 = 3^2 \implies$ highest prime factor is $3$.
  • $10 = 2 \times 5 \implies$ highest prime factor is $5$.
  • $11 = 11 \implies$ highest prime factor is $11$.
  • $12 = 2^2 \times 3 \implies$ highest prime factor is $3$.
  • $13 = 13 \implies$ highest prime factor is $13$.

The set of outputs is $\{3, 5, 11, 3, 13\}$.

Range of $f = \{3, 5, 11, 13\}$.

9. Common Exam Traps & Pitfalls

Trap 1: Confusing Codomain and Range

If $f: A \to B$, the codomain is always the entire set $B$. The range is only the subset of elements in $B$ that actually get hit by an arrow. Range $\subseteq$ Codomain. They are equal only if every element in $B$ has a preimage (onto function).

Trap 2: Square Root Output is Never Negative

In real functions, $\sqrt{x}$ denotes the principal (positive) square root. So $\sqrt{4} = 2$, NOT $\pm 2$. If someone writes $\text{Range of } \sqrt{9 - x^2} = [-3, 3]$, they lose all marks! The range is $[0, 3]$.

Trap 3: Greatest Integer of Negative Numbers

Students often write $[-2.3] = -2$. That is WRONG! $[-2.3]$ rounds DOWN (to the left) on the number line, so $[-2.3] = -3$. Remember: $[x] \le x$. Since $-2 > -2.3$, it cannot be $-2$.

Trap 4: Forgetting the Overlap Check in Piecewise Functions

When asked if a split relation is a function, always evaluate both formulas at the boundary point! If they disagree, the single input has two different images and it fails to be a function.

10. Quick Self-Check Quiz

Q1: If set $A$ has 3 elements and set $B$ has 2 elements, how many non-empty relations can be defined from $A$ to $B$?

Answer
Total relations = $2^{3 \times 2} = 2^6 = 64$. Non-empty relations = $64 - 1 = 63$ (excluding $\phi$).

Q2: Is $y^2 = x$ a function of $x$? Why or why not?

Answer
No. For $x = 4$, $y = \pm 2$. A single input gives two different outputs ($2$ and $-2$), failing the vertical line test.

Q3: What is the value of $\text{sgn}(-7) + [3.8] - [-1.1]$?

Answer
$\text{sgn}(-7) = -1$, $[3.8] = 3$, and $[-1.1] = -2$. Thus, $(-1) + 3 - (-2) = -1 + 3 + 2 = 4$.

Q4: What is the domain of $f(x) = \frac{1}{\sqrt{x - 5}}$?

Answer
Since the square root is in the denominator, $x - 5$ must be strictly positive: $x - 5 > 0 \implies x > 5$. Domain is $(5, \infty)$. (Note: open bracket at 5 because division by zero is undefined).

Q5: If $f(x) = x^2$, evaluate $\frac{f(1.1) - f(1)}{1.1 - 1}$.

Answer
$\frac{(1.1)^2 - 1^2}{0.1} = \frac{1.21 - 1}{0.1} = \frac{0.21}{0.1} = 2.1$.
Prev Chapter Hub Next Chapter