What are one-one and onto functions?
Answer in short
A function f : X → Y 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 Y is an output, so the range is all of Y. A function that is both is bijective, and exactly these functions have an inverse.
Stuck on a question? Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2. Get it on Google Play
What is a one-one function?
A function f : X → Y gives every element of X exactly one image in Y. It is one-one (or injective) if different elements of X always have different images. In symbols: for all x₁, x₂ in X, f(x₁) = f(x₂) implies x₁ = x₂. A function that is not one-one is called many-one. f(x) = x + 1 on N is one-one; f(x) = x² on R is many-one, because f(−3) = f(3) = 9.
What is an onto function?
f : X → Y is onto (or surjective) if each element y of Y comes from at least one x in X, with f(x) = y. Another way to say it: the range of f is the whole co-domain Y. f(x) = x + 1 on N is not onto, because 1 is not the image of any natural number. The function that gives the number of digits of a natural number is onto N (k is the number of digits of 10ᵏ⁻¹), but it is not one-one, since 1 and 2 both have one digit.
What is a bijective function?
A function that is both one-one and onto is bijective. Its arrows pair the two sets off exactly, with nothing shared and nothing left over. The four arrow diagrams below show all four cases.
How do you prove that a function is one-one and onto?
Take f : R → R, f(x) = 2x + 5.
- One-one. Suppose f(x₁) = f(x₂). Then 2x₁ + 5 = 2x₂ + 5, so 2x₁ = 2x₂, and x₁ = x₂.
- Onto. Take any y in R. Solve y = 2x + 5: x = (y − 5)/2. This x is a real number, and f(x) = (y − 5) + 5 = y.
So f is bijective. The domain and co-domain matter: as a function from N to N, the same rule is still one-one, but it is not onto, since x = (y − 5)/2 is not a natural number for y = 6.
To show that a function is not one-one, find two inputs with the same output. To show that it is not onto, find one element of the co-domain that no input reaches, and say why. For f(x) = 1 + x² on R: f(−1) = f(1) = 2, and 0 is never reached, because 1 + x² ≥ 1.
A graph gives a quick check (Extra, not in the book): a function from R to R is one-one if no horizontal line meets its graph twice, and onto if every horizontal line meets it. In an exam answer, write the algebra.
Why are one-one and onto the same for finite sets?
Think of 30 students and 30 chairs, with each student given a chair. If no two students share a chair (one-one), all 30 chairs are taken (onto). If every chair is taken (onto), no two students can share one, or there would be too few students to fill the rest (one-one). So when X is finite, a function from X to itself is one-one exactly when it is onto. Infinite sets break this: f(x) = x + 1 on N is one-one but not onto.
What is the composition gof?
If f : A → B and g : B → C, then gof : A → C is defined by gof(x) = g(f(x)). Feed x to f, then feed the answer to g. The co-domain of f must sit inside the domain of g, or the second step may have nothing to work on.
With f(x) = x + 2 and g(x) = x², gof(x) = g(x + 2) = (x + 2)², but fog(x) = f(x²) = x² + 2. At x = 3 these give 25 and 11, so gof ≠ fog.
Which functions have an inverse?
f : X → Y is invertible if some g : Y → X undoes it from both sides: g(f(x)) = x for every x in X and f(g(y)) = y for every y in Y. This g is the inverse, f⁻¹. A function is invertible exactly when it is bijective. One-one ensures that each y came from only one x, and onto ensures that every y came from some x, so every arrow can be turned round.
For f(x) = 2x + 5 on R, solving y = 2x + 5 gave x = (y − 5)/2, so f⁻¹(y) = (y − 5)/2. Check both ways: f⁻¹(f(x)) = (2x + 5 − 5)/2 = x and f(f⁻¹(y)) = (y − 5) + 5 = y. On the other hand, f(x) = x² on R has no inverse: 9 would have to go back to both 3 and −3.
Read next: types of relations, the chapter notes and the NCERT solutions.
Practice
-
f : N → N, f(x) = x + 1 is:
Show answer
Answer: (a) one-one but not onto
-
Which function from R to R is NOT one-one?
Show answer
Answer: (c) f(x) = x² + 3
-
If f(x) = 2x and g(x) = x − 1 on R, then fog(x) is:
Show answer
Answer: (a) 2x − 2
-
Show that f : R → R, f(x) = 5x + 2, is one-one and onto, and find f⁻¹.
Show answer
Answer: One-one: 5x₁ + 2 = 5x₂ + 2 gives 5x₁ = 5x₂, so x₁ = x₂. Onto: for any real y, x = (y − 2)/5 is real and f(x) = (y − 2) + 2 = y. So f is a bijection and f⁻¹(y) = (y − 2)/5.
-
A function f : {1, 2, 3, 4} → {1, 2, 3, 4} is one-one. Can it miss a value? Explain.
Show answer
Answer: No. The four elements have four different images, and the co-domain has only four elements, so every element is an image: f is onto.
Questions students ask
What is the difference between one-one and onto?
One-one looks at the inputs: no two inputs may share an output. Onto looks at the co-domain: no element may be left without an input. f(x) = x + 1 from N to N is one-one but misses 1, so it is not onto.
What is a bijective function?
A function that is both one-one and onto. Its arrows pair the elements of the domain and the co-domain exactly, one to one, with nothing left over on either side, as f(x) = 2x + 5 does from R to R.
Which functions have an inverse?
Exactly the bijective ones. One-one makes sure each output came from only one input, and onto makes sure every element of the co-domain came from some input, so every arrow can be reversed into a function.
Is gof the same as fog?
Usually not. With f(x) = x + 2 and g(x) = x², gof(x) = (x + 2)² and fog(x) = x² + 2, so gof(3) = 25 but fog(3) = 11. Sometimes fog is not even defined when gof is.
Stuck on a question?
Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2.
Get it on Google Play Open in browser
For parents: after the trial, the plan renews monthly by UPI or card autopay. You can cancel anytime in the app.