Types of Functions

The definitions

A function ff is one-one (injective) if different inputs always give different outputs, and onto (surjective) if every element of the codomain is hit. A function that is both is bijective, which is exactly the condition for it to be invertible.

Worked example: checking one-one and onto

Let f:N→Nf: \mathbb{N} \to \mathbb{N} with f(n)=n+12f(n) = \dfrac{n+1}{2} for odd nn and n2\dfrac{n}{2} for even nn. Since f(1)=f(2)=1f(1) = f(2) = 1, ff is not one-one. For any mm, f(2m)=mf(2m) = m, so ff is onto.

Worked example: restricting the domain

f(x)=x2f(x) = x^2 on R\mathbb{R} is not one-one, because f(−3)=f(3)=9f(-3) = f(3) = 9. Restricted to [0,∞)[0, \infty), different inputs give different squares, so it is one-one, and as a map onto [0,∞)[0, \infty) it is bijective, with inverse x\sqrt{x}.

Worked example: finding an inverse

For f:N→Sf: \mathbb{N} \to S, f(x)=4x2+12x+15f(x) = 4x^2+12x+15 with SS the range, complete the square: f(x)=4(x+32)2+6f(x) = 4\left(x+\tfrac{3}{2}\right)^2 + 6. Since x+32>0x + \tfrac{3}{2} > 0 on N\mathbb{N}, solving is reversible:

x=y−6−32,f−1(y)=y−6−32x = \dfrac{\sqrt{y-6}-3}{2}, \qquad f^{-1}(y) = \dfrac{\sqrt{y-6}-3}{2}

Check: f(5)=100+60+15=175f(5) = 100 + 60 + 15 = 175, and 169−32=13−32=5\dfrac{\sqrt{169}-3}{2} = \dfrac{13-3}{2} = 5.

Worked example: a reflection is an inverse

For f(x)=(x+1)2f(x) = (x+1)^2 with x≥−1x \ge -1, the reflection of its graph in y=xy = x is the inverse: y=(x+1)2⇒x=y−1y = (x+1)^2 \Rightarrow x = \sqrt{y} - 1, so g(x)=x−1g(x) = \sqrt{x} - 1.

Counting functions between finite sets

From a set of 3 elements to a set of 4, each input has 4 choices, so there are 43=644^3 = 64 functions, of which 4×3×2=244 \times 3 \times 2 = 24 are one-one. From a 4-element set onto a 3-element set, inclusion and exclusion gives 34−3⋅24+3⋅14=81−48+3=363^4 - 3 \cdot 2^4 + 3 \cdot 1^4 = 81 - 48 + 3 = 36 onto functions.

Worked example: a linear function

Show that f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=3x−5f(x) = 3x - 5 is bijective and find its inverse.

Solution: If 3a−5=3b−53a - 5 = 3b - 5 then a=ba = b, so ff is one-one. For any real yy, x=y+53x = \dfrac{y+5}{3} is real and f(x)=yf(x) = y, so ff is onto. Hence f−1(y)=y+53f^{-1}(y) = \dfrac{y+5}{3}. The same argument works for any f(x)=ax+bf(x) = ax + b with a≠0a \ne 0.

Common mistakes

  • Ignoring the codomain. Whether ff is onto depends on the stated codomain, not just the formula.
  • Inverting a function that isn't one-one. Restrict the domain first.
  • Taking both square roots when inverting. The domain decides which sign is correct.

Where this comes up in exams

The 2025-26 CBSE Class XII syllabus lists one to one and onto functions. JEE Main 2026 lists one-one, into and onto functions and the composition of functions, and JEE Advanced 2026 lists invertible functions and into, onto and one-to-one functions.

Checked against CBSE Mathematics curriculum, Classes XI-XII (2025-26), JEE (Main) 2026 syllabus (NTA) and JEE (Advanced) 2026 syllabus. Syllabi can change from year to year, so confirm with the latest official notification for your exam.

Continue learning

Composition is the next step once inverses are clear, and relations sit underneath functions.