PYQ Vault

CBSE Class 12 Maths · Relations and Functions

One-One, Onto and Bijective Functions

One-one (injective), onto (surjective) and bijective functions: the standard proofs, using the range to decide onto, functions on natural numbers and integers, and functions between two finite sets.

Why this matters

75 questions, forty-three of them from board papers in every year from 2023 to 2026, more than any other page of the chapter. The board asks you to show that a function is one-one and onto, very often a rational function such as (x − 2)/(x − 3), set in 2024, 2025 and twice in 2026 and also in NCERT Exercise 1.2; to show a quadratic or other function is not one-one or not onto and find its range or the codomain that makes it onto (2023, 2024, 2026); MCQs and assertion-reason items on functions on N and Z (2024 to 2026); and case studies on functions between two small sets (2023, 2025, 2026). The function 4x² + 4x − 5 from [0, ∞) to [−5, ∞) was set in 2023 and again in 2026.

Concept 1 of 4: Proving that a function is one-one and onto

One-one means no two inputs share an output, so you start from two equal outputs and show the inputs were equal. Onto means every element of the codomain is reached, so you take any y, solve for the x that would give it, and check that this x is really allowed in the domain. Both together make the function bijective.

Definition

  • One-one (injective): f:X→Yf : X \to Y is one-one if f(x1)=f(x2)f(x_1) = f(x_2) implies x1=x2x_1 = x_2 for every x1,x2∈Xx_1, x_2 \in X. Otherwise f is many-one.
  • Onto (surjective): for every y∈Yy \in Y there is an x∈Xx \in X with f(x)=yf(x) = y. f is onto exactly when the range of f is Y.
  • Bijective: both one-one and onto.
  • One-one proof: start from f(x1)=f(x2)f(x_1) = f(x_2) and simplify to x1=x2x_1 = x_2.
  • Onto proof: take any y in the codomain, solve y=f(x)y = f(x) for x, show this x lies in the domain (for a rational function, that it is not the excluded value), and check f(x)=yf(x) = y.
  • Not one-one: two different inputs with the same image. Not onto: one element of the codomain with no pre-image.

One-one and onto

f(x1)=f(x2)⇒x1=x2;∀ y∈Y ∃ x∈X:f(x)=yf(x_1) = f(x_2) \Rightarrow x_1 = x_2; \qquad \forall\, y \in Y\ \exists\, x \in X : f(x) = y

Worked example

Show that f:R−{2}→R−{1}f : \mathbb{R} - \{2\} \to \mathbb{R} - \{1\}, f(x)=x+1x−2f(x) = \dfrac{x + 1}{x - 2}, is one-one and onto.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2026 · 65/1/1 · 32 (b)Hard

Example 1 · Relations and Functions · One-One and Onto Functions

A function f:R−{35}⟶R−{35}f : R - \left\{ \frac{3}{5} \right\} \longrightarrow R - \left\{ \frac{3}{5} \right\} is defined as f(x)=3x+25x−3f(x) = \frac{3x + 2}{5x - 3}. Show that f is one-one and onto.

Not checking that the pre-image lies in the domain

For a rational function, show that the x you found is not the excluded value. For a domain like [0,∞)[0, \infty), show that x is not negative. Without this the onto proof is incomplete.

Calling f onto because f(x) is real

Showing that every image lies in the codomain is true of every function. Onto needs the reverse: a pre-image for each y.

Ignoring the codomain

The same rule can be onto with one codomain and not with another. x−2x−3\dfrac{x - 2}{x - 3} on R−{3}\mathbb{R} - \{3\} is onto R−{1}\mathbb{R} - \{1\} but not onto R\mathbb{R}, because 1 is never taken.

Concept 2 of 4: The range decides onto: quadratic and bounded functions

A function is onto when its range fills the whole codomain. A parabola opening upwards has a lowest value, so it never reaches the numbers below it, and it takes each higher value twice, once on each side of its axis. Cut the domain down to one side of the axis and it becomes one-one; choose the codomain to be the range and it becomes onto.

