- 1. What is a relation, really?
- 2. Types of relations: empty, universal, reflexive, symmetric, transitive
- 3. When is a relation an equivalence relation?
- 4. Sorting a set into boxes: equivalence classes
- 5. How many relations? Counting with pairs
- 6. Different inputs, different outputs: one-one (injective) functions
- 7. Is every output used? Onto (surjective) functions
- 8. Both at once: bijective functions, and the finite vs infinite surprise
- 9. How many functions? Counting maps between finite sets
- 10. One function after another: composition of functions
- 11. Running a function backwards: invertible functions
- Review
7 of 11·NCERT §1.3·5 min
Is every output used? Onto (surjective) functions
The big ideaA function f : X → Y is onto (surjective) when every element of the co-domain Y is the image of at least one input, that is, when the range equals the co-domain.
In simple words
Back in the cinema. Now we ask a different question: is every seat filled? If each seat has at least one person in it, the hall is full, and we call the seating onto. It does not matter here if two people squeeze into one seat. All that matters is that no seat is left empty.
Arrow diagrams, in words
Take X = {1, 2, 3, 4} and Y = {p, q, r}.
- f: 1 → p, 2 → q, 3 → r, 4 → r. Every point of Y gets at least one arrow. This f is onto (and many-one, since r gets two arrows).
- g: 1 → p, 2 → p, 3 → q, 4 → q. Point r gets no arrow. This g is not onto.
So in an arrow diagram, onto means no point on the right is left without an arrow.
The definition
A function f : X → Y is onto (or surjective) if for every y ∈ Y there is some x ∈ X with f(x) = y. Since the range of f is the set of outputs actually reached,
\[ f \text{ is onto} \iff \text{range of } f = Y \]
A function that is not onto is sometimes called an into function: it sends X into Y without covering all of it. The word "into" is in the JEE syllabus even though NCERT does not use it.
How to prove onto: solve for x
- Take any y in the co-domain.
- Solve f(x) = y for x.
- Check that this x really lies in the domain. If it always does, f is onto. If for some y it does not (or there is no solution), f is not onto, and that y is your counterexample.
Try it: guess first, then pick a y and see whether its x lands inside the domain.
Worked examples
- f : \( \mathbf{R} \to \mathbf{R} \), f(x) = 3x − 5. Given any real y, take \( x = \frac{y + 5}{3} \), a real number. Then \( f(x) = 3 \cdot \frac{y+5}{3} - 5 = y \). Onto.
- f : \( \mathbf{N} \to \mathbf{N} \), f(x) = x + 1. To get y = 1 we need x = 0, which is not in \( \mathbf{N} \). So 1 is never reached, and f is not onto. Its range is {2, 3, 4, …}.
- f : \( \mathbf{Z} \to \mathbf{Z} \), f(x) = x + 1. Same formula, bigger domain: for any integer y, x = y − 1 is an integer. Onto.
- f : \( \mathbf{R} \to \mathbf{R} \), f(x) = x². y = −1 would need x² = −1, with no real solution. Not onto. But f : \( \mathbf{R} \to [0, \infty) \) with the same rule is onto, since any y ≥ 0 is \( (\sqrt{y})^2 \).
- f : \( \mathbf{R} \to \mathbf{R} \), f(x) = [x], the greatest integer function. It only ever outputs integers, so 0.5 is never reached. Not onto.
- f : \( \mathbf{N} \to \mathbf{N} \), f(x) = 2x. Odd numbers such as 3 would need x = 1.5. Not onto.
Notice how much the co-domain matters. The formula alone never decides onto; you always need "from where, to where".
The horizontal-line idea for onto
For f : \( \mathbf{R} \to \mathbf{R} \), the outputs reached are the heights c where the line y = c meets the graph. So f is onto when every horizontal line y = c (with c in the co-domain) meets the graph at least once. The parabola y = x² misses every line below the x-axis, so it is not onto \( \mathbf{R} \). The line y = 3x − 5 and the curve y = x³ meet every horizontal line.
Try it: switch the co-domain of x² and watch which lines count.
Putting the two tests together: at most once for every horizontal line means one-one; at least once means onto; exactly once means both.
Don't mix these up
- Range is what you get; co-domain is what you declare. Onto means they are equal.
- One-one is about no output being hit twice; onto is about no output being missed. A function can be either, both, or neither.
- Any function can be made onto by shrinking its co-domain to its range; the formula stays the same.
Try it. Is f : \( \mathbf{R} \to \mathbf{R} \), f(x) = 1 + x², onto? What is its range?
Answer
- Onto (surjective)
- Every element of the co-domain is the image of some input.
- Into
- A function that is not onto: some element of the co-domain is left out.
- Range
- The set of outputs actually reached.
- Co-domain
- The set named after the arrow in f : X → Y.
- Pre-image
- An input x that gives a chosen output y.
Words to know
f : \( \mathbf{Z} \to \mathbf{Z} \), f(x) = 2x + 1. Is f onto?
- Yes, because every output is an integer
- No, the even integers are never reached
- Yes, because it is one-one
For which co-domain is f(x) = x², with domain \( \mathbf{R} \), onto?
- \( \mathbf{R} \)
- [0, ∞)
- (0, ∞)
f : X → Y with X = {1, 2, 3} and Y = {a, b, c, d}. Can f be onto?
- Yes, if f is one-one
- No, never
- Only if two inputs share an output
Picture and video credits