impera Open Impera

A levels Mathematics · Pure: algebra and functions

Functions, composites and inverses

1Functions, domain and range

A function is a rule that assigns each input exactly one output. It is written $f(x) = 2x + 1$ or $f: x \mapsto 2x + 1$.

  • The domain is the set of allowed inputs.
  • The range is the set of outputs.

Functions are one-to-one (each output comes from one input) or many-to-one (different inputs can give the same output, such as $f(x) = x^2$, where $f(2) = f(-2) = 4$). A one-to-many mapping, like $y = \pm\sqrt{x}$, is not a function.

Worked example

Domain and range

  1. $f(x) = \sqrt{x - 3}$: the square root needs $x - 3 \geq 0$, so the domain is $x \geq 3$.
  2. Outputs are never negative, so the range is $f(x) \geq 0$.
  3. $g(x) = \dfrac{1}{x - 2}$: the domain is $x \in \mathbb{R}, x \neq 2$; the range is $g(x) \neq 0$.
Check yourself

What is the largest possible domain of f(x) = 1/(x + 5)?

  • x > −5, every value above −5

  • All real x except x = −5

  • x ≥ 0, the non-negative numbers

  • All real values of x

Show the answer

All real x except x = −5

Division by zero is not allowed.

2Composite functions

A composite function applies one function, then another. $fg(x)$ means "do $g$ first, then $f$": $fg(x) = f(g(x))$.

Worked example

Composites

  1. $f(x) = 2x + 3$ and $g(x) = x^2$.
  2. $fg(x) = f(x^2) = 2x^2 + 3$.
  3. $gf(x) = g(2x + 3) = (2x + 3)^2$.
  4. $fg(2) = 11$, but $gf(2) = 49$: order matters.

For $fg(x)$ to exist, the range of $g$ must lie within the domain of $f$.

Worked example

Solving with composites

  1. Solve $fg(x) = 21$ for the functions above.
  2. $2x^2 + 3 = 21$, so $x^2 = 9$, $x = \pm 3$.
Check yourself

If f(x) = x − 4 and g(x) = 3x, what is fg(x)?

  • 3x − 12

  • 3x − 4

  • x − 12

  • 3(x − 4)

Show the answer

3x − 4

Apply g first: f(3x) = 3x − 4.

3Inverse functions

The inverse function $f^{-1}$ reverses $f$: if $f(a) = b$, then $f^{-1}(b) = a$. Only one-to-one functions have inverses.

To find $f^{-1}(x)$:

  1. Write $y = f(x)$.
  2. Rearrange to make $x$ the subject.
  3. Swap $x$ and $y$.
Worked example

Finding an inverse

  1. $f(x) = \dfrac{3x - 1}{2}$.
  2. $y = \dfrac{3x - 1}{2} \Rightarrow 2y = 3x - 1 \Rightarrow x = \dfrac{2y + 1}{3}$.
  3. $f^{-1}(x) = \dfrac{2x + 1}{3}$.

Key facts:

  • The domain of $f^{-1}$ is the range of $f$, and the range of $f^{-1}$ is the domain of $f$.
  • $ff^{-1}(x) = f^{-1}f(x) = x$.
Check yourself

What is the inverse of f(x) = 5x + 2?

  • (x − 2)/5

  • 1/(5x + 2)

  • 5x − 2

  • (x + 2)/5

Show the answer

(x − 2)/5

Rearrange y = 5x + 2 for x, then swap.

4Graphs of inverses

The graph of $y = f^{-1}(x)$ is the reflection of $y = f(x)$ in the line $y = x$.

A function and its inverse are reflections of each other in the line y = x

Many-to-one functions can be given an inverse by restricting the domain so they become one-to-one.

Worked example

Restricting the domain

  1. $f(x) = (x - 1)^2 + 2$ is many-to-one for all real $x$.
  2. Restrict the domain to $x \geq 1$, the right half of the parabola.
  3. $y = (x - 1)^2 + 2 \Rightarrow x = 1 + \sqrt{y - 2}$.
  4. $f^{-1}(x) = 1 + \sqrt{x - 2}$, with domain $x \geq 2$.
Check yourself

In which line is the graph of f⁻¹ a reflection of the graph of f?

  • y = −x

  • y = 0

  • y = x

  • x = 0

Show the answer

y = x

Swapping x and y reflects in y = x.

5Graph transformations

Transformations of $y = f(x)$:

  • $y = f(x) + a$: translation by $a$ units up.
  • $y = f(x + a)$: translation by $a$ units left (vector $\binom{-a}{0}$).
  • $y = af(x)$: vertical stretch, scale factor $a$.
  • $y = f(ax)$: horizontal stretch, scale factor $\frac{1}{a}$.
  • $y = -f(x)$: reflection in the $x$-axis.
  • $y = f(-x)$: reflection in the $y$-axis.

Changes inside the bracket affect $x$ and work "the opposite way" to what you might expect.

Worked example

Transforming a point

  1. $y = f(x)$ has a maximum at $(2, 5)$.
  2. $y = f(x - 3)$: maximum at $(5, 5)$.
  3. $y = 2f(x)$: maximum at $(2, 10)$.
  4. $y = f(2x)$: maximum at $(1, 5)$.
Check yourself

The graph of y = f(x + 4) is the graph of y = f(x) translated…

  • 4 units down

  • 4 units up

  • 4 units to the right

  • 4 units to the left

Show the answer

4 units to the left

Inside the bracket, + moves left.

6Combining transformations

When several transformations are combined, apply them in order, tracking a key point.

Worked example

Two transformations

  1. Describe how $y = 3f(x) - 1$ is obtained from $y = f(x)$.
  2. First a vertical stretch, scale factor 3; then a translation of 1 unit down.
  3. A point $(4, 2)$ maps to $(4, 6)$, then to $(4, 5)$.
Worked example

Using function notation

  1. $f(x) = x^2$. Write $y = (x - 2)^2 + 3$ in terms of $f$.
  2. $y = f(x - 2) + 3$: a translation by vector $\binom{2}{3}$.
Check yourself

Point (3, 4) lies on y = f(x). Where does it move on y = −f(x)?

  • (4, 3)

  • (−3, −4)

  • (3, −4)

  • (−3, 4)

Show the answer

(3, −4)

Reflection in the x-axis changes the sign of y.

Now test yourself

This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.

Practise in Impera