Back to homeMathematics · 5th Year HL · Change subject
Start for free
5th Year HL · Mathematics
Functions, Induction and Further Trigonometry · Functions and their graphs

Injective, surjective and bijective functions and inverses

A thermometer in a classroom in Cork reads 20°C. The formula $F = 1.8C + 32$ turns it into Fahrenheit. Can you always go back again, from any Fahrenheit reading to the one Celsius temperature it came from? For this formula you can. For other functions, such as $f(x) = x^2$, you cannot. This page explains when a function can be reversed and how to find its inverse.

Domain, codomain and range

A function $f: A \to B$ has three sets attached to it.

The range is always inside the codomain, but it may be smaller. For $f:\mathbb{R}\to\mathbb{R}$, $f(x) = x^2$, the codomain is all of $\mathbb{R}$, but squares are never negative, so the range is $[0, \infty)$.

Practice★☆☆Not started
Let $f:\mathbb{R}\to\mathbb{R}$, $f(x) = x^2 + 1$. a) Find the range of $f$. b) Is $f$ surjective? Give a reason. c) Is $f$ bijective? Give a reason.

Let $f:\mathbb{R}\to\mathbb{R}$, $f(x) = x^2 + 1$.

  1. a) Find the range of $f$.
  2. b) Is $f$ surjective? Give a reason.
  3. c) Is $f$ bijective? Give a reason.
Solve

Injective, surjective, bijective

Compare two functions using a mapping diagram.

Two mapping diagrams: f(x) = x² sends −2 and 2 to the same value 4, so it is not injective; x + 1 sends each input to a different output but misses the value 3, so it is injective but not surjective. −2 0 2 4 0 9 −1 0 1 0 1 2 3 x² : not injective x + 1 on {−1, 0, 1}: injective codomain {0, 1, 2, 3}: 3 not reached

In the left diagram, $-2$ and $2$ share the output 4, so it is not injective. In the right diagram, the function $x + 1$ has domain $\{-1, 0, 1\}$ and codomain $\{0, 1, 2, 3\}$. Nobody maps to 3, so with this codomain it is not surjective. Surjectivity depends on the codomain chosen: $x + 1$ is bijective as a function $\mathbb{R}\to\mathbb{R}$.

Two tests

Horizontal line test. Draw horizontal lines across the graph. If some line cuts the graph more than once, two inputs share an output and $f$ is not injective.

Algebraic test. Assume $f(x_1) = f(x_2)$ and try to prove $x_1 = x_2$. If you can, $f$ is injective. To show a function is not injective, you only need one counter-example: two different inputs with the same output.

Drag the slider $a$: the horizontal line $y = a$ cuts $y = x^2$ twice for every $a > 0$, so $x^2$ fails the test on $\mathbb{R}$.

Practice★☆☆Not started
State whether each function $f:\mathbb{R}\to\mathbb{R}$ is injective (one-to-one), giving a reason. a) $f(x) = 3x + 1$ b) $f(x) = x^2$ c) $f(x) = x^3$

State whether each function $f:\mathbb{R}\to\mathbb{R}$ is injective (one-to-one), giving a reason.

  1. a) $f(x) = 3x + 1$
  2. b) $f(x) = x^2$
  3. c) $f(x) = x^3$
Solve

The inverse function

An inverse "undoes" a function. If $f$ sends $x$ to $y$, then $f^{-1}$ sends $y$ back to $x$.

Why bijective? Injective means each output came from only one input, so going back is unambiguous. Surjective means every element of $B$ has something to go back to, so $f^{-1}$ is defined on all of $B$.

The domain of $f^{-1}$ is the range of $f$, and the range of $f^{-1}$ is the domain of $f$.

Method

  1. Write $y = f(x)$.

  2. Swap roles: solve the equation for $x$ in terms of $y$.

  3. Replace $y$ by $x$ in the result to get $f^{-1}(x)$.

  4. State the domain of $f^{-1}$ (the range of $f$).

The graph of the inverse

Swapping $x$ and $y$ reflects the graph in the line $y = x$. In the picture below, the lines $y = ax + b$ and its inverse are mirror images across $y = x$.

Rational functions

The same two solutions come from $f(x) = x$: here $x = \dfrac{2x+1}{x-3}$ gives $x^2 - 5x - 1 = 0$ directly, so both meeting points lie on the mirror line $y = x$.

Practice★☆☆Not started
Find the inverse function $f^{-1}(x)$ of $f(x) = 4x - 7$, where $f:\mathbb{R}\to\mathbb{R}$. Verify that $f(f^{-1}(x)) = x$.

Find the inverse function $f^{-1}(x)$ of $f(x) = 4x - 7$, where $f:\mathbb{R}\to\mathbb{R}$. Verify that $f(f^{-1}(x)) = x$.

Solve
Practice★★☆Not started
The temperature in degrees Celsius in a classroom in Cork is converted to Fahrenheit by $F(C) = 1.8C + 32$. a) Find the inverse function $C(F)$. b) Find the Celsius…

