Class 11 Mathematics · Chapter 2

Relations and Functions

Cartesian products, relations, functions, domain and range, and graphs of standard functions.

NCERT Mathematics (Textbook for Class XI)CBSE Class 11 9 min read

1. Chapter at a Glance

"Is the father of", "is less than", "is the square of" — these phrases link objects in pairs. Mathematics captures such links as relations, and the most important kind, where each input has exactly one output, as functions. Functions are the central idea of calculus and of almost all applied mathematics: the distance a car travels as a function of time, the cost of electricity as a function of units used, and so on. This chapter builds the concepts from Cartesian products, then studies real functions, their graphs and their algebra.

What you will learn
  • Ordered pairs and the Cartesian product A × B.
  • Relations: domain, codomain, range; number of relations.
  • Functions as special relations; domain and range of real functions.
  • Standard functions and their graphs: identity, constant, polynomial, rational, modulus, signum, greatest integer.
  • Algebra of functions: f ± g, fg, f/g.

2. Cartesian Product

An ordered pair (a, b) has a first and second element; (a, b) = (c, d) only if a = c and b = d.

Definition

A × B = {(a, b) : a ∈ A, b ∈ B}. If n(A) = p and n(B) = q, then n(A × B) = pq. If either set is empty, A × B = ∅.

Worked Example 1

A = {1, 2}, B = {x, y, z}. Find A × B and B × A.

Solution: A × B = {(1,x), (1,y), (1,z), (2,x), (2,y), (2,z)} — 6 pairs. B × A has the same pairs reversed; in general A × B ≠ B × A.

ℝ × ℝ = ℝ² is the coordinate plane; ℝ × ℝ × ℝ is 3-D space.

3. Relations

Definition

A relation R from A to B is any subset of A × B. If (a, b) ∈ R we write a R b. The set of first elements is the domain, B is the codomain, and the set of second elements actually used is the range (range ⊆ codomain).

Since A × B has pq elements, the number of relations from A to B is 2^(pq).

Worked Example 2

A = {1, 2, 3, 4, 5, 6}. Define R on A by R = {(x, y) : y = x + 1}. Write R, its domain and range.

Solution: R = {(1,2), (2,3), (3,4), (4,5), (5,6)}. Domain {1, 2, 3, 4, 5}; range {2, 3, 4, 5, 6}; codomain A.

4. Functions

Definition

A relation f from A to B is a function if every element of A has exactly one image in B. We write f : A → B, y = f(x). A is the domain; B the codomain; {f(x) : x ∈ A} the range.

AB 123 ab Function ✓ 123 ab Not a function ✗
Left: each element of A has exactly one image (two may share). Right: 1 has two images and 2 has none.

Number of functions from A (p elements) to B (q elements) = q^p.

Vertical line test: a graph in the plane represents a function of x if every vertical line meets it at most once.

Worked Example 3 — Domain and range

Find the domain and range of f(x) = √(9 − x²).

Solution: Need 9 − x² ≥ 0 → −3 ≤ x ≤ 3. Domain [−3, 3]. Values from 0 (at x = ±3) to 3 (at x = 0): range [0, 3].

Worked Example 4

Find the domain of f(x) = (x² + 2x + 1)/(x² − 8x + 12).

Solution: Denominator (x − 2)(x − 6) ≠ 0. Domain = ℝ − {2, 6}.

5. Standard Real Functions

FunctionRuleDomainRange
Identityf(x) = xℝℝ
Constantf(x) = cℝ{c}
Polynomiala₀ + a₁x + … + aₙxⁿℝdepends
Rationalp(x)/q(x)ℝ − {zeros of q}depends
Modulus|x| = x (x ≥ 0), −x (x < 0)ℝ[0, ∞)
Signum1 (x > 0), 0 (x = 0), −1 (x < 0)ℝ{−1, 0, 1}
Greatest integer[x] = greatest integer ≤ xℝℤ
y = |x| y = sgn x y = [x]
Modulus (V-shape), signum (jump at 0), greatest integer (steps; filled dot = included end).

Examples of [x]: [2.7] = 2, [−2.7] = −3, [5] = 5.

6. Algebra of Real Functions

For f, g with domain D (common domain):

OperationDefinitionDomain
Sum(f + g)(x) = f(x) + g(x)D
Difference(f − g)(x) = f(x) − g(x)D
Product(fg)(x) = f(x)g(x)D
Scalar multiple(αf)(x) = αf(x)D
Quotient(f/g)(x) = f(x)/g(x)D − {x : g(x) = 0}
Worked Example 5

f(x) = x², g(x) = 2x + 1. Find (f + g)(x), (fg)(x), (f/g)(x).

Solution: x² + 2x + 1; 2x³ + x²; x²/(2x + 1), x ≠ −½.

7. Solved Problems (Board Pattern)

Problem 1 — Equal ordered pairs

If (x/3 + 1, y − 2/3) = (5/3, 1/3), find x and y.

Solution: x/3 + 1 = 5/3 → x = 2. y − 2/3 = 1/3 → y = 1.

Problem 2 — Recover sets from a product

A × B has 6 elements, three of which are (1, 3), (2, 5), (3, 3). Find A, B and the remaining elements.

Solution: A ⊇ {1, 2, 3}, B ⊇ {3, 5}; 3 × 2 = 6 so A = {1, 2, 3}, B = {3, 5}. Remaining: (1, 5), (2, 3), (3, 5).

Problem 3 — Linear function from values

f is linear with f(1) = 1 and f(2) = 3 (as in f(x) = ax + b). Find f.

Solution: a + b = 1, 2a + b = 3 → a = 2, b = −1. f(x) = 2x − 1.

8. Master Formula Table