Definition

  • f is onto if and only if the range of f equals the codomain.
  • To find the range, put y=f(x)y = f(x), solve for x, and see which y give an x inside the domain. Completing the square gives the least or greatest value of a quadratic.
  • A quadratic ax2+bx+cax^2 + bx + c on R\mathbb{R} is not one-one (equal values on both sides of the axis x=−b2ax = -\frac{b}{2a}) and not onto R\mathbb{R}.
  • On a domain lying on one side of the axis, such as [0,∞)[0, \infty) when the axis is at a negative x, the quadratic is one-one.
  • Functions like x2x^2, ∣x∣|x|, x4x^4 and 16−x2\sqrt{16 - x^2} are even, f(−x)=f(x)f(-x) = f(x), so they are not one-one on a domain that contains −x-x and xx.
  • To find the codomain A that makes f:X→Af : X \to A onto, take A equal to the range.

Onto test with the range

f:X→Y is onto exactly when Range of f=Yf : X \to Y \text{ is onto} \text{ exactly when } \text{Range of } f = Y

Worked example

Show that f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x2−6x+10f(x) = x^2 - 6x + 10, is neither one-one nor onto. Find all x with f(x)=5f(x) = 5, and the set A for which f:R→Af : \mathbb{R} \to A is onto.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2024 · 65/2/3 · 33 (a)Hard

Example 2 · Relations and Functions · One-One and Onto Functions

Show that a function f:R→Rf : R \to R defined as f(x)=x2+x+1f(x) = x^2 + x + 1 is neither one-one nor onto. Also, find all the values of x for which f(x)=3f(x) = 3.

An open bracket at a value that is taken

If the least value is reached, the range starts with a square bracket: [1,∞)[1, \infty), not (1,∞)(1, \infty). MCQ options are built on this slip.

Keeping a root outside the domain

When you solve f(x)=kf(x) = k on [0,∞)[0, \infty), reject a negative root and say why. It is not a value of the function there.

Showing not one-one by algebra alone

Factorising to (x1−x2)(…)=0(x_1 - x_2)(\ldots) = 0 only suggests it. Finish with two actual different inputs that give the same image.

Concept 3 of 4: Functions on N and Z, and functions defined in pieces

On natural numbers or integers, onto usually fails for a simple reason: the x you solve for is a fraction, or 0, or negative, and so is not in the domain. One-one can also change with the domain: x2x^2 is one-one on N but not on Z, where −1-1 and 11 give the same square. A rule given in pieces (one for odd, one for even) is tested case by case.

Definition

  • In this chapter N={1,2,3,…}\mathbf{N} = \{1, 2, 3, \ldots\} (no 0) and W={0,1,2,…}\mathbf{W} = \{0, 1, 2, \ldots\}.
  • Not onto on N or Z: find a y in the codomain whose solved x is not a natural number or integer. For f(x)=2xf(x) = 2x on N, 1 has no pre-image.
  • One-one depends on the domain: x2x^2 is one-one on N (since x+y>0x + y > 0) but not on Z.
  • Piecewise rule (odd and even): for one-one, check both odd, both even, and one of each, and rule out the mixed case. For onto, give the pre-image of an odd y and of an even y separately.
  • A piecewise function can be onto without being one-one, if it sends many inputs to one value.

Worked example