The temperature in degrees Celsius in a classroom in Cork is converted to Fahrenheit by $F(C) = 1.8C + 32$.

  1. a) Find the inverse function $C(F)$.
  2. b) Find the Celsius temperature when it is 68°F.
  3. c) Show that the graphs of $F$ and its inverse, when drawn on the same axes with the same variable $x$, meet at exactly one point, and find that point.
Solve
Practice★★☆Not started
Let $f(x) = \dfrac{2x+1}{x-3}$ for $x \in \mathbb{R}\setminus\{3\}$. a) Find $f^{-1}(x)$. b) State the domain of $f^{-1}$. c) Find the values of $x$ for which…

Let $f(x) = \dfrac{2x+1}{x-3}$ for $x \in \mathbb{R}\setminus\{3\}$.

  1. a) Find $f^{-1}(x)$.
  2. b) State the domain of $f^{-1}$.
  3. c) Find the values of $x$ for which $f(x) = f^{-1}(x)$, i.e. solve $f(x)=f^{-1}(x)$ and describe the result.
Solve

Restricting the domain

$f(x) = x^2$ is not injective on $\mathbb{R}$, so it has no inverse there. But we can choose a smaller domain on which it is injective. Taking only $x \ge 0$ gives a one-to-one function with the inverse $\sqrt{x}$.

For a quadratic, the turning point splits the parabola into two one-to-one halves. Completing the square tells you where the split is.

Using the derivative

For cubics and other curves, use $f'(x)$. Take $f(x) = x^3 - 3x$. It is not injective on $\mathbb{R}$, since $f(0) = 0 = f(\sqrt3)$. Its derivative is $f'(x) = 3x^2 - 3 = 3(x-1)(x+1)$. This is positive for $x > 1$ and $x < -1$, and negative between $-1$ and $1$. So $f$ is strictly increasing on $[1, \infty)$, hence injective there. Its range on that interval is $[f(1), \infty) = [-2, \infty)$.

Practice★★☆Not started
Let $f(x) = x^2 - 6x + 5$ with domain $x \geq 3$. a) Write $f(x)$ in the form $(x-p)^2 + q$. b) Explain why $f$ is injective on this domain. c) Find $f^{-1}(x)$ and…

Let $f(x) = x^2 - 6x + 5$ with domain $x \geq 3$.

  1. a) Write $f(x)$ in the form $(x-p)^2 + q$.
  2. b) Explain why $f$ is injective on this domain.
  3. c) Find $f^{-1}(x)$ and state its domain.
Solve
Practice★★★Not started
Let $f:\mathbb{R}\to\mathbb{R}$, $f(x) = x^3 - 3x$. a) Show that $f$ is not injective by finding two different values of $x$ with the same image. b) Find the largest…

Let $f:\mathbb{R}\to\mathbb{R}$, $f(x) = x^3 - 3x$.

  1. a) Show that $f$ is not injective by finding two different values of $x$ with the same image.
  2. b) Find the largest interval of the form $[1, \infty)$ or a subset on which $f$ is injective, justifying using the derivative.
  3. c) State a codomain for $f$ restricted to $[1,\infty)$ so that it is bijective.
Solve

Exponentials and general rational functions

Exponentials and logs

$f(x) = e^{2x} + 1$ is injective because $f'(x) = 2e^{2x} > 0$ for all $x$, so it is strictly increasing. Since $e^{2x}$ takes every positive value, the range is $(1, \infty)$. Taking this as the codomain makes $f$ bijective.

Equations such as $f(x) = f^{-1}(x+2)$ mix $e^{2x}$ with $\ln$, so they cannot usually be solved exactly. Checking that $f^{-1}(f(x)) = x$ is the useful skill.

The general rational function

Practice★★★Not started
Let $f(x) = e^{2x} + 1$ for $x \in \mathbb{R}$. a) Prove that $f$ is injective. b) Find the range of $f$ and hence a codomain making $f$ bijective. c) Find $f^{-1}(x)$,…

Let $f(x) = e^{2x} + 1$ for $x \in \mathbb{R}$.

  1. a) Prove that $f$ is injective.
  2. b) Find the range of $f$ and hence a codomain making $f$ bijective.
  3. c) Find $f^{-1}(x)$, state its domain, and solve $f(x) = f^{-1}(x+2)$ or explain why this cannot easily be solved algebraically; instead show that $f^{-1}(f(x)) = x$.
Solve
Practice★★★Not started
Let $f(x) = \dfrac{ax+b}{cx+d}$ with $ad - bc \neq 0$ and $c\neq 0$. a) Show that $f$ is injective on its domain. b) Find $f^{-1}(x)$. c) Show that $f = f^{-1}$ if and…

Let $f(x) = \dfrac{ax+b}{cx+d}$ with $ad - bc \neq 0$ and $c\neq 0$.

  1. a) Show that $f$ is injective on its domain.
  2. b) Find $f^{-1}(x)$.
  3. c) Show that $f = f^{-1}$ if and only if $a = -d$.
Solve

Summary

See all the exercises in this section