Skip to content
MathsISC Class 12 · Relations and Functions

One-One and Onto Functions: ISC Class 12 Proofs and Examples

Updated 15 October 2026 · Fact-checked

A function f: A → B is one-one if different inputs always give different outputs, so f(x₁) = f(x₂) forces x₁ = x₂. It is onto if every element of B is an output of some element of A. A function that is both is bijective, and only bijective functions have inverses.

Check two things: does any element of B get used twice (not one-one), and is any element of B left unused (not onto)? Both fine means bijective.

Illustration drawn for QuestionBuddy.

Understand One-One and Onto Functions

A function assigns to every element of the domain exactly one image in the co-domain . Two separate questions can then be asked about it, and the ISC paper asks both.

One-one (injective). Does any image get used twice? is one-one when distinct elements of always have distinct images: . In proofs we use the equivalent form , because it starts from an equation we can simplify. A function that is not one-one is many-one: at least two inputs share an image. To show this, one counter-example is enough, such as with .

Onto (surjective). Is any element of left unused? is onto when its range equals its co-domain: for every there is some with . To prove it, take an arbitrary in , solve for , and then check two things: the you found exists and lies in , and it really gives . A function that is not onto is into: some element of has no pre-image.

Bijective. A function that is both one-one and onto pairs the elements of and perfectly. Only such functions are invertible, which is why the ISC question on finding always gives a function that is already bijective, and why the co-domain is chosen carefully (for example for ).

The co-domain matters. The same rule can be onto for one co-domain and into for another. from to is neither one-one nor onto, but from to it is a bijection. Always read the domain and co-domain before you start.

Graph test. A horizontal line drawn anywhere in the co-domain should cut the graph of a one-one function at most once, and the graph of an onto function at least once. Strictly increasing or strictly decreasing functions on an interval are one-one. This is a quick check, not a substitute for the algebraic proof in a 2- or 3-mark answer.

Finite sets. If has elements and has elements, there are functions from to . One-one functions exist only when , and there are of them. Onto functions exist only when . If , a function from to is one-one exactly when it is onto, and there are bijections.

One-One and Onto Functions: formulas to remember

One-one test
Start from equal images and reach equal inputs; every step must be reversible or valid in the domain.
Many-one disproof
One concrete pair of numbers is a complete answer.
Onto test
Solve for x in terms of y, then show x lies in the domain.
Onto in terms of range
If the range is a proper subset of the co-domain, f is into.
Number of functions
Each of the m elements chooses any of n images.
Number of one-one functions
The first element has n choices, the next n - 1, and so on.
Bijections between equal sets
For finite sets of equal size, one-one and onto are equivalent.

How to solve One-One and Onto Functions questions

This method covers the standard ISC question "Show that f is one-one and onto" and its variants (many-one, into, bijective).

  1. 1Write the domain and co-domain exactly as given. Note any excluded values, such as .
  2. 2One-one: let be in the domain with . Simplify (cross-multiply, cancel, take the positive root if the domain allows) until you reach . Conclude "Hence is one-one."
  3. 3If the simplification gives two possibilities, such as , the function is probably many-one: produce a concrete pair like .
  4. 4Onto: let be any element of the co-domain. Solve for in terms of .
  5. 5Check that this exists for every in the co-domain and that it lies in the domain (an integer, a non-negative number, not an excluded value).
  6. 6Substitute back to confirm , and write "Every in the co-domain has a pre-image, so is onto."
  7. 7If some has no valid , name that and state that is into. Finish with a one-line conclusion: one-one and onto, hence bijective.

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.

Bijective function and its pre-images

Suppose a weather app stores every temperature in degrees Celsius and shows it in degrees Fahrenheit using , taking any real Celsius value to a real Fahrenheit value.

Show that is one-one and onto. Hence find the Celsius reading that the app shows as F, and the reading that is the same on both scales.

Try it first, then show the solutionSolution
  1. One-one: .
  2. Onto: for any real , solve to get , which is a real number, so every Fahrenheit value has a Celsius pre-image.
  3. Check: . Hence is bijective.
  4. For F: .
  5. Same on both scales: .

Answer: is bijective; F corresponds to C, and is the same on both scales.

Memory hook: A good unit converter must be a bijection: no two readings clash, and no reading is missing.

One-one but not onto (into function)

Imagine a car park that charges Rs 30 for the first hour and Rs 20 for each further hour, so parking for whole hours costs rupees, with .

Is one-one? Is it onto? A driver is charged Rs 110: for how many hours did she park? Could anyone be charged Rs 40?

Try it first, then show the solutionSolution
  1. One-one: , so different durations always cost different amounts.
  2. Onto: solve , giving . This must be a natural number.
  3. For : hours.
  4. For : , not a natural number, so Rs 40 has no pre-image. (So does Rs 1, Rs 2, and so on.)
  5. Hence is one-one but not onto (an into function).

Answer: One-one, not onto. Rs 110 means 5 hours; nobody can be charged Rs 40.

