TOPIC 2 OF 16

Types of Functions, Composition, and Invertible Functions

🎓 Class 12 Mathematics CBSE Theory Ch 1 — Relations and Functions ⏱ ~25 min
🌐 Language: [gtranslate]

This MCQ module is based on: Types of Functions, Composition, and Invertible Functions

This mathematics assessment will be based on: Types of Functions, Composition, and Invertible Functions
Targeting Class 12 level in Functions, with Advanced difficulty.

Upload images, PDFs, or Word documents to include their content in assessment generation.

1.3 Types of Functions

In Class XI, we studied identity function, constant function, polynomial function, rational function, modulus function, signum function, and greatest integer function along with their graphs. We also studied addition, subtraction, multiplication, and division of two functions. In this section, we extend our study to one-one? and onto? functions.

Definition 5 — One-One (Injective)
A function \(f: X \to Y\) is defined to be one-one (or injective), if the images of distinct elements of X under \(f\) are distinct, i.e., for every \(x_1, x_2 \in X\), \(f(x_1) = f(x_2)\) implies \(x_1 = x_2\). Otherwise, \(f\) is called many-one.
Definition 6 — Onto (Surjective)
A function \(f: X \to Y\) is said to be onto (or surjective), if every element of Y is the image of some element of X under \(f\). That is, for every \(y \in Y\), there exists an element \(x \in X\) such that \(f(x) = y\).
Definition 7 — Bijective
A function \(f: X \to Y\) is said to be one-one and onto (or bijective), if \(f\) is both one-one and onto.
(i) f₁: one-one, not onto X₁ X₂ 1 2 3 4 a b c d e f (ii) f₂: onto, not one-one X₁ X₂ 1 2 3 4 b d e (iii) f₃: many-one 1 2 3 a b c (iv) f₄: bijective 1 2 3 4 a b c d Fig 1.2 (i) to (iv)
Fig 1.2 — Arrow diagrams showing (i) one-one not onto, (ii) onto not one-one, (iii) many-one, (iv) bijective

Remark: \(f: X \to Y\) is onto if and only if Range of \(f\) = Y.

Worked Example 7

Let A be the set of all 50 students of Class X in a school. Let \(f: A \to \mathbf{N}\) be the function defined by \(f(x)\) = roll number of student \(x\). Show that \(f\) is one-one but not onto.

Solution
One-one: No two different students can have the same roll number. So \(f(x_1) = f(x_2) \Rightarrow x_1 = x_2\). Hence \(f\) is one-one.

Not onto: Roll numbers are from 1 to 50. But \(\mathbf{N}\) has infinitely many elements (51, 52, 53, ...) that are not the roll number of any student. So \(f\) is not onto.

Worked Example 8

Show that the function \(f: \mathbf{N} \to \mathbf{N}\) given by \(f(x) = 2x\) is one-one but not onto.

Solution
One-one: \(f(x_1) = f(x_2) \Rightarrow 2x_1 = 2x_2 \Rightarrow x_1 = x_2\). Hence \(f\) is one-one.

Not onto: For \(f\) to be onto, for every \(y \in \mathbf{N}\), there should exist \(x \in \mathbf{N}\) such that \(f(x) = y\), i.e., \(2x = y\), i.e., \(x = \frac{y}{2}\). But when \(y = 1\) (odd), \(x = \frac{1}{2} \notin \mathbf{N}\). So \(f\) is not onto.

Worked Example 9

Prove that the function \(f: \mathbf{R} \to \mathbf{R}\) given by \(f(x) = 2x\) is one-one and onto.

Solution
One-one: \(f(x_1) = f(x_2) \Rightarrow 2x_1 = 2x_2 \Rightarrow x_1 = x_2\).