ResultFormula
Size of productn(A × B) = n(A) · n(B)
Number of relations A → B2^(pq)
Number of functions A → Bq^p
Modulus|x| = √(x²)
Greatest integer[x] ≤ x < [x] + 1
Quotient domainD − {x : g(x) = 0}
Square-root domainexpression under √ ≥ 0

9. Master Summary Table

ConceptKey testExam focus
Cartesian productAll ordered pairsCount; recover A and B
RelationAny subset of A × BDomain, range, roster form
FunctionEach input → exactly one outputIs it a function?
Domain of real functionDenominator ≠ 0; √ needs ≥ 0Find domain and range
Standard graphsShape recognitionSketch |x|, sgn x, [x]
Algebra of functionsCombine pointwisef + g, fg, f/g

10. Mind Map

Relations and Functions
Products
  • A × B
  • pq pairs
Relations
  • Subset of A × B
  • Domain, range
Functions
  • One image each
  • Vertical line test
Real functions
  • |x|, sgn, [x]
  • f ± g, fg, f/g

11. Tips and Tricks

Smart ideas
  • For domain questions, list the restrictions: denominators ≠ 0, even roots ≥ 0.
  • For range, express x in terms of y and see which y-values are allowed.
  • In arrow diagrams, check that every element of A has exactly one arrow leaving it.
Common mistakes
  • Confusing codomain with range.
  • Thinking two inputs with the same output break the function rule (they don't).
  • [−2.3] = −2 (wrong) — it is −3.

12. Important One-liners

  • A × B ≠ B × A unless A = B (or one is empty).
  • Every function is a relation, but not every relation is a function.
  • Range ⊆ codomain.
  • The range of |x| is [0, ∞); of sgn x is {−1, 0, 1}.
  • Number of functions from a p-set to a q-set is q^p.

13. Exam-pattern Questions with Detailed Answers

Q1Easy

If n(A) = 3 and n(B) = 2, the number of relations from A to B is:

  1. 6
  2. 8
  3. 32
  4. 64
Show answer

2^(3×2) = 64.

Answer: (D)

Q2Easy

Is {(2, 1), (5, 1), (8, 1), (11, 1)} a function? Find its domain and range.

Show answer

Yes — each first element appears once. Domain {2, 5, 8, 11}; range {1}.

Answer: Yes; domain {2,5,8,11}, range {1}

Q3Easy

Find [−4.6] + [4.6].

Show answer

−5 + 4 = −1.

Answer: −1

Q4Medium

Find the domain and range of f(x) = 1/(2 − x).

Show answer

Domain ℝ − {2}. y = 1/(2 − x) → x = 2 − 1/y, defined for y ≠ 0. Range ℝ − {0}.

Answer: ℝ − {2}; ℝ − {0}

Q5Medium

Find the range of f(x) = |x − 1|.

Show answer

Modulus is always ≥ 0 and takes every non-negative value: [0, ∞).

Answer: [0, ∞)

Q6Medium

Let A = {1, 2, 3}, B = {3, 4}, C = {4, 5, 6}. Find A × (B ∩ C) and (A × B) ∩ (A × C).

Show answer

B ∩ C = {4}. A × {4} = {(1,4), (2,4), (3,4)}. (A × B) ∩ (A × C) gives the same set.

Answer: {(1,4), (2,4), (3,4)} for both

Q7Medium

Find the domain of f(x) = √(x − 1) + √(5 − x).

Show answer

x ≥ 1 and x ≤ 5 → [1, 5].

Answer: [1, 5]

Q8Medium

If f(x) = x² − 3x + 2, find f(f(1)) and the values of x where f(x) = 0.

Show answer

f(1) = 0, f(0) = 2. Zeros: (x − 1)(x − 2) = 0 → 1, 2.

Answer: f(f(1)) = 2; x = 1, 2

Q9Hard

Find the range of f(x) = x/(1 + x²).

Show answer

y(1 + x²) = x → yx² − x + y = 0. For real x (y ≠ 0): discriminant 1 − 4y² ≥ 0 → −½ ≤ y ≤ ½; y = 0 occurs at x = 0. Range [−½, ½].

Answer: [−1/2, 1/2]

Q10Hard

Let R = {(a, b) : a, b ∈ ℕ, a + 3b = 12}. Write R in roster form and find its domain and range.

Show answer

b = 1 → a = 9; b = 2 → a = 6; b = 3 → a = 3; b = 4 → a = 0 (not in ℕ). R = {(9,1), (6,2), (3,3)}. Domain {3, 6, 9}; range {1, 2, 3}.

Answer: R = {(9,1), (6,2), (3,3)}

Q11Hard

Find the domain and range of f(x) = √(x² − 4).

Show answer

x² ≥ 4 → x ≤ −2 or x ≥ 2: domain (−∞, −2] ∪ [2, ∞). Values √(x² − 4) take every value ≥ 0: range [0, ∞).

Answer: (−∞, −2] ∪ [2, ∞); [0, ∞)

Q12Hard

f(x) = √x and g(x) = x are defined on non-negative reals. Find (f + g), (f − g), (fg) and (f/g) with domains.

Show answer

(f + g)(x) = √x + x, (f − g)(x) = √x − x, (fg)(x) = x^(3/2): all on [0, ∞). (f/g)(x) = 1/√x on (0, ∞) (g(0) = 0 excluded).

Answer: As above

14. Quick Revision Summary

Revise in 2 minutes
  • A × B: all ordered pairs; n(A × B) = pq.
  • Relation: any subset of A × B; 2^(pq) relations.
  • Function: each element of the domain has exactly one image; q^p functions.
  • Domain: avoid zero denominators and negative even roots.
  • Know graphs of identity, constant, |x|, sgn x, [x]; combine functions pointwise.