Memory hook: Car park bill: each stay has its own price, but many prices are never on the bill, so it is into.

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: no sharing

    One-one means no two inputs share an output, like no two students sharing a roll number.

    Use it when: Deciding whether a counter-example such as f(-2) = f(2) proves many-one.

  • Onto: nobody left out

    Onto means every member of the co-domain gets picked at least once. Range = co-domain.

    Use it when: Remember to compare the range with the co-domain, not the domain.

  • Solve and check

    For onto, solve for x, then ask two questions: does x exist, and is x in the domain?

    Use it when: Integer and restricted-domain questions, where the formula for x is not enough.

  • m into n

    One-one needs the domain no bigger than the co-domain (m ≤ n); onto needs it no smaller (m ≥ n). Equal sizes: one-one if and only if onto.

    Use it when: Counting MCQs and assertion-reason items on finite sets.

One-One and Onto Functions: solved examples

Ordered from board level to HOTS. Try each one before you open the solution.

Example 1: Proving a linear function bijective · 2 marks · Short answerBoard level

Show that the function defined by is one-one and onto.

Try it first, then show the solutionSolution
  1. One-one: let . Then . So is one-one. (1 mark)
  2. Onto: let . Put , so , which is a real number for every real .
  3. Check: . Every has a pre-image, so is onto. (1 mark)

Answer: is one-one and onto (bijective). This is the kind of 2-mark proof asked in ISC 2024; the examiners noted that candidates wrote in terms of but did not justify why this proves onto.

Example 2: Natural numbers to natural numbers · 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 onto

Try it first, then show the solutionSolution
  1. , so is one-one.
  2. The odd number 3 would need , so 3 has no pre-image and is not onto.

Answer: (b) one-one but not onto.

Example 3: A rational function with a restricted co-domain · 3 marks · Short answerHarder board level

Let and . Show that , , is one-one and onto.

Try it first, then show the solutionSolution
  1. One-one: . (1 mark)
  2. Expanding: . So is one-one.
  3. Onto: let , so . From : , defined because . (1 mark)
  4. This is never 2: if then , which is false. So . (½ mark)
  5. Check: . Hence is onto. (½ mark)

Answer: is one-one and onto, so it is a bijection from to .

Example 4: A piecewise function: f(x) = x|x| · 3 marks · Short answerHarder board level

Show that , , is a bijection.

Try it first, then show the solutionSolution
  1. Write it in pieces: for and for . So when and when . (1 mark)
  2. One-one: suppose . Equal images have the same sign, so are both or both . If both , (taking non-negative roots). If both , (both negative). (1 mark)
  3. Onto: for take , giving ; for take , giving . Every real has a pre-image. (1 mark)

Answer: is one-one and onto, hence a bijection on .

Example 5: Swapping neighbours on N · 5 marks · Long answerHOTS / competency

Define by if is odd and if is even. Show that is bijective and find .

Try it first, then show the solutionSolution
  1. The rule swaps 1 and 2, 3 and 4, 5 and 6, and so on. Odd numbers go to even numbers and even numbers go to odd numbers. (1 mark)
  2. One-one: let . The image is even exactly when the input is odd, so have the same parity.
  3. Both odd: . Both even: . So is one-one. (2 marks)
  4. Onto: take . If is even, is odd and in , with . If is odd, is even, with . So is onto. (1 mark)
  5. For odd : . For even : . (1 mark)

Answer: is bijective and for every , so is its own inverse.

Example 6: Assertion-reason on finite sets · 1 mark · Assertion-reasonHarder board level

Let .
Assertion (A): Every one-one function from to is onto.
Reason (R): The number of one-one functions from to equals .
(a) Both A and R are true and R explains A.
(b) Both A and R are true but R does not explain A.
(c) A is true but R is false.
(d) A is false but R is true.

Try it first, then show the solutionSolution
  1. A one-one function from to uses 4 different images out of 4 elements, so every element is used: it is onto. A is true.
  2. The number of one-one functions is , while counts all functions. R is false.

Answer: (c) A is true but R is false.

Where students lose marks in One-One and Onto Functions

The slips examiners see most often, and what to write instead.

  • Mistake: Claiming onto just by writing x in terms of y

    The formula for x proves nothing until you show it exists for every y and lies in the domain.

    Wrong working

    . Hence onto.

    Right working

    for every , and . Every has a pre-image, so is onto.

    Do this: Always add the sentence: "this x is in the domain for every y in the co-domain, and f(x) = y".

    Usually costs: The onto mark in a 2-mark proof (the ISC 2024 examiners flagged exactly this).

  • Mistake: Proving one-one from x₁ = x₂ ⇒ f(x₁) = f(x₂)

    That direction is true of every function; it is the definition of a function, not of one-one.

    Wrong working

    Let . Then , so is one-one.

    Right working

    Let . Then ... , so is one-one.

    Do this: Start from equal images; end at equal inputs.

    Usually costs: Full marks for the one-one part.

  • Mistake: Ignoring the co-domain

    Onto depends on the co-domain. is onto but not onto .

    Do this: Write the co-domain at the top of your answer and test every in it, including any excluded value.

    Usually costs: 1 mark, sometimes the whole answer in an MCQ.

  • Mistake: Cancelling squares without checking signs

    From you only get .

    Wrong working

    , so is one-one on .

    Right working

    ; since , is many-one on (but one-one on ).

    Do this: Use the domain to rule out the minus sign, or give a counter-example.

    Usually costs: The conclusion mark, and often the whole part.