Show that f:Z→Zf : \mathbb{Z} \to \mathbb{Z}, f(x)={x+2,x evenx−2,x oddf(x) = \begin{cases} x + 2, & x \text{ even} \\ x - 2, & x \text{ odd} \end{cases}, is a bijection.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2025 · 65/2/2 · Q27Moderate

Example 3 · Relations and Functions · One-One and Onto Functions

Prove that f:N→Nf : N \rightarrow N defined as f(x)=ax+bf(x) = ax + b (a,b∈N)(a, b \in N) is one-one but not onto.

Taking 0 as a natural number

Here N starts at 1. A pre-image of 0 does not count, and f:N→Wf : \mathbf{N} \to \mathbf{W} is a different question from f:N→Nf : \mathbf{N} \to \mathbf{N}.

Solving for x and stopping

After x=y−bax = \dfrac{y - b}{a}, check whether it is a natural number or an integer. Name one y for which it is not, and that settles 'not onto'.

Forgetting the mixed case

For an odd and even rule, the one-one proof must rule out one odd and one even input with the same image. Skipping it loses a step mark.

Concept 4 of 4: Functions between finite sets: checking and counting

When both sets are small, you can see everything. Each element of the domain picks exactly one image. One-one means no two pick the same image, so there must be enough images to go round; onto means every element of the codomain gets picked, so there must be enough elements picking. Counting functions is counting these choices.

Definition

  • A set of pairs is a function from A to B when every element of A appears exactly once as a first entry.
  • One-one: no second entry is repeated. Onto: every element of B appears as a second entry.
  • If n(A)=mn(A) = m and n(B)=nn(B) = n: each element of A has n choices, so there are nmn^m functions from A to B.
  • A one-one function from A to B exists only if m≤nm \le n; an onto function only if m≥nm \ge n; a bijection only if m=nm = n.
  • The number of one-one functions from {1,2,3}\{1, 2, 3\} to itself is 3!=63! = 6; the number of onto functions from {1,2,…,n}\{1, 2, \ldots, n\} to itself is n!n!.
  • For a finite set X, a function f:X→Xf : X \to X is one-one if and only if it is onto. This is not true for an infinite set.
  • Onto functions from a set of m elements to a set of 2 elements: all 2m2^m functions except the 2 constant ones, so 2m−22^m - 2.

Number of functions from A to B

n(A)=m, n(B)=n  ⇒  number of functions=nmn(A) = m,\ n(B) = n \;\Rightarrow\; \text{number of functions} = n^{m}

Worked example

Let A={a1,a2,a3}A = \{a_1, a_2, a_3\} and B={b1,b2,b3,b4}B = \{b_1, b_2, b_3, b_4\}. (i) How many functions are there from A to B? (ii) How many of them are one-one? (iii) Is any function from A to B onto? (iv) Is f={(a1,b2),(a2,b4),(a3,b1)}f = \{(a_1, b_2), (a_2, b_4), (a_3, b_1)\} one-one? onto?
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2025 · 65/2/1 · 36 (ii)Moderate

Example 4 · Relations and Functions · One-One and Onto Functions

A school is organizing a debate competition with participants as speakers S={S1,S2,S3,S4}S = \{S_1, S_2, S_3, S_4\} and these are judged by judges J={J1,J2,J3}J = \{J_1, J_2, J_3\}. Each speaker can be assigned one judge. Let R be a relation from set S to J defined as R={(x,y):speaker x is judged by judge y, x∈S, y∈J}R = \{(x, y) : \text{speaker } x \text{ is judged by judge } y,\ x \in S,\ y \in J\}. Based on the above, answer the following :
A student identifies a function from S to J as f={(S1,J1),(S2,J2),(S3,J2),(S4,J3)}f = \{(S_1, J_1), (S_2, J_2), (S_3, J_2), (S_4, J_3)\} Check if it is bijective.

Mixing up the two counts

Functions from A to B number nmn^m: the size of B raised to the size of A. Relations number 2mn2^{mn}. Writing mnm^n is the usual slip.

Claiming onto when the sizes forbid it

A set of 3 elements can never map onto a set of 4. Say so by counting the images; no listing is needed.

Asking 'one-one?' of something that is not a function

If one element of the domain has two images, the set of pairs is not a function at all. Say that first; one-one and onto do not arise.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (3)

  • Proving that a function is one-one and onto

    One-one and onto

    f(x1)=f(x2)⇒x1=x2;∀ y∈Y ∃ x∈X:f(x)=yf(x_1) = f(x_2) \Rightarrow x_1 = x_2; \qquad \forall\, y \in Y\ \exists\, x \in X : f(x) = y
  • The range decides onto: quadratic and bounded functions

    Onto test with the range

    f:X→Y is onto exactly when Range of f=Yf : X \to Y \text{ is onto} \text{ exactly when } \text{Range of } f = Y
  • Functions between finite sets: checking and counting

    Number of functions from A to B

    n(A)=m, n(B)=n  ⇒  number of functions=nmn(A) = m,\ n(B) = n \;\Rightarrow\; \text{number of functions} = n^{m}

Watch out for (12)

Test yourself on Relations and Functions

15 past CBSE Class 12 questions from this chapter, timed at 23 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.