Types of functions
One-one: different inputs give different outputs. Onto: every element of the co-domain is used. A bijection is both.
The five types at a glance
| Type | Meaning | How to spot it in an arrow diagram |
|---|---|---|
| One-one | Distinct elements of A have distinct images | No element of B receives two arrows |
| Many-one | Two or more elements of A share an image | At least one element of B receives two or more arrows |
| Onto | Every element of B has a pre-image | Every element of B receives at least one arrow; range = co-domain |
| Into | At least one element of B has no pre-image | Some element of B receives no arrow; range is a proper subset of B |
| Bijection | Both one-one and onto | Every element of B receives exactly one arrow |
One-one vs onto (students mix these up)
The two questions are separate. A function can be one-one and into, many-one and onto, and so on.
Tests and counting facts
- Horizontal line test: if every horizontal line meets the graph at most once, the function is one-one.
- y = 2x + 1 passes the test. y = x² fails it, because the line y = 4 meets it at x = 2 and at x = −2.
- If f: A → B is one-one, then n(A) ≤ n(B). If f is onto, then n(A) ≥ n(B).
- If f is a bijection, then n(A) = n(B).
- To prove one-one by algebra: assume f(x₁) = f(x₂) and show that x₁ = x₂.
Example 1: identify the type
Let A = {1, 2, 3, 4} and B = N (the natural numbers). f: A → B is defined by f(x) = x² + 2. Find the range of f and identify the type of function.
- f(1) = 3, f(2) = 6, f(3) = 11, f(4) = 18.
- Range = {3, 6, 11, 18}.
- The four images are all different, so f is one-one.
- The range is not N; for example, 1 ∈ N has no pre-image. So f is into.
f is one-one and into.
Example 2: images, pre-images and type
f: N → N is defined by f(x) = 4x − 1. (i) Find the images of 1, 2 and 3. (ii) Find the pre-images of 27 and 39. (iii) Identify the type of function.
- (i) f(1) = 3, f(2) = 7, f(3) = 11.
- (ii) 4x − 1 = 27 ⇒ 4x = 28 ⇒ x = 7.
- 4x − 1 = 39 ⇒ 4x = 40 ⇒ x = 10.
- (iii) If f(x₁) = f(x₂), then 4x₁ − 1 = 4x₂ − 1, so x₁ = x₂. Therefore f is one-one.
- For 2 ∈ N, 4x − 1 = 2 gives x = 3/4, which is not in N. So 2 has no pre-image and f is into.
Images 3, 7, 11; pre-images 7 and 10; f is one-one and into.
Seats in a full board exam hall form a bijection: each candidate gets exactly one seat and each seat gets exactly one candidate. Linking many ration-card families to one ration shop is many-one.
2 marks: “Let A = {1, 2, 3} and B = {p, q, r, s}. Show that f = {(1, p), (2, q), (3, s)} is one-one but not onto.” The images p, q and s are all different, so f is one-one. r ∈ B has no pre-image, so f is not onto (it is into).
2 marks: “Can a function from A = {1, 2, 3} to B = {x, y} be one-one? Give a reason.” No. Three elements would need three different images, but B has only two elements (n(A) > n(B)).
5 marks: “If f: R → R is defined by f(x) = 4x + 7, show that f is a bijection.” One-one: f(x₁) = f(x₂) ⇒ 4x₁ + 7 = 4x₂ + 7 ⇒ x₁ = x₂. Onto: for any y ∈ R, take x = (y − 7)/4 ∈ R; then f(x) = y. So f is one-one and onto, a bijection.
One-one: no shared images. Onto: no lonely element in B. Both together make a bijection.