Types of Functions
The two questions that classify every function
From Class XI you know functions and their graphs — identity, constant, polynomial, rational, modulus, signum, greatest integer. This section asks two sharper questions about any function :
Question 1 — do distinct inputs stay distinct? (Is one-one?)
Question 2 — does every element of get hit? (Is onto?)

Definition (one-one / injective). is one-one if the images of distinct elements are distinct — equivalently, for every , A function that is not one-one is called many-one.
Definition (onto / surjective). is onto if every is the image of some : for every there exists with . Equivalently: Range of = (the whole co-domain).
Definition (bijective). is bijective if it is both one-one and onto — a perfect pairing between and .
The proof templates (used in every board answer)
To prove one-one: start from and derive by algebra.
To disprove one-one: exhibit two distinct inputs with the same image.
To prove onto: take an arbitrary in the co-domain and solve for , checking the solution lies in the domain.
To disprove onto: exhibit one element of the co-domain with no preimage.
Notice how the same formula is bijective on but only one-one on — the domain and co-domain are part of the function. Changing them changes the classification; this is the single most tested subtlety of the section.
The standard gallery (memorise these verdicts)
| Function | Domain Co-domain | One-one? | Onto? | Why |
|---|---|---|---|---|
| yes | no | 1 has no preimage | ||
| yes | yes | solve | ||
| yes | no | 2 is not a square | ||
| or | no | no | ; negatives unhit | |
| or | yes | no | cubes are sparse | |
| (greatest integer) | no | no | ; unhit | |
| no | no | ; negatives unhit | ||
| signum | no | no | range is only | |
| yes | yes | linear, nonzero slope | ||
| no | no | ; unhit |
The Finite-Set Phenomenon and Sharper Examples
One-one onto on a finite set
For maps of a finite set to itself the two properties collapse into one:
Fact. For a finite set , a function is one-one if and only if it is onto.
Why (for ): if is one-one, its three images are distinct elements of a three-element set — so they fill it, and is onto. Conversely if is onto but not one-one, two inputs share an image, leaving at most two distinct images to cover three elements — impossible.
This is a characteristic difference between finite and infinite sets: on , the map is one-one but not onto, and the map , for is onto but not one-one. Neither behaviour can occur on a finite set mapping to itself.
Two functions worth studying closely
The parity swap. defined by is bijective: it pairs , , Each number is both the image of exactly one number and the preimage of exactly one — a perfect shuffle of .
The floor-halving map. with for odd and for even sends It is onto (every is ) but not one-one () — each output is hit exactly twice.
The rational-function workhorse
, is one-one and onto:
One-one: ; cross-multiplying, , which expands to , i.e. .
Onto: given , solve : , so and , which is defined (since ) and never equals 3 (that would need , impossible). So every target is hit.
The carefully punctured domain and co-domain are what make this work — another reminder that they are part of the function's identity.
Common mistakes to avoid
Mistake 1 — proving one-one by example. Checking proves nothing; the algebra must run for arbitrary . Conversely a single collision disproves it.
Mistake 2 — confusing range with co-domain. Onto means range = co-domain. The function has range , so it is not onto — even though its range is a perfectly nice set.
Mistake 3 — ignoring the domain when solving . For on , the equation has the solution — but , so 1 is not hit. The solution must live in the stated domain.
Mistake 4 — 'increasing means onto'. is strictly increasing on , hence one-one, but not onto : the value 2 is no integer's cube. Monotonicity gives injectivity, never surjectivity.
Solved Examples
Example 1 — Roll numbers
Let be the set of all 50 students of Class X in a school and assign to each student their roll number. Show that is one-one but not onto.
Step 1 — one-one: no two different students share a roll number, so distinct students have distinct images.
Step 2 — not onto: with roll numbers running 1 to 50, the number is nobody's roll number — an element of the co-domain with no preimage.
Answer: one-one but not onto. Any injective map of a 50-element set into the infinite set must leave almost everything unhit.
Example 2 — Doubling on
Show that , , is one-one but not onto.
Step 1 — one-one: .
Step 2 — not onto: for , the equation demands , which is not a natural number.
Answer: one-one, not onto — the image is only the even numbers.
Example 3 — Doubling on
Prove that , , is one-one and onto.
Step 1 — one-one: .
Step 2 — onto: given any , the real number satisfies .
Answer: bijective. Same formula as Example 2, different domain and co-domain, different verdict — the classification belongs to the whole package , not to the formula alone.
Example 4 — Onto but not one-one
Show that , given by and for every , is onto but not one-one.
Step 1 — not one-one: with .
Step 2 — onto: given with , choose ; then . And is also hit.
Answer: onto but not one-one — the map shifts everything down by one and dumps both 1 and 2 onto 1.
Example 5 — The parabola fails both tests
Show that , , is neither one-one nor onto.
Step 1 — not one-one: .
Step 2 — not onto: in the co-domain is no real number's square, since squares are nonnegative.
Answer: neither. (On the same formula is one-one — there are no negatives to collide — but still not onto, since 2 is not a perfect square.)
Example 6 — The parity swap is a bijection
Show that given by if is odd and if is even, is both one-one and onto.
Step 1 — collisions across parities are impossible: if odd and even had , then , i.e. — but then and would have the same parity, a contradiction.
Step 2 — collisions within a parity force equality: both odd gives ; both even similarly. So is one-one.
Step 3 — onto: any odd number is the image of the even number , and any even number is the image of the odd number .
Answer: bijective — swaps each odd number with its even successor.
Example 7 — The finite-set collapse
Show that an onto function is always one-one, and that a one-one function must be onto.
Step 1 — onto one-one (by contradiction): if were not one-one, two elements would share an image, so the range would contain at most two of the three co-domain elements — contradicting onto.
Step 2 — one-one onto: three distinct images inside a three-element co-domain must exhaust it.
Answer: on a finite set mapping to itself, one-one and onto are equivalent — and this equivalence fails on infinite sets (Examples 2 and 4 are the counterexamples).