Onto: For any \(y \in \mathbf{R}\), there exists \(x = \frac{y}{2} \in \mathbf{R}\) such that \(f\left(\frac{y}{2}\right) = 2 \cdot \frac{y}{2} = y\). Hence \(f\) is onto.
X Y O y = 2x (1, 2) −1
Fig 1.3 — Graph of \(f(x) = 2x\) (bijective from \(\mathbf{R}\) to \(\mathbf{R}\))

Worked Example 10

Show that the function \(f: \mathbf{N} \to \mathbf{N}\) given by \(f(1) = f(2) = 1\) and \(f(x) = x - 1\) for every \(x > 2\), is onto but not one-one.

Solution
Not one-one: \(f(1) = 1 = f(2)\), but \(1 \neq 2\).

Onto: For any \(y \in \mathbf{N}\), we can find \(x = y + 1 \in \mathbf{N}\) (with \(y + 1 > 2\) when \(y \geq 2\)) such that \(f(x) = f(y+1) = (y+1) - 1 = y\). For \(y = 1\), \(f(1) = 1\). So every \(y\) has a pre-image. Hence \(f\) is onto.

Worked Example 12

Show that \(f: \mathbf{N} \to \mathbf{N}\) given by \[f(x) = \begin{cases} x + 1, & \text{if } x \text{ is odd} \\ x - 1, & \text{if } x \text{ is even}\end{cases}\] is both one-one and onto.

Solution
One-one: Suppose \(f(x_1) = f(x_2)\).
Case 1: Both \(x_1, x_2\) odd. Then \(x_1 + 1 = x_2 + 1 \Rightarrow x_1 = x_2\).
Case 2: Both \(x_1, x_2\) even. Then \(x_1 - 1 = x_2 - 1 \Rightarrow x_1 = x_2\).
Case 3: \(x_1\) odd, \(x_2\) even. Then \(x_1 + 1 = x_2 - 1\), i.e., \(x_2 - x_1 = 2\). But \(x_1 + 1\) is even and \(x_2 - 1\) is odd (contradicting equality). Similarly for Case 4.
Hence \(f\) is one-one.

Onto: Any odd number \(2r + 1\) in the co-domain is the image of even number \(2r + 2\) (since \(f(2r+2) = (2r+2) - 1 = 2r + 1\)). Any even number \(2r\) is the image of odd number \(2r - 1\) (since \(f(2r-1) = (2r-1) + 1 = 2r\)). Hence \(f\) is onto.

Exercise 1.2

Q1. Show that the function \(f: \mathbf{R}_* \to \mathbf{R}_*\) defined by \(f(x) = \frac{1}{x}\) is one-one and onto, where \(\mathbf{R}_*\) is the set of all non-zero real numbers. Is the result true, if the domain \(\mathbf{R}_*\) is replaced by N with co-domain being same as \(\mathbf{R}_*\)?
One-one: \(f(x_1) = f(x_2) \Rightarrow \frac{1}{x_1} = \frac{1}{x_2} \Rightarrow x_1 = x_2\). Yes.
Onto: For any \(y \in \mathbf{R}_*\), take \(x = \frac{1}{y} \in \mathbf{R}_*\). Then \(f(x) = \frac{1}{1/y} = y\). Yes.

