- Foundation
- About 14 min
- 5 practice questions
One-one, onto and bijective functions
Decide whether a function is one-one, onto or bijective, both for small finite sets and for simple real functions given by formulas.
If something looks wrong, please tell us.
Two functions can have the same domain and codomain and still behave very differently: one may send different inputs to different outputs, another may cover every element of the codomain. These two properties, one-one and onto, decide whether a function can be reversed, which is the subject of the next lesson. This lesson defines them and shows how to test them on arrow diagrams and on formulas.
One-one (injective)
A function f : A → B is one-one if different elements of A always have different images: f(a) = f(b) only when a = b. In an arrow diagram, no element of B receives two arrows. To prove a formula is one-one, start from f(a) = f(b) and show that a = b. To prove it is not one-one, find two different inputs with the same output.
Onto (surjective)
A function f : A → B is onto if every element of B is the image of at least one element of A, that is, the range equals the codomain. In an arrow diagram, every element of B receives at least one arrow. To prove a formula is onto, take any y in the codomain and solve f(x) = y for an x that lies in the domain. To prove it is not onto, find one element of the codomain that is never reached.
Bijective
A function that is both one-one and onto is bijective, or a one-one correspondence. Each element of A is paired with exactly one element of B and nothing is left over on either side. For finite sets this needs n(A) = n(B). In fact, when A and B are finite with the same number of elements, a function from A to B is one-one exactly when it is onto.
| Property | Meaning | Arrow-diagram test |
|---|---|---|
| One-one | different inputs, different outputs | no element of B gets two arrows |
| Onto | range = codomain | every element of B gets an arrow |
| Bijective | one-one and onto | every element of B gets exactly one arrow |
Worked example 1: a linear function on R
Show that f : R → R, f(x) = 3x − 5, is bijective. One-one: if 3a − 5 = 3b − 5, then 3a = 3b and a = b. Onto: take any real y and solve 3x − 5 = y, giving x = (y + 5)/3, which is a real number, and f((y + 5)/3) = y. So every y is reached and f is bijective.
Worked example 2: the square function
Is f : R → R, f(x) = x², one-one or onto? f(2) = 4 and f(−2) = 4, two different inputs with one output, so f is not one-one. The value −1 is in the codomain, but no real square is negative, so −1 is never reached and f is not onto. Changing the sets changes the answer: f : [0, ∞) → [0, ∞), f(x) = x², is bijective, because only non-negative inputs are allowed and every non-negative number is a square.
Worked example 3: a function on N
Is f : N → N, f(n) = 2n, one-one or onto? If 2a = 2b then a = b, so f is one-one. But the images are 2, 4, 6, ..., and odd numbers such as 1 and 3 are never reached, so f is not onto. A function can be one-one without being onto when the domain is infinite.
Worked example 4: finite sets
Let A = {1, 2, 3} and B = {a, b, c}, and f = {(1, b), (2, c), (3, a)}. The images b, c and a are all different, so f is one-one, and together they cover B, so f is onto. Hence f is bijective. If B had only two elements, three inputs would have to share two outputs, so no function from A to B could be one-one.
One-one: f(a) = f(b) forces a = b. Onto: every y in the codomain has an x with f(x) = y. Bijective: both. Always read the domain and codomain before deciding.
Key takeaways
A counter-example settles 'not one-one' (two inputs, one output) and 'not onto' (one value never reached). To prove one-one, start from f(a) = f(b); to prove onto, solve f(x) = y inside the domain. The same formula can change its properties when the domain or codomain changes, so read both sets first.
Check your understanding
-
1. f : R → R is given by f(x) = 5x + 1. Which describes f?
- One-one but not onto
- Onto but not one-one
- Bijective
- Neither one-one nor onto
Show answer
Answer: C. 5a + 1 = 5b + 1 gives a = b, so f is one-one; for any y, x = (y − 1)/5 gives f(x) = y, so f is onto.
-
2. f : R → R is given by f(x) = x² + 1. Which describes f?
- Neither one-one nor onto
- Bijective
- One-one but not onto
- Onto but not one-one
Show answer
Answer: A. f(1) = f(−1) = 2, so it is not one-one. f(x) ≥ 1 always, so 0 is never reached and it is not onto.
-
3. f : N → N is given by f(n) = n + 1. Which describes f?
- One-one but not onto
- Onto but not one-one
- Bijective
- Neither one-one nor onto
Show answer
Answer: A. a + 1 = b + 1 gives a = b, so f is one-one. 1 would need n = 0, which is not in N, so f is not onto.
-
4. A = {1, 2, 3} and B = {a, b}. What can be said about a function f : A → B?
- It can never be one-one
- It is always one-one
- It is always bijective
- It can never be onto
Show answer
Answer: A. Three inputs must share two outputs, so two of them get the same image. It can be onto, for example {(1, a), (2, b), (3, a)}.
-
5. f : Z → Z is given by f(x) = |x|. Which describes f?
- One-one but not onto
- Onto but not one-one
- Neither one-one nor onto
- Bijective
Show answer
Answer: C. f(1) = f(−1) = 1, so it is not one-one; negative integers are never reached, so it is not onto.
Sign in to keep track of the lessons you finish.