haya.Learning made clear
Unit I · Relations and functions
11 min readConcept sheet1-mark MCQ or assertion-reason; 3-mark 'one-one and onto' checks; often a 5-mark bijection proof; also a JEE favourite

Onto (surjective) and bijective functions

f: A → B is onto when every element of B is the image of some element of A, so range = codomain. One-one and onto make f bijective.

Onto (surjective)For every y ∈ B there is some x ∈ A with f(x) = y. Then the range of f equals the codomain B.
BijectiveBoth one-one and onto
Finite set ruleFor f: A → A with A finite, f is one-one exactly when f is onto.
Number of bijectionsFrom a set of n elements to itself: n! = n × (n − 1) × ... × 1

What onto means

For f: A → B, the set B is the codomain, and the set of actual outputs is the range. f is onto (surjective) if every element of B is the image of at least one element of A, so the range is the whole of B. In an arrow diagram, every element of B receives at least one arrow. If some element of B receives no arrow, f is into, not onto. The codomain matters: the same rule can be onto one set and not onto another.

How to prove onto (solve for x)

  1. 1
    Take any y in the codomain B.
  2. 2
    Set y = f(x) and solve for x in terms of y.
  3. 3★
    Check that this x lies in the domain A. Look out for division by zero, and for domains like N or Z.
  4. 4
    Check that f(x) = y. Then every y has a preimage, so f is onto.
  5. 5
    To disprove, name one y in B that has no preimage.

★ key step

Example 1: onto R

Problem

Show that f: R → R, f(x) = 5 − 2x is onto.

Working
  1. Rule: every y ∈ R must equal f(x) for some x ∈ R.
  2. Let y ∈ R and set y = 5 − 2x.
  3. Then 2x = 5 − y, so x = (5 − y)/2.
  4. (5 − y)/2 is a real number for every real y.
  5. Check: f((5 − y)/2) = 5 − 2 × (5 − y)/2 = 5 − (5 − y) = y.
Answer

Every real y has the preimage (5 − y)/2, so f is onto.

The four possibilities

FunctionOne-one?Onto?Type
f: R → R, f(x) = 2x + 1YesYesBijective
f: N → N, f(x) = 2xYesNo: 3 has no preimageOne-one only
f: N → N, f(n) = (n + 1)/2 for odd n and n/2 for even nNo: f(1) = f(2) = 1Yes: f(2m) = mOnto only
f: R → R, f(x) = x²No: f(−1) = f(1)No: −1 has no preimageNeither

Example 2: one-one and onto (board style)

Problem

Show that f: R − {−1} → R − {1}, f(x) = (x − 2)/(x + 1) is a bijection.

Working
  1. Rule: show that f is one-one and onto.
  2. One-one: let (x₁ − 2)/(x₁ + 1) = (x₂ − 2)/(x₂ + 1).
  3. Cross-multiply and expand: x₁x₂ + x₁ − 2x₂ − 2 = x₁x₂ + x₂ − 2x₁ − 2.
  4. Cancel: x₁ − 2x₂ = x₂ − 2x₁, so 3x₁ = 3x₂ and x₁ = x₂.
  5. Onto: take any y ≠ 1 and set y = (x − 2)/(x + 1).
  6. Then xy + y = x − 2, so x(y − 1) = −(y + 2), and x = (y + 2)/(1 − y).
  7. This x is real because y ≠ 1. Also x ≠ −1, since x = −1 would give y + 2 = y − 1, that is 2 = −1, which is impossible.
  8. Check: x − 2 = 3y/(1 − y) and x + 1 = 3/(1 − y), so f(x) = 3y/3 = y.
Answer

f is one-one and onto, so f is a bijection.

Example 3: neither one-one nor onto

Problem

Show that f: R → R, f(x) = x/(x² + 1) is neither one-one nor onto.

Working
  1. One-one fails: f(2) = 2/5 and f(1/2) = (1/2)/(5/4) = 2/5, but 2 ≠ 1/2.
  2. Onto: try to solve x/(x² + 1) = 1.
  3. This gives x = x² + 1, that is x² − x + 1 = 0.
  4. Its discriminant is (−1)² − 4(1)(1) = −3 < 0, so there is no real x.
  5. So 1 in the codomain has no preimage.
Answer

f is neither one-one nor onto.

In real life

In a sold-out cinema show, the map 'ticket → seat' is onto: no seat is left empty. If no seat is sold twice as well, the map is a bijection, which is exactly what a booking app must make sure of.

Exam angle

1 marks: “The function f: N → N, f(x) = 5x is:” One-one but not onto. 5x₁ = 5x₂ gives x₁ = x₂, but a number that is not a multiple of 5, such as 3, has no preimage in N.

2 marks: “Show that f: R → R, f(x) = 5x³ + 4 is onto.” Let y ∈ R. Solve y = 5x³ + 4: x³ = (y − 4)/5, so x is the cube root of (y − 4)/5, which is real for every y. Then f(x) = y, so f is onto.

1 marks: “How many bijections are there from A = {1, 2, 3, 4} to itself?” 4! = 4 × 3 × 2 × 1 = 24.

Remember it

Onto: no one left out. Every element of the codomain gets an arrow. One-one + onto = bijection.