If domain = N: \(f: \mathbf{N} \to \mathbf{R}_*\), \(f(x) = \frac{1}{x}\).
One-one: Still yes (\(\frac{1}{x_1} = \frac{1}{x_2} \Rightarrow x_1 = x_2\)).
Onto: No. For example, \(y = \frac{1}{3}\) is in \(\mathbf{R}_*\), and \(f(3) = \frac{1}{3}\). But \(y = 1.5 \in \mathbf{R}_*\) has no pre-image in \(\mathbf{N}\). So not onto.
Q2. Check the injectivity and surjectivity of the following functions:
(i) \(f: \mathbf{N} \to \mathbf{N}\) given by \(f(x) = x^2\)
(ii) \(f: \mathbf{Z} \to \mathbf{Z}\) given by \(f(x) = x^2\)
(iii) \(f: \mathbf{R} \to \mathbf{R}\) given by \(f(x) = x^2\)
(iv) \(f: \mathbf{N} \to \mathbf{N}\) given by \(f(x) = x^3\)
(v) \(f: \mathbf{Z} \to \mathbf{Z}\) given by \(f(x) = x^3\)
(i) Injective: \(x_1^2 = x_2^2\) in N \(\Rightarrow x_1 = x_2\) (since N has only positives). Yes. Surjective: 2 has no pre-image (\(\sqrt{2} \notin \mathbf{N}\)). No.
(ii) Injective: \((-1)^2 = 1^2\) but \(-1 \neq 1\). No. Surjective: \(-2\) has no pre-image (no integer squares to \(-2\)). No.
(iii) Injective: \((-1)^2 = 1^2\) but \(-1 \neq 1\). No. Surjective: \(-1\) has no pre-image (\(x^2 \geq 0\)). No.
(iv) Injective: \(x_1^3 = x_2^3 \Rightarrow x_1 = x_2\) in N. Yes. Surjective: 2 has no pre-image (\(\sqrt[3]{2} \notin \mathbf{N}\)). No.
(v) Injective: \(x_1^3 = x_2^3 \Rightarrow x_1 = x_2\). Yes. Surjective: 2 has no pre-image in Z. No.
Q3. Prove that the Greatest Integer Function \(f: \mathbf{R} \to \mathbf{R}\) given by \(f(x) = [x]\) is neither one-one nor onto, where \([x]\) denotes the greatest integer less than or equal to \(x\).
Not one-one: \(f(1.2) = [1.2] = 1\) and \(f(1.5) = [1.5] = 1\), but \(1.2 \neq 1.5\).
Not onto: For \(y = 0.5\), there is no \(x \in \mathbf{R}\) such that \([x] = 0.5\) (since \([x]\) is always an integer). So \(0.5\) has no pre-image.
Q4. Show that the Modulus Function \(f: \mathbf{R} \to \mathbf{R}\) given by \(f(x) = |x|\) is neither one-one nor onto.
Not one-one: \(f(-1) = |-1| = 1 = |1| = f(1)\), but \(-1 \neq 1\).
Not onto: \(|x| \geq 0\) for all \(x\). So \(-1\) has no pre-image.
Q5. Show that the Signum Function \(f: \mathbf{R} \to \mathbf{R}\) given by \(f(x) = \begin{cases} 1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0 \end{cases}\) is neither one-one nor onto.
Not one-one: \(f(1) = 1 = f(2)\) but \(1 \neq 2\). (All positive reals map to 1.)
Not onto: Range = {−1, 0, 1}. So \(2 \in \mathbf{R}\) has no pre-image.
Q11. Let \(f: \mathbf{R} \to \mathbf{R}\) be defined as \(f(x) = x^4\). Choose the correct answer.
(A) \(f\) is one-one onto   (B) \(f\) is many-one onto
(C) \(f\) is one-one but not onto   (D) \(f\) is neither one-one nor onto.
Not one-one: \(f(-1) = 1 = f(1)\). Not onto: \(-2\) has no pre-image (since \(x^4 \geq 0\)).
Answer: (D)
Q12. Let \(f: \mathbf{R} \to \mathbf{R}\) be defined as \(f(x) = 3x\). Choose the correct answer.
(A) \(f\) is one-one onto   (B) \(f\) is many-one onto
(C) \(f\) is one-one but not onto   (D) \(f\) is neither one-one nor onto.
One-one: \(3x_1 = 3x_2 \Rightarrow x_1 = x_2\). Onto: For any \(y\), take \(x = \frac{y}{3}\).
Answer: (A) one-one onto.

1.4 Composition of Functions and Invertible Functions

