LearnWave
Learn it. Master it.

Relations and Functions

One-one and onto functions

Test whether a function is one-one and whether it is onto.

A function f : A → B sends each element of A (the domain) to exactly one element of B (the co-domain). The outputs actually reached form the range.

Two questions describe a function well.

Is it one-one (injective)? Different inputs must always give different outputs: no two inputs share an output.

  • To prove one-one: suppose f(x₁) = f(x₂) and show that this forces x₁ = x₂.
  • To disprove it: find two different inputs with the same output.

Example: f(x) = 7x – 2 on R. If 7x₁ – 2 = 7x₂ – 2 then 7x₁ = 7x₂, so x₁ = x₂: one-one. But g(x) = |x| on R is many-one: g(–3) = g(3) = 3.

Is it onto (surjective)? Every element of the co-domain must be an output: nothing in B is left out.

  • To prove onto: take any y in B, solve y = f(x) for x, and check that this x really lies in the domain.
  • To disprove it: find a y in B that no input reaches.

Example: f(x) = 7x – 2 on R. Given y, x = (y + 2)/7 is a real number and f(x) = y, so f is onto.

The same rule can change its answers when the sets change. f(x) = x + 1 from N to N is one-one but not onto, since 1 is never an output (0 is not a natural number); from Z to Z it is both.

A useful picture: draw the arrows from A to B. One-one: no point of B receives two arrows. Onto: every point of B receives at least one arrow.

One-one: no sharing. Onto: nothing left out.
One-one: no sharing. Onto: nothing left out.

Practise this lesson

Questions that get harder as you improve, a Tutor that helps without giving the answer away, and progress you can see. Free for every learner.

No account, no email address. Opens the real product.