Relations and Functions

One-One and Onto Functions

Understand

A function \(f:A\to B\) assigns to every element of the domain \(A\) exactly one element of the codomain \(B\). The set of outputs actually produced is the range.

Type Meaning Test
One-one (injective) Different inputs give different outputs Assume \(f(x_1)=f(x_2)\) and prove \(x_1=x_2\)
Onto (surjective) Every element of the codomain is an output Take any \(y\in B\), solve \(f(x)=y\) with \(x\in A\)
Bijective Both one-one and onto Both tests

The same rule can change type when the domain or codomain changes: \(f(x)=x^2\) is neither one-one nor onto on \(\mathbb{R}\to\mathbb{R}\), but it is a bijection from \([0,\infty)\) to \([0,\infty)\).

Graphically, a function is one-one when every horizontal line meets its graph at most once, and onto when every horizontal line at a height in the codomain meets it at least once.

Counting functions

If \(n(A)=m\) and \(n(B)=n\): there are \(n^m\) functions from \(A\) to \(B\); \(n(n-1)\cdots(n-m+1)\) of them are one-one (needs \(m\le n\)); and there are \(n!\) bijections from a set with \(n\) elements to itself. A finite set function \(f:A\to A\) is one-one exactly when it is onto.

Key Concepts

  • One-one: f(x₁) = f(x₂) ⇒ x₁ = x₂.
  • Onto: range = codomain.
  • Changing domain/codomain can change the type.
  • On a finite set \(A\), \(f:A\to A\) is one-one \(\iff\) onto.

Formula Bank

Counting functions

\[\#(A\to B)=n^m,\qquad \#\text{one-one}=\frac{n!}{(n-m)!}\ (m\le n)\]

Key Points

Domain and codomain decide the type

\(x\mapsto x^2\): neither on \(\mathbb{R}\to\mathbb{R}\); one-one but not onto on \(\mathbb{N}\to\mathbb{N}\); bijective on \([0,\infty)\to[0,\infty)\).

Horizontal line test

One-one: every horizontal line cuts the graph at most once. Onto: every horizontal line at a codomain height cuts it at least once.

Common Mistakes

Ignoring the codomain

Onto depends on the codomain: \(e^x\) is not onto \(\mathbb{R}\) because negative numbers and 0 are never outputs.

Using one example to prove one-one

Showing two particular inputs give different outputs proves nothing; you must start from f(x₁) = f(x₂) in general.

Solved Examples

A bijection check

Show \(f:\mathbb{R}\to\mathbb{R},\ f(x)=5-2x\) is bijective.

Practice & Topic Test

Topic Practice

A fresh set of questions from this topic. Change answers freely – solutions appear after you submit.

Start Practice

Topic Test

Timed: up to 10 questions in 15 minutes.

Start Test

Topic Summary

Decide one-one by solving f(x₁) = f(x₂); decide onto by solving f(x) = y inside the domain. Always read the domain and codomain first.

Ready to practise this topic?

Create a free account to take practice sessions and tests, see detailed explanations and track your progress.

Create Student Account