Definition 8 — Composition of Functions
Let \(f: A \to B\) and \(g: B \to C\) be two functions. Then the composition of \(f\) and \(g\), denoted by \(gof\), is defined as the function \(gof: A \to C\) given by \[gof(x) = g(f(x)), \quad \forall\; x \in A.\]
A x B f(x) C g(f(x)) f g gof
Fig 1.5 — Composition of functions: \(gof(x) = g(f(x))\)

Worked Example 15

Let \(f: \{2, 3, 4, 5\} \to \{3, 4, 5, 9\}\) and \(g: \{3, 4, 5, 9\} \to \{7, 11, 15\}\) be functions defined as \(f(2) = 3, f(3) = 4, f(4) = f(5) = 5\) and \(g(3) = g(4) = 7\) and \(g(5) = 11\) and \(g(9) = 15\). Find \(gof\).

Solution
\(gof(2) = g(f(2)) = g(3) = 7\)
\(gof(3) = g(f(3)) = g(4) = 7\)
\(gof(4) = g(f(4)) = g(5) = 11\)
\(gof(5) = g(f(5)) = g(5) = 11\)

Worked Example 16

Find \(gof\) and \(fog\) if \(f: \mathbf{R} \to \mathbf{R}\) and \(g: \mathbf{R} \to \mathbf{R}\) are given by \(f(x) = \cos x\) and \(g(x) = 3x^2\). Show that \(gof \neq fog\).

Solution
\(gof(x) = g(f(x)) = g(\cos x) = 3(\cos x)^2 = 3\cos^2 x\)

\(fog(x) = f(g(x)) = f(3x^2) = \cos(3x^2)\)

Note that \(3\cos^2 x \neq \cos(3x^2)\) in general. For instance, at \(x = 0\): \(gof(0) = 3\cos^2 0 = 3\) while \(fog(0) = \cos 0 = 1\).
Hence \(gof \neq fog\).
Important
In general, \(gof \neq fog\). Composition of functions is NOT commutative.
Definition 9 — Invertible Function
A function \(f: X \to Y\) is defined to be invertible, if there exists a function \(g: Y \to X\) such that \(gof = I_X\) and \(fog = I_Y\). The function \(g\) is called the inverse of \(f\) and is denoted by \(f^{-1}\).

Thus, if \(f\) is invertible, then \(f\) must be one-one and onto. Conversely, if \(f\) is one-one and onto, then \(f\) must be invertible.

Worked Example 17

Let \(f: \mathbf{N} \to Y\) be a function defined as \(f(x) = 4x + 3\), where Y = {y ∈ N : y = 4x + 3 for some x ∈ N}. Show that \(f\) is invertible. Find the inverse.

Solution
Consider an arbitrary element \(y\) of Y. By the definition of Y, \(y = 4x + 3\), which gives \(x = \frac{y - 3}{4}\).

Define \(g: Y \to \mathbf{N}\) by \(g(y) = \frac{y - 3}{4}\).

Now, \(gof(x) = g(f(x)) = g(4x + 3) = \frac{(4x + 3) - 3}{4} = x = I_{\mathbf{N}}\)

And \(fog(y) = f(g(y)) = f\left(\frac{y-3}{4}\right) = 4 \cdot \frac{y-3}{4} + 3 = y - 3 + 3 = y = I_Y\)

This shows that \(gof = I_{\mathbf{N}}\) and \(fog = I_Y\), which implies that \(f\) is invertible and \(g\) is the inverse of \(f\).
\(f^{-1}(y) = \frac{y - 3}{4}\).
Activity: Composing Functions Step-by-Step
Predict: If \(f(x) = x^2\) and \(g(x) = x + 1\), will \(gof(3)\) equal \(fog(3)\)?
  1. Compute \(gof(3)\): first apply \(f\) to get \(f(3) = 9\), then \(g(9) = 10\). So \(gof(3) = 10\).
  2. Compute \(fog(3)\): first apply \(g\) to get \(g(3) = 4\), then \(f(4) = 16\). So \(fog(3) = 16\).
  3. Compare: \(10 \neq 16\). Order matters!
  4. Try with \(x = 0\): \(gof(0) = g(0) = 1\), \(fog(0) = f(1) = 1\). Equal! But this is a coincidence at one point.

