impera Open Impera

A levels Mathematics · Pure: algebra and functions

The modulus function

1What the modulus is

The modulus of a number, $|x|$, is its non-negative size, ignoring the sign.

$$|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$

So $|5| = 5$, $|-5| = 5$ and $|0| = 0$.

Geometrically, $|x - a|$ is the distance between $x$ and $a$ on the number line. For example, $|x - 3| < 2$ means "$x$ is within 2 of 3", so $1 < x < 5$.

Useful facts:

  • $|ab| = |a||b|$
  • $\left|\dfrac{a}{b}\right| = \dfrac{|a|}{|b|}$
  • $|a + b| \leq |a| + |b|$ (the triangle inequality)
  • $\sqrt{x^2} = |x|$
Check yourself

What is |3 − 8|?

  • 5

  • 11

  • −11

  • −5

Show the answer

5

|−5| = 5.

2Graphs of y = |f(x)|

To sketch $y = |f(x)|$:

  1. Sketch $y = f(x)$.
  2. Reflect any part below the $x$-axis in the $x$-axis.
  3. The part above stays the same.

The graph is never below the $x$-axis.

y = |2x − 3|: the part of the line below the x-axis is reflected upwards, making a V shape

Worked example

Sketching y = |2x − 3|

  1. $y = 2x - 3$ crosses the $x$-axis at $x = \frac{3}{2}$ and the $y$-axis at $-3$.
  2. Reflect the part below the axis.
  3. The graph is a V shape with vertex $\left(\frac{3}{2}, 0\right)$ and $y$-intercept $(0, 3)$.
Check yourself

What does the graph y = |f(x)| do to parts of y = f(x) below the x-axis?

  • Reflects them in the x-axis

  • Translates them up

  • Removes them

  • Reflects them in the y-axis

Show the answer

Reflects them in the x-axis

Negative outputs become positive.

3Graphs of y = f(|x|)

To sketch $y = f(|x|)$:

  1. Sketch $y = f(x)$ for $x \geq 0$ only.
  2. Reflect this part in the $y$-axis.

The graph is symmetric about the $y$-axis, because $f(|-x|) = f(|x|)$.

Worked example

y = |x|² − 4|x|

  1. For $x \geq 0$: $y = x^2 - 4x = x(x - 4)$, with roots $0$ and $4$ and minimum at $(2, -4)$.
  2. Reflect in the $y$-axis: roots also at $-4$, and a minimum at $(-2, -4)$.
  3. The graph is a "W" shape, symmetric about the $y$-axis.
Check yourself

Which axis of symmetry does y = f(|x|) always have?

  • None

  • The line y = x

  • The y-axis

  • The x-axis

Show the answer

The y-axis

Inputs x and −x give the same output.

4Solving modulus equations

To solve $|f(x)| = g(x)$, solve the two cases $f(x) = g(x)$ and $f(x) = -g(x)$, then check each answer, because some may not satisfy the original equation.

A sketch shows how many solutions to expect.

Worked example

Modulus equals a constant

  1. Solve $|2x - 1| = 5$.
  2. $2x - 1 = 5$ gives $x = 3$; $2x - 1 = -5$ gives $x = -2$.
Worked example

Modulus equals a line

  1. Solve $|x - 4| = 2x + 1$.
  2. Case 1: $x - 4 = 2x + 1$ gives $x = -5$. Check: $|{-9}| = 9$, but $2(-5) + 1 = -9$. Reject.
  3. Case 2: $x - 4 = -(2x + 1)$ gives $3x = 3$, $x = 1$. Check: $|{-3}| = 3$ and $2(1) + 1 = 3$ ✓.
  4. Solution: $x = 1$.
Check yourself

Why must you check solutions to |f(x)| = g(x)?

  • Because modulus equations never have any real solutions

  • Because calculators often make errors with a modulus

  • Some may give a negative g(x), which a modulus cannot equal

  • Checking is never necessary for a modulus equation

Show the answer

Some may give a negative g(x), which a modulus cannot equal

A modulus is never negative.

5Solving modulus inequalities

Key results, for $a > 0$:

  • $|x| < a \Leftrightarrow -a < x < a$.
  • $|x| > a \Leftrightarrow x < -a$ or $x > a$.

For harder inequalities, sketch both graphs, find intersections, and read off the required region.

Worked example

Simple inequality

  1. Solve $|3x + 2| \leq 7$.
  2. $-7 \leq 3x + 2 \leq 7$.
  3. $-9 \leq 3x \leq 5$, so $-3 \leq x \leq \frac{5}{3}$.
Worked example

Inequality with two moduli

  1. Solve $|x - 1| > |x + 3|$.
  2. Squaring both sides (both are non-negative): $(x - 1)^2 > (x + 3)^2$.
  3. $x^2 - 2x + 1 > x^2 + 6x + 9$, so $-8x > 8$, giving $x < -1$.
Check yourself

What is the solution of |x| < 4?

  • x > −4

  • x < −4 or x > 4

  • x < 4

  • −4 < x < 4

Show the answer

−4 < x < 4

x is within 4 of zero.

6Modulus with transformations

Modulus graphs combine with transformations.

Worked example

y = a|x − b| + c

  1. Sketch $y = 2|x - 1| - 4$.
  2. Start with $y = |x|$: a V with vertex at the origin.
  3. Translate 1 right: vertex $(1, 0)$. Stretch vertically by 2: steeper V. Translate 4 down: vertex $(1, -4)$.
  4. $x$-intercepts: $2|x - 1| = 4$, so $|x - 1| = 2$, giving $x = -1$ and $x = 3$.
  5. $y$-intercept: $2|{-1}| - 4 = -2$.

Questions often ask for the number of solutions of $f(x) = k$; a sketch of $y = f(x)$ with a horizontal line $y = k$ answers this quickly.

Check yourself

What is the vertex of y = |x + 2| + 3?

  • (3, −2)

  • (−2, −3)

  • (2, 3)

  • (−2, 3)

Show the answer

(−2, 3)

Translate y = |x| by 2 left and 3 up.

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