← Back to NCERT Solutions
Class 12 Mathematics

Relations and Functions

Chapter 1
Class 12
Difficulty Easy
Last Updated Feb 13, 2026

Relations and Functions – Complete Solutions

1.1 Introduction to Relations

A relation R from set A to set B is a subset of the Cartesian product A × B. Each ordered pair (a, b) in the relation represents a connection where a ∈ A and b ∈ B.

Example:

Let A = {1, 2, 3} and B = {a, b}. Then A × B = {(1,a), (1,b), (2,a), (2,b), (3,a), (3,b)}

A relation could be R = {(1,a), (2,b)} which is a subset of A × B.

1.2 Domain and Range

Domain: The set of all first elements in the ordered pairs of a relation is called the domain.

Co-domain: The set B to which the relation is defined is called the co-domain.

Range: The set of all second elements in the ordered pairs of a relation is called the range. Range ⊆ Co-domain

Example:

If R = {(1,2), (1,3), (2,3), (3,3)} then Domain = {1, 2, 3}, Range = {2, 3}

1.3 Functions

A function is a special type of relation where each element of the domain has exactly one image in the co-domain.

Definition:

A relation f: A → B is a function if for every a ∈ A, there exists a unique b ∈ B such that (a, b) ∈ f.

1.4 Types of Functions

1. One-to-One Function (Injective):

A function f: A → B is one-to-one if different elements of A have different images in B.

Mathematically: If f(a₁) = f(a₂), then a₁ = a₂

Example: f(x) = 2x + 3 is one-to-one

2. Onto Function (Surjective):

A function f: A → B is onto if every element of B has at least one pre-image in A.

Range = Co-domain

Example: f: R → R defined by f(x) = x³ is onto

3. Bijective Function:

A function that is both one-to-one and onto is called bijective.

Example: f(x) = 2x + 1 is bijective from R to R

1.5 Composite Functions

If f: A → B and g: B → C are two functions, then the composite function (g ∘ f): A → C is defined as (g ∘ f)(x) = g(f(x))

Example:

If f(x) = x + 1 and g(x) = 2x, then (g ∘ f)(x) = g(f(x)) = g(x+1) = 2(x+1) = 2x + 2

1.6 Inverse Functions

If f: A → B is a bijective function, then the inverse function f⁻¹: B → A is defined such that f⁻¹(f(x)) = x and f(f⁻¹(y)) = y

Method to find inverse:

  1. Let y = f(x)
  2. Solve for x in terms of y
  3. Replace x with f⁻¹(y) and y with x

Example:

Find the inverse of f(x) = 3x – 2

Let y = 3x – 2

3x = y + 2

x = (y + 2)/3

Therefore, f⁻¹(x) = (x + 2)/3

Exercise Solutions

Problem 1:

Question: If f(x) = x/(x+1), find f(f(x))

Solution:

f(f(x)) = f(x/(x+1)) = (x/(x+1)) / ((x/(x+1)) + 1)

= (x/(x+1)) / ((x+x+1)/(x+1))

= (x/(x+1)) × ((x+1)/(2x+1))

= x/(2x+1)

Problem 2:

Question: Check whether f: Z → Z defined by f(x) = x² is one-to-one

Solution: No, f is not one-to-one because f(-2) = 4 = f(2), but -2 ≠ 2