Observation: \(gof(x) = x^2 + 1\) while \(fog(x) = (x+1)^2 = x^2 + 2x + 1\). These are different polynomials.

Explanation: Composition of functions is not commutative in general. The order in which functions are applied matters. Think of it like getting dressed: putting on socks then shoes gives a different result than shoes then socks!

Interactive: Function Composition Calculator
Enter two functions and compute gof and fog at a given point

Competency-Based Questions

A software company assigns unique employee IDs using a function \(f: \mathbf{N} \to \mathbf{N}\) defined by \(f(x) = 2x + 100\). The HR department needs to retrieve original application numbers from employee IDs using the inverse function.
Q1. Is the function \(f(x) = 2x + 100\) one-one? Justify.
L2 Understand
Yes, f is one-one. If \(f(x_1) = f(x_2)\), then \(2x_1 + 100 = 2x_2 + 100\), which gives \(x_1 = x_2\). No two different application numbers produce the same employee ID.
Q2. If an employee's ID is 256, what was their original application number?
L3 Apply
We need \(f^{-1}(256)\). Solving \(2x + 100 = 256\): \(2x = 156\), \(x = 78\).
The original application number was 78.
Q3. Find the inverse function \(f^{-1}\) and verify that \(fof^{-1}(y) = y\).
L3 Apply
Let \(y = 2x + 100\). Then \(x = \frac{y - 100}{2}\). So \(f^{-1}(y) = \frac{y - 100}{2}\).

Verification: \(f(f^{-1}(y)) = f\left(\frac{y-100}{2}\right) = 2 \cdot \frac{y-100}{2} + 100 = y - 100 + 100 = y\). Verified!
Q4. The company merges with another firm that uses ID function \(g(x) = 3x + 50\). If a joint project assigns IDs using \(gof\), express the combined function and find \((gof)^{-1}\).
L4 Analyse
\(gof(x) = g(f(x)) = g(2x + 100) = 3(2x + 100) + 50 = 6x + 350\).

To find \((gof)^{-1}\): let \(y = 6x + 350\). Then \(x = \frac{y - 350}{6}\).
So \((gof)^{-1}(y) = \frac{y - 350}{6}\).

Alternatively: \((gof)^{-1} = f^{-1}og^{-1}\). Since \(g^{-1}(y) = \frac{y - 50}{3}\) and \(f^{-1}(y) = \frac{y - 100}{2}\):
\(f^{-1}(g^{-1}(y)) = f^{-1}\left(\frac{y-50}{3}\right) = \frac{\frac{y-50}{3} - 100}{2} = \frac{y - 50 - 300}{6} = \frac{y - 350}{6}\). Same result!

Assertion–Reason Questions

Assertion (A): The function \(f: \mathbf{R} \to \mathbf{R}\) given by \(f(x) = x^3\) is invertible.
Reason (R): A function is invertible if and only if it is bijective.
(a) Both true, R explains A.
(b) Both true, R doesn't explain A.
(c) A true, R false.
(d) A false, R true.
Answer: (a) — \(f(x) = x^3\) is one-one (if \(x_1^3 = x_2^3\) then \(x_1 = x_2\)) and onto (for any \(y\), take \(x = y^{1/3}\)). Since it is bijective, it is invertible. R correctly explains A.
Assertion (A): \(gof\) is always equal to \(fog\).
Reason (R): Composition of functions is commutative.
(a) Both true, R explains A.
(b) Both true, R doesn't explain A.
(c) A true, R false.
(d) A false, R false.
Answer: (d) — A is false: take \(f(x) = x^2, g(x) = x+1\). Then \(gof(x) = x^2 + 1\) but \(fog(x) = (x+1)^2\). These are not equal. R is also false: composition is generally not commutative.
Assertion (A): If \(f: A \to B\) is one-one and \(|A| = |B|\) (both finite), then \(f\) is onto.
Reason (R): For finite sets of equal cardinality, a one-one function must be onto (pigeonhole principle).
(a) Both true, R explains A.
(b) Both true, R doesn't explain A.
(c) A true, R false.
(d) A false, R true.
Answer: (a) — Both are true. If \(f\) maps \(n\) distinct elements of A to \(n\) distinct elements of B (one-one), and B also has exactly \(n\) elements, every element of B is covered. R correctly explains A via the pigeonhole principle.