Exam tips

  • Label the two parts of the proof "One-one:" and "Onto:" and end each with a sentence. Examiners mark each half separately.
  • For a "not one-one" or "not onto" answer, a single numerical counter-example is a complete proof. Do not attempt a general argument.
  • In a rational function, check that the pre-image you found avoids the excluded value of the domain; this is usually the half-mark that separates a full answer.
  • For finite sets, write the counting formula before the number: one-one functions.
  • If a later part asks for , the onto working already contains it: replace by in your expression for .

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.

  1. Q1 · 1 mark · MCQBoard level

    Which of these functions from to is one-one and onto?
    (a)
    (b)
    (c)
    (d)

    Hint

    Find a counter-example for one-one in three of them.

    Answer

    (b). is strictly increasing and takes every real value. and give ; repeats and never exceeds 1.

  2. Q2 · 2 marks · Short answerBoard level

    Show that , , is one-one and onto.

    Hint

    For onto, solve .

    Answer

    : one-one. For any real , is real and : onto.

  3. Q3 · 2 marks · Short answerHarder board level

    Show that , , is one-one but not onto.

    Hint

    Look for an integer with no integer pre-image.

    Answer

    : one-one. The image is always odd; needs , so is not onto.

  4. Q4 · 3 marks · Short answerHarder board level

    Show that , , is neither one-one nor onto.

    Hint

    Compare with , then try .

    Answer

    with : not one-one. gives , whose discriminant is , so 1 has no real pre-image: not onto. (In fact the range is .)

  5. Q5 · 2 marks · Short answerHarder board level

    Is , , one-one? Is it onto? Justify.

    Hint

    Work out for negative .

    Answer

    For , , so : not one-one. For , , so no negative number is an image: not onto.

  6. Q6 · 4 marks · Case-basedHOTS / competency

    Case study: Suppose a coaching centre gives the 20 students of a batch roll numbers 1 to 20 and assigns each one the locker from a row of lockers numbered 1 to 40.
    (i) Is one-one? (1 mark)
    (ii) Is onto? How many lockers stay unused? (1 mark)
    (iii) How many one-one ways are there to assign the 20 students to 40 lockers? Leave your answer in factorial form. (1 mark)
    (iv) If the batch grows to 41 students and every student must get a locker, show that two students must share one. (1 mark)

    Hint

    Use the counting results for finite sets.

    Answer

    (i) Yes: . (ii) No: only odd lockers are used, so the 20 even-numbered lockers stay unused. (iii) . (iv) A one-one function needs , but , so any assignment is many-one: two students share a locker.

  7. Q7 · 3 marks · Short answerHOTS / competency

    Let and . Find (i) the number of functions from to , (ii) the number of one-one functions from to , (iii) the number of onto functions from to .

    Hint

    For (iii), subtract the functions that miss at least one element of .

    Answer

    (i) . (ii) . (iii) All functions from to : ; those missing a given element: , three such; those missing two given elements: 1, three such. Onto .

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. 1.State the condition you prove to show is one-one.Show answer

    for all in the domain.

  2. 2.When is a function onto?Show answer

    When every element of the co-domain has at least one pre-image, that is, range = co-domain.

  3. 3.How many one-one functions are there from a 3-element set to a 5-element set?Show answer

    .

  4. 4.Is from to bijective?Show answer

    Yes: for , gives , and every has pre-image .

  5. 5.What is an into function?Show answer

    A function that is not onto: some element of the co-domain has no pre-image.

  6. 6.If , how many bijections are there from to ?Show answer

    .

One-One and Onto Functions: frequently asked questions

What is the difference between one-one and onto functions?

One-one is about the domain side: no two inputs share an image. Onto is about the co-domain side: no element of the co-domain is left without a pre-image. A function can be one, both or neither, so each must be proved separately.

Do I need to prove both one-one and onto to show a function is invertible?

Yes. A function is invertible exactly when it is bijective. In ISC questions on finding the inverse, the function is usually stated to be invertible; if it is not, prove both parts first.

Can I use a graph to prove a function is one-one?

The horizontal line test is a good check and is enough for a 1-mark MCQ, but in a 2- or 3-mark answer the examiner expects the algebraic proof starting from f(x₁) = f(x₂).

How do I show a function is not onto?

Name one element of the co-domain and show that solving f(x) = y for it gives no value in the domain, for example a fraction when the domain is the integers, or a negative number under a square root.

Is a strictly increasing function always one-one?

Yes. If x₁ < x₂ then f(x₁) < f(x₂), so different inputs give different outputs. It need not be onto, though: e^x is strictly increasing on the real numbers but never takes negative values.