One-One and Onto Functions – Types of Functions in Class 12 Maths Explained
Once you have understood what a function is, the next question naturally is: what kind of function is it? Class 12 Maths Chapter 1 introduces three critical types — one-one (injective), onto (surjective), and bijective — that describe how a function maps its domain to its co-domain.
These distinctions matter enormously in higher mathematics and appear consistently in CBSE board exams and competitive entrance tests like CUET and IPMAT.
What Is a One-One (Injective) Function?
A function f : X → Y is called one-one (or injective) if distinct inputs always produce distinct outputs.
Formally:
f(x₁) = f(x₂) ⟹ x₁ = x₂, for all x₁, x₂ ∈ X
Equivalently, if x₁ ≠ x₂, then f(x₁) ≠ f(x₂). No two different elements of the domain can share the same image in the co-domain.
A function that is not one-one is called many-one — two or more inputs map to the same output.
Checking Injectivity: The Algebraic Method
Step 1: Assume f(x₁) = f(x₂).
Step 2: Use algebra to deduce whether x₁ = x₂ must follow.
Step 3: If it must, the function is one-one; if you can find a counterexample, it is many-one.
Examples
One-one: f : N → N defined by f(x) = 2x.
Suppose f(x₁) = f(x₂). Then 2x₁ = 2x₂, so x₁ = x₂. ✓ Injective.
Many-one: f : R → R defined by f(x) = x².
f(−1) = f(1) = 1, but −1 ≠ 1. ✗ Not injective.
What Is an Onto (Surjective) Function?
A function f : X → Y is called onto (or surjective) if every element of the co-domain Y is the image of at least one element of X.
Formally:
For every y ∈ Y, there exists x ∈ X such that f(x) = y.
In other words, the range of the function equals the entire co-domain. If even one element of Y has no pre-image in X, the function is not onto (into).
Checking Surjectivity: The Algebraic Method
Step 1: Take an arbitrary y in the co-domain Y.
Step 2: Solve f(x) = y for x in terms of y.
Step 3: Check whether the resulting x actually belongs to the domain X.
Examples
Onto: f : R → R defined by f(x) = 2x.
For any y ∈ R, choose x = y/2 ∈ R. Then f(y/2) = y. ✓ Surjective.
Not onto: f : N → N defined by f(x) = 2x.
The element 1 ∈ N (co-domain) has no pre-image: 2x = 1 gives x = 1/2 ∉ N. ✗ Not surjective.

One-One and Onto Functions – Types of Functions in Class 12 Maths Explained
One-One vs Onto: A Key Observation
The function f(x) = 2x illustrates that injectivity and surjectivity depend on the domain and co-domain, not just the rule.
| Domain & Co-domain | One-One? | Onto? |
|---|---|---|
| f : N → N, f(x) = 2x | Yes | No |
| f : R → R, f(x) = 2x | Yes | Yes |
| f : R → R, f(x) = x² | No | No |
| f : N → N, f(1)=f(2)=1, f(x)=x−1 for x>2 | No | Yes |
This table makes an important NCERT point visible: for infinite sets, a function can be injective without being surjective, and vice versa.
An Important Property for Finite Sets
For finite sets, the situation is more symmetric. If f : X → X is a function from a finite set to itself, then:
- f is one-one if and only if f is onto.
This means that on a finite domain, you only need to verify one of the two properties — the other follows automatically. This is not true for infinite sets, as the examples above show.
Solved Example from NCERT
Question: Let A be the set of 50 students in a class. Define f : A → N by f(x) = roll number of student x. Is f one-one? Is it onto?
One-one: No two students share a roll number. So f is one-one. ✓
Onto: Roll numbers run from 1 to 50. The natural number 51 ∈ N has no pre-image. So f is not onto. ✗
This simple example reinforces why understanding the co-domain is essential when classifying functions.
What is the difference between one-one and onto functions?
A one-one function ensures distinct inputs give distinct outputs. An onto function ensures every element of the co-domain has at least one pre-image in the domain.
Can a function be one-one but not onto?
Yes. f : N → N defined by f(x) = 2x is one-one (distinct inputs give distinct outputs) but not onto (odd numbers have no pre-image).
What is a many-one function?
A function is many-one if two or more distinct inputs produce the same output. For example, f(x) = x² is many-one since f(−2) = f(2) = 4.
How do you prove a function is not onto?
Find a single element in the co-domain that has no pre-image. For f : N → N, f(x) = 2x, the element 1 has no pre-image, so f is not onto.
Is f : R → R, f(x) = x³ one-one and onto?
Yes. It is one-one (f(x₁) = f(x₂) implies x₁³ = x₂³ implies x₁ = x₂) and onto (every real number has a real cube root). So it is bijective.
Related Reading on ChampionsPrep
- Introduction to Relations and Functions →
- Types of Relations: Reflexive, Symmetric & Transitive →
- Bijective and Invertible Functions →
- Composition of Functions →
🎯 Can You Classify These Functions?
Put your knowledge to work with curated practice questions on one-one and onto functions — with step-by-step solutions — on ChampionsPrep.
Practice Function Classification on ChampionsPrep →
Test Your Knowledge
Interactive Invertibility & Bijection Simulator
Adjust slope 'a' of function f(x) = ax + b. A non-zero slope guarantees bijection and an inverse, while slope a = 0 makes f(x) constant (many-one, not onto) and destroys the inverse.
Function f(x) = ax + b
Function g(x) = cx + d
Compositions
Syllabus Checkpoints & Exam Watch-Outs
- When slope a = 0, f(x) becomes a horizontal constant function. It maps all x to the same value (many-one) and never covers the co-domain (not onto); therefore, its inverse does not exist.
Frequently Asked Questions
What is the difference between one-one and onto functions? +
A one-one function ensures distinct inputs give distinct outputs. An onto function ensures every element of the co-domain has at least one pre-image in the domain.
Can a function be one-one but not onto? +
Yes. f : N → N defined by f(x) = 2x is one-one but not onto, since odd numbers like 1 have no pre-image.
What is a many-one function? +
A function is many-one if two or more distinct inputs produce the same output. For example, f(x) = x² is many-one since f(−2) = f(2) = 4.
How do you prove a function is not onto? +
Find a single element in the co-domain that has no pre-image in the domain. For f : N → N, f(x) = 2x, the element 1 has no pre-image, proving it is not onto.
Is f : R → R, f(x) = x³ one-one and onto? +
Yes. f(x) = x³ is one-one (cube root is unique for real numbers) and onto (every real number has a real cube root), so it is bijective.
Keep practising Mathematics
AI-powered feedback and structured revision for Mathematics — free to start, at your own pace.
AI-powered practice — free to start