Frequently Asked Questions

What is a one-one (injective) function?

A function f is one-one if distinct elements in the domain map to distinct elements in the codomain. If f(a) = f(b) then a = b.

What is an onto (surjective) function?

A function f from A to B is onto if every element of B has at least one pre-image in A, meaning the range equals the codomain.

What is composition of functions?

The composition of f and g, denoted f(g(x)), applies g first then f. Composition is associative but generally not commutative.

When is a function invertible?

A function is invertible if and only if it is bijective (both one-one and onto). The inverse reverses the mapping.

What is a binary operation?

A binary operation on set A is a function from A x A to A that assigns each ordered pair a unique element in A. It must satisfy closure.

Frequently Asked Questions — Relations and Functions

What is Types of Functions, Composition, and Invertible Functions in NCERT Class 12 Mathematics?

Types of Functions, Composition, and Invertible Functions is a key concept covered in NCERT Class 12 Mathematics, Chapter 1: Relations and Functions. This lesson builds the student's foundation in the chapter by explaining the core ideas with worked examples, definitions, and step-by-step methods aligned to the CBSE curriculum.

How do I solve problems on Types of Functions, Composition, and Invertible Functions step by step?

To solve problems on Types of Functions, Composition, and Invertible Functions, follow the NCERT method: identify the given quantities, choose the relevant formula or theorem, substitute values carefully, and simplify. Class 12 exercises gradually increase in difficulty — start with solved NCERT examples before attempting exercise questions, and always verify your answer by substitution or diagram.

What are the most important formulas for Chapter 1: Relations and Functions?

The essential formulas of Chapter 1 (Relations and Functions) are listed in the chapter summary and highlighted throughout the lesson in formula boxes. Memorise them and practise at least 2–3 problems per formula. CBSE board exams frequently test direct application as well as combined use of multiple formulas from this chapter.

Is Types of Functions, Composition, and Invertible Functions important for the Class 12 board exam?

Types of Functions, Composition, and Invertible Functions is part of the NCERT Class 12 Mathematics syllabus and appears in CBSE board exams. Questions typically include short-answer, long-answer, and competency-based items. Review the NCERT examples, exercise questions, and previous-year board problems on this topic to prepare confidently.

What mistakes should students avoid in Types of Functions, Composition, and Invertible Functions?

Common mistakes in Types of Functions, Composition, and Invertible Functions include skipping steps, misapplying formulas, sign errors, and losing track of units. Write each step clearly, double-check algebraic manipulations, and re-read the question after solving to verify that your answer matches what was asked.

Where can I find more NCERT practice questions on Types of Functions, Composition, and Invertible Functions?

End-of-chapter NCERT exercises for Types of Functions, Composition, and Invertible Functions cover all difficulty levels tested in CBSE exams. After completing them, try the examples again without looking at the solutions, attempt the NCERT Exemplar questions for Chapter 1, and solve at least one previous-year board paper to consolidate your understanding.

Keyword

AI Tutor
Mathematics Class 12 — Part I
Ready
Hi! 👋 I'm Gaura, your AI Tutor for Types of Functions, Composition, and Invertible Functions. Take your time studying the lesson — whenever you have a doubt, just ask me! I'm here to help.