One-One and Onto Functions: Injective, Surjective and Bijective (Class 12)
Updated 15 October 2026 · Fact-checked
A function f: A → B is one-one if different inputs always give different outputs, that is f(a) = f(b) forces a = b. It is onto if every element of B is an output, that is f(x) = y can be solved in A for each y in B. A function that is both is called bijective.
Understand One-One and Onto Functions
A function assigns to each element of the domain exactly one element of the codomain . The set of outputs actually reached is the range, which is a subset of . Two properties decide how well matches the two sets.
One-one (injective). is one-one if no two different inputs share an output: . The standard proof starts with and simplifies to . To disprove it, give two different inputs with the same output, such as for on . A graph test: a function on an interval is one-one when every horizontal line meets the graph at most once; a strictly increasing or strictly decreasing function is always one-one.
Onto (surjective). is onto if every has a pre-image: range codomain. The standard proof takes an arbitrary , solves for , and then checks two things: the found belongs to the domain , and really equals . To disprove it, name one in the codomain with no pre-image, for example for .
Bijective means one-one and onto together: a perfect pairing of with .
The domain and codomain matter as much as the formula. is neither one-one nor onto from to , one-one but not onto from to , and bijective from to . Always read the sets first.
Rational functions such as are a board favourite. The domain excludes the zero of the denominator, and the codomain usually excludes one value, the one the function never reaches. You find that value while solving : the expression for has its own denominator, here , so is never reached and the codomain must be for to be onto.
Finite sets. If and : there are functions; one-one functions exist only when , and there are of them; onto functions need ; and when , a function is one-one exactly when it is onto, giving bijections. These counts come up in 1-mark MCQs.
Composition of functions and invertible functions were removed from the syllabus, so 2026-27 questions stop at showing one-one, onto or bijective (NCERT Section 1.3).
One-One and Onto Functions: formulas to remember
- One-one (injective)
- Equivalently, .
- Onto (surjective)
- Range of f = codomain B.
- Bijective
- A perfect pairing of domain and codomain.
- Number of functions
- Each of the m inputs has n choices.
- Number of one-one functions
- Zero when .
- Bijections of an n-element set onto an n-element set
- On equal finite sets, one-one onto.
- Onto functions to a 2-element set
- All functions minus the two constant functions.
How to solve One-One and Onto Functions questions
Use this routine for 'Show that f is one-one and onto' or 'Check whether f is one-one, onto or bijective'.
- 1Write the domain and codomain clearly. Note any excluded values, such as , and whether the sets are , or .
- 2One-one: let be in the domain with . Cross-multiply or simplify until you reach . If you reach something like , look for a counter-example such as .
- 3Onto: take an arbitrary in the codomain and solve for .
- 4Check that the you found lies in the domain: it must be a natural number if the domain is , and it must avoid any excluded value.
- 5Verify by substitution that ; one line is enough.
- 6If onto fails, name a specific in the codomain with no pre-image, and say why (for example, the found is negative or a fraction).
- 7Conclude with the precise word: one-one, onto, both (bijective) or neither.
One-One and Onto Functions in real life
Each concept, met in an everyday situation. Read the situation, try the problem, then check the solution. The one-line hook is what to remember.
One-one and onto on finite sets
Suppose a school gives each of its 30 students in Class 12-A a locker from a row of 30 lockers, and no locker is shared. Let assign each student their locker.
Is one-one? Is it onto? What changes if the school has 35 lockers, or if two students are made to share a locker?
Try it first, then show the solutionSolution
- No locker is shared, so different students get different lockers: is one-one.
- 30 students occupy 30 different lockers, so all 30 lockers are used: is onto. Hence is a bijection.
- With 35 lockers, is still one-one but 5 lockers are empty, so is not onto.
- If two students share a locker, is not one-one; with 30 lockers, at most 29 lockers are then used, so is not onto either.
Answer: With 30 lockers and no sharing, is bijective. With 35 lockers, one-one but not onto. With sharing among 30 lockers, neither one-one nor onto.
Memory hook: Lockers: no sharing means one-one; no empty locker means onto.
Range versus codomain
Imagine a parking lot that charges Rs 40 plus Rs 15 per hour, for 1 to 8 hours. Let be the fee for hours, with .
Is one-one? Can a driver pay exactly Rs 100? Rs 120? Is onto , and how can the codomain be changed to make a bijection?
Try it first, then show the solutionSolution
- , so is one-one.
- Rs 100: , so a 4-hour stay costs Rs 100.
- Rs 120: , not a whole number of hours, so no stay costs exactly Rs 120.
- So 120 has no pre-image and is not onto . The range is ; taking this range as the codomain makes a bijection.
Answer: One-one; Rs 100 for 4 hours; Rs 120 is impossible; not onto ; bijective onto .
Memory hook: Onto asks 'can every price on the list actually be paid?'
Tricks to remember One-One and Onto Functions
Short memory aids. Say each one aloud once, then use it on a question the same day.
One-one: equal outputs force equal inputs
Start from , end at . The proof always runs in this direction.
Use it when: The first half of every bijectivity proof.
Onto: solve, then check the domain
Solve for , then ask 'Is this allowed?' Most onto proofs fail at that check.
Use it when: Functions on or , and rational functions with an excluded value.
Squares and modulus break one-one
If the formula has , or an even power and the domain contains both and , try first.
Use it when: Quick counter-examples in MCQs.
The forbidden y
For , the value is never reached. The codomain must leave it out for to be onto.
Use it when: Rational-function questions such as .
One-One and Onto Functions: solved examples
Ordered from board level to HOTS. Try each one before you open the solution.
Example 1: One-one but not onto on the natural numbers · 2 marks · Very short answerBoard level
Show that given by is one-one but not onto.
Try it first, then show the solutionSolution
- One-one: . (1 mark)
- Onto: take . Then , so 2 has no pre-image and is not onto. (1 mark)
Answer: is one-one but not onto; for example, 2 is not an image (the range is the odd numbers from 3 onwards).
Example 2: A function that swaps neighbours · 3 marks · Short answerBoard level
Let be defined by if is odd and if is even. Show that is bijective.
Try it first, then show the solutionSolution
- Note that sends odd numbers to even numbers and even numbers to odd numbers: , , , , and so on. (½ mark)
- One-one: if , then and have the same parity (an even output comes only from an odd input and vice versa). Both odd: ; both even: . Either way . (1 mark)
- Onto: take . If is even, is odd and (note ). If is odd, is even and . (1 mark)
- So every has a pre-image, and is one-one and onto, that is, bijective. (½ mark)
Answer: is bijective; it swaps and for every .
Example 3: The function x|x| · 3 marks · Short answerHarder board level
Show that defined by is a bijection.
Try it first, then show the solutionSolution
- Write for and for . So has the same sign as . (½ mark)
- One-one: let . The outputs have equal signs, so are both non-negative or both negative. If both , gives . If both negative, gives (both negative). (1 mark)
- Onto: for , take ; then . For , take ; then . (1 mark)
- Hence is one-one and onto. (½ mark)
Answer: is a bijection on .
Example 4: Rational function with excluded values · 5 marks · Long answerHarder board level
Let and . Show that defined by is one-one and onto.
Try it first, then show the solutionSolution
- One-one: . (1 mark)
- Expanding: . So is one-one. (1 mark)
- Onto: let . Then , defined since . (1 mark)
- This is in A: if then , which is impossible, so . (1 mark)
- Check: . So is onto, and hence bijective. (1 mark)
Answer: is one-one and onto (bijective); the pre-image of is .
Example 5: Neither one-one nor onto · 3 marks · Short answerHOTS / competency
Show that defined by is neither one-one nor onto. Find its range.
Try it first, then show the solutionSolution
- Not one-one: and , but . (1 mark)
- Range: . For , a real exists only if the discriminant , that is ; comes from . (1 mark)
- So the range is ; for example, has no pre-image. Hence is not onto. (1 mark)
Answer: Not one-one (), not onto; range .
Example 6: Case study: counting maps between finite sets · 4 marks · Case-basedHOTS / competency
Suppose a quiz organiser must assign 3 judges to rooms. Each judge goes to exactly one room.
(i) If there are 4 rooms, how many assignments are possible in all? (1 mark)
(ii) With 4 rooms, how many assignments put the judges in different rooms (one-one functions)? (1 mark)
(iii) If there are only 2 rooms, how many assignments leave no room empty (onto functions)? (1 mark)
(iv) With 4 rooms, can an assignment be onto? Give a reason. (1 mark)
Try it first, then show the solutionSolution
- (i) Each judge has 4 choices: . (1 mark)
- (ii) Different rooms: . (1 mark)
- (iii) All functions to 2 rooms: ; remove the 2 that put everyone in one room: . (1 mark)
- (iv) No: 3 judges can fill at most 3 of the 4 rooms, so at least one room stays empty. (1 mark)
Answer: (i) 64 (ii) 24 (iii) 6 (iv) No; a 3-element set cannot map onto a 4-element set.
Where students lose marks in One-One and Onto Functions
The slips examiners see most often, and what to write instead.
Mistake: Not checking that the pre-image lies in the domain
Solving always gives some formula; the question is whether it is a natural number or avoids the excluded value.
Wrong working
, : , so is onto.
Right working
For , , so is not onto.
Do this: After solving, add a line: 'This belongs to A because ...' or give a counter-example.
Usually costs: The onto marks (1 to 2 marks).
Mistake: Stopping at
On this gives , so the function may not be one-one.
Wrong working
on : , so one-one.
Right working
with , so is not one-one on .
Do this: Whenever squares appear, check whether is in the domain.
Usually costs: The one-one part and the final conclusion.
Mistake: Forgetting to verify f(x) = y after solving
Squaring or cross-multiplying while solving can introduce values that do not work.
Wrong working
. Hence onto.
Right working
, and . Hence onto.
Do this: Add the one-line substitution check; the marking scheme often gives a mark for it.
Usually costs: Half to one mark.
Mistake: Confusing range and codomain
Onto compares the range with the codomain stated in the question, not with in general.
Wrong working
, is not onto because has no pre-image.
Right working
is not in the codomain . Every equals , so is onto (though not one-one).
Do this: Pick counter-examples only from the stated codomain.
Usually costs: The onto part.
Exam tips
- Rational functions between sets like and are a common 3- or 5-mark question; show both the domain check and the substitution check.
- Write 'Let such that ' as your first line for one-one; it signals the method to the examiner.
- When the domain is , outputs and pre-images must be natural numbers; fractions and 0 are the usual counter-examples.
- For piecewise functions, check one-one within each piece and across the pieces (the pieces may share outputs).
- In counting MCQs, decide first whether one-one or onto is even possible from the sizes: one-one needs ; onto needs .
Practice questions on One-One and Onto Functions
Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.
Q1 · 1 mark · MCQBoard level
The function , , is:
(a) one-one and onto
(b) one-one but not onto
(c) onto but not one-one
(d) neither one-one nor ontoHint
Is 2 the cube of an integer?
Answer
(b). Different integers have different cubes, so is one-one; but 2 is not the cube of any integer, so is not onto.
Q2 · 1 mark · MCQBoard level
The number of bijective functions from to itself is:
(a) 3
(b) 6
(c) 9
(d) 27Hint
On equal finite sets, one-one functions are bijections.
Answer
(b) .
Q3 · 2 marks · Very short answerBoard level
Show that defined by is bijective.
Hint
For onto, solve .
Answer
One-one: . Onto: for , and . Hence bijective.
Q4 · 3 marks · Short answerHarder board level
Check whether , , is one-one or onto.
Hint
Complete the square: .
Answer
Not one-one: . Not onto: , so, for example, has no pre-image. The range is .
Q5 · 1 mark · Assertion-reasonHarder board level
Assertion (A): , , is one-one.
Reason (R): If and , then , since both are positive.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.Hint
gives . Which sign survives on ?
Answer
(a). , and is impossible for natural numbers, so ; R is exactly the proof of A.
Q6 · 5 marks · Long answerHarder board level
Let and . Show that , , is one-one and onto.
Hint
For onto, solve for and show the result is never .
Answer
One-one: . Onto: , defined for . If then , impossible, so . Check: . Hence bijective.
Q7 · 4 marks · Case-basedHOTS / competency
Case study: Suppose 4 students must each join one of 3 project groups P, Q and R.
(i) Can the assignment be one-one? Why? (1 mark)
(ii) How many assignments are possible? (1 mark)
(iii) How many assignments leave no group empty? (2 marks)Hint
For (iii), subtract the assignments that miss at least one group, then add back those you removed twice.
Answer
(i) No: 4 students and only 3 groups, so two students must share a group. (ii) . (iii) Assignments missing a given group: , for 3 groups: 48; those using a single group were removed twice, so add back 3. Onto assignments .
Test your recall
Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.
1.State the condition for to be one-one.Show answer
for all .
2.When is a function onto?Show answer
When its range equals its codomain: every is for some .
3.Is one-one from to ?Show answer
Yes (but not onto, since 2 is not a square).
4.How many one-one functions are there from a 3-element set to a 5-element set?Show answer
.
5.Which value is never taken by ?Show answer
(the ratio of the -coefficients).
6.How many onto functions are there from a 4-element set to a 2-element set?Show answer
.
One-One and Onto Functions: frequently asked questions
What is the difference between one-one and onto?
One-one is about the inputs: no two different inputs share an output. Onto is about the codomain: every element of the codomain is reached. A function can have either property without the other, both (bijective) or neither.
Can a function be onto but not one-one?
Yes. For example, f(x) = x² from the real numbers to [0, ∞) reaches every non-negative number but sends 2 and −2 to the same output 4.
Do I need to know inverse functions and composition for 2026-27?
No. Composition of functions and invertible functions are not in the 2026-27 CBSE syllabus. Questions ask you to show that a function is one-one, onto or bijective.
Which NCERT section covers one-one and onto functions?
Section 1.3, Types of Functions, in Chapter 1 of NCERT Mathematics Part I for Class 12.
How do I show a function is not one-one?
Give two specific different inputs with the same output, for example f(2) = f(−2) = 4 for f(x) = x². One counter-example is enough.