๐Ÿ“ The Modulus Function

A Level Maths Year 2 ยท Algebra and Functions

Level 3 · Ages 17–18

← Back to topic overview
1 What the Modulus Means
Definition
$|x| = \begin{cases} x & \text{if } x \geqslant 0 \\ -x & \text{if } x < 0 \end{cases}$
The modulus (or absolute value) of a number is its size, ignoring the sign: $|7| = 7$ and $|-7| = 7$. Geometrically, $|x - a|$ is the distance between $x$ and $a$ on the number line. So $|x - 3| < 2$ means "$x$ is within $2$ of $3$".
PropertyExample
$|x| \geqslant 0$ for every $x$$|-0.4| = 0.4$
$|ab| = |a|\,|b|$$|-3 \times 5| = 3 \times 5 = 15$
$|x|^2 = x^2$$|-4|^2 = 16 = (-4)^2$
$|a + b| \leqslant |a| + |b|$$|3 + (-5)| = 2 \leqslant 8$
$-x$ is not always negative. If $x = -5$ then $-x = 5$. That is why the definition says $|x| = -x$ when $x < 0$.
2 The Graph of $y = |ax + b|$

Draw $y = ax + b$, then reflect any part below the $x$-axis in the $x$-axis. The result is a V shape.

-1 1 2 3 4 -5 -4 -3 -2 -1 1 2 3 4 5 6 x y (1.5, 0) (0, 3) y = |2x โˆ’ 3| y = 2x โˆ’ 3
Key features of $y = |ax + b|$
Vertex on the $x$-axis at $x = -\dfrac{b}{a}$  ยท  $y$-intercept $|b|$  ยท  arms of gradient $\pm a$
Worked Example 1 โ€” Sketching a V graph

Sketch $y = |2x - 3|$, labelling where it meets the axes.

โ‘ Vertex where $2x - 3 = 0$: $x = 1.5$. So the vertex is $(1.5, 0)$.
โ‘ก$y$-intercept: $|0 - 3| = 3$, so $(0, 3)$.
โ‘ขFor $x \geqslant 1.5$ the graph is $y = 2x - 3$ (gradient $2$); for $x < 1.5$ it is $y = 3 - 2x$ (gradient $-2$).
For a graph like $y = |2x - 3| + 1$ or $y = 4 - |x + 1|$, first sketch the V, then apply the extra translation or reflection. The vertex is no longer on the axis.
3 The Graph of $y = |\mathrm{f}(x)|$
The same rule works for any function: keep the parts of $y = \mathrm{f}(x)$ that are on or above the $x$-axis, and reflect the parts below the axis in the $x$-axis. The graph of $y = |\mathrm{f}(x)|$ is never below the axis.
-2 -1 1 2 3 4 -5 -4 -3 -2 -1 1 2 3 4 5 6 x y (1, 4) y = |xยฒ โˆ’ 2x โˆ’ 3| y = xยฒ โˆ’ 2x โˆ’ 3
Worked Example 2 โ€” Modulus of a quadratic

Sketch $y = |x^2 - 2x - 3|$, giving the coordinates of any turning points and intercepts.

โ‘ $x^2 - 2x - 3 = (x - 3)(x + 1)$: roots at $x = -1$ and $x = 3$.
โ‘กComplete the square: $(x - 1)^2 - 4$, so the original vertex is $(1, -4)$.
โ‘ขBetween the roots the curve is below the axis, so it is reflected. The vertex becomes a maximum at $(1, 4)$.
โ‘ฃ$y$-intercept: $|-3| = 3$, so $(0, 3)$. The graph touches the $x$-axis at $(-1, 0)$ and $(3, 0)$, forming sharp corners there.
Reading solutions from the graph. The number of solutions of $|\mathrm{f}(x)| = k$ is the number of times the horizontal line $y = k$ meets the graph. Above, $|x^2 - 2x - 3| = k$ has four solutions for $0 < k < 4$, three for $k = 4$, and two for $k > 4$.
4 Solving Modulus Equations
Three standard methods
$|A| = k \;(k \geqslant 0) \iff A = k \text{ or } A = -k$
$|A| = |B| \iff A^2 = B^2 \iff A = B \text{ or } A = -B$
$|A| = B$ (with $x$ in $B$): solve $A = B$ and $A = -B$, then check each answer
Worked Example 3 โ€” $|A| = k$

Solve $|2x - 3| = 5$.

โ‘ $2x - 3 = 5 \Rightarrow x = 4$
โ‘ก$2x - 3 = -5 \Rightarrow x = -1$
โ‘ข$x = 4$ or $x = -1$. (On the graph, $y = 5$ meets both arms of the V.)
Worked Example 4 โ€” $|A| = |B|$ by squaring

Solve $|x + 1| = |2x - 4|$.

โ‘ Both sides are non-negative, so squaring is safe: $(x + 1)^2 = (2x - 4)^2$.
โ‘ก$x^2 + 2x + 1 = 4x^2 - 16x + 16$
โ‘ข$3x^2 - 18x + 15 = 0 \Rightarrow x^2 - 6x + 5 = 0 \Rightarrow (x - 1)(x - 5) = 0$
โ‘ฃ$x = 1$ or $x = 5$. Check: $|2| = |-2|$ โœ“ and $|6| = |6|$ โœ“
Worked Example 5 โ€” $|A| = B$, with a rejected root

Solve $|x - 4| = 2x + 1$.

โ‘ Case $x - 4 = 2x + 1$: $x = -5$. But then $2x + 1 = -9 < 0$, and a modulus cannot equal a negative number. Reject.
โ‘กCase $-(x - 4) = 2x + 1$: $4 - x = 2x + 1$, so $x = 1$. Check: $|1 - 4| = 3$ and $2(1) + 1 = 3$ โœ“
โ‘ขThe only solution is $x = 1$.
When the right-hand side contains $x$ it can be negative, and then a "solution" from one of the cases is false. A sketch of the V and the line shows immediately that they cross only once.
Worked Example 6 โ€” Modulus of a quadratic

Solve $|x^2 - 4| = 3$.

โ‘ $x^2 - 4 = 3 \Rightarrow x^2 = 7 \Rightarrow x = \pm\sqrt{7}$
โ‘ก$x^2 - 4 = -3 \Rightarrow x^2 = 1 \Rightarrow x = \pm 1$
โ‘ขFour solutions: $x = -\sqrt{7},\; -1,\; 1,\; \sqrt{7}$.
5 Solving Modulus Inequalities
Inequalities with a constant ($b > 0$)
$|x - a| < b \iff a - b < x < a + b$   (within $b$ of $a$)
$|x - a| > b \iff x < a - b \text{ or } x > a + b$   (more than $b$ from $a$)
Worked Example 7 โ€” "Less than" gives one interval

Solve $|2x - 1| < 7$.

โ‘ $-7 < 2x - 1 < 7$
โ‘กAdd $1$: $-6 < 2x < 8$. Divide by $2$: $-3 < x < 4$.
Worked Example 8 โ€” "Greater than" gives two intervals

Solve $|3x + 2| \geqslant 4$.

โ‘ $3x + 2 \geqslant 4$ or $3x + 2 \leqslant -4$.
โ‘ก$x \geqslant \tfrac{2}{3}$ or $x \leqslant -2$.
Worked Example 9 โ€” Modulus on both sides

Solve $|2x - 1| > |x + 2|$.

โ‘ Both sides are non-negative, so square: $4x^2 - 4x + 1 > x^2 + 4x + 4$.
โ‘ก$3x^2 - 8x - 3 > 0 \Rightarrow (3x + 1)(x - 3) > 0$.
โ‘ขA positive quadratic is positive outside its roots: $x < -\tfrac13$ or $x > 3$.
โ‘ฃCheck a value in each region: $x = 0$ gives $1 > 2$, false โœ“; $x = 4$ gives $7 > 6$, true โœ“.
Worked Example 10 โ€” Modulus against a line

Solve $|x - 2| < 2x - 1$.

โ‘ Find where the graphs meet. $x - 2 = 2x - 1$ gives $x = -1$, but then $2x - 1 = -3 < 0$: reject.
โ‘ก$-(x - 2) = 2x - 1$ gives $3x = 3$, $x = 1$. Check: $|{-1}| = 1 = 2(1) - 1$ โœ“
โ‘ขThe line $y = 2x - 1$ is steeper than either arm of the V, so it is above the V to the right of $x = 1$. Test $x = 3$: $1 < 5$ โœ“.
โ‘ฃ$x > 1$
6 Quick Reference

Meaning

$|x - a|$ is the distance from $x$ to $a$.

$y = |ax+b|$

V shape, vertex at $x = -\tfrac{b}{a}$.

$y = |\mathrm{f}(x)|$

Reflect the parts below the $x$-axis.

$|A| = k$

$A = k$ or $A = -k$.

$|A| = |B|$

Square both sides, or $A = \pm B$.

$|A| = B$

Solve both cases, then check $B \geqslant 0$.

$|x-a| < b$

$a - b < x < a + b$.

$|x-a| > b$

$x < a - b$ or $x > a + b$.

Sketch first

The picture tells you how many solutions to expect.

7 Practice Questions
Question 1

Sketch $y = |3x - 6|$, stating the coordinates of the vertex and the $y$-intercept.

โ–ถ Show solution

Vertex where $3x - 6 = 0$: $(2, 0)$.

$y$-intercept: $|-6| = 6$, so $(0, 6)$.

A V shape with arms of gradient $-3$ (left) and $3$ (right).

Question 2

Solve $|3x + 1| = 8$.

โ–ถ Show solution

$3x + 1 = 8 \Rightarrow x = \tfrac{7}{3}$

$3x + 1 = -8 \Rightarrow x = -3$

Question 3

Solve $|x - 5| < 3$, and describe the answer in words.

โ–ถ Show solution

$-3 < x - 5 < 3 \Rightarrow 2 < x < 8$.

These are the numbers less than $3$ away from $5$.

Question 4

Solve $|2x + 3| \geqslant 5$.

โ–ถ Show solution

$2x + 3 \geqslant 5 \Rightarrow x \geqslant 1$

$2x + 3 \leqslant -5 \Rightarrow x \leqslant -4$

$x \leqslant -4$ or $x \geqslant 1$.

Question 5

Solve $|x + 3| = |2x - 1|$.

โ–ถ Show solution

Square: $x^2 + 6x + 9 = 4x^2 - 4x + 1$, so $3x^2 - 10x - 8 = 0$.

$(3x + 2)(x - 4) = 0$, giving $x = 4$ or $x = -\tfrac23$.

Check: $x = 4$: $7 = 7$ โœ“.  $x = -\tfrac23$: $\tfrac73 = \left|-\tfrac73\right|$ โœ“

Question 6

Solve $|x + 2| = 2x + 7$.

โ–ถ Show solution

Case $x + 2 = 2x + 7$: $x = -5$. Then $2x + 7 = -3 < 0$, impossible for a modulus. Reject.

Case $-(x + 2) = 2x + 7$: $-3x = 9$, $x = -3$. Check: $|-1| = 1$ and $2(-3) + 7 = 1$ โœ“

The only solution is $x = -3$.

Question 7

Solve $|x^2 - 5| = 4$.

โ–ถ Show solution

$x^2 - 5 = 4 \Rightarrow x^2 = 9 \Rightarrow x = \pm 3$

$x^2 - 5 = -4 \Rightarrow x^2 = 1 \Rightarrow x = \pm 1$

$x = -3, -1, 1, 3$.

Question 8

Solve $|x - 1| > |x + 3|$, and explain the answer using distances on the number line.

โ–ถ Show solution

Square: $x^2 - 2x + 1 > x^2 + 6x + 9$, so $-8x > 8$, giving $x < -1$ (dividing by $-8$ reverses the sign).

$|x - 1|$ is the distance from $x$ to $1$ and $|x + 3|$ is the distance from $x$ to $-3$. The point exactly halfway between $-3$ and $1$ is $-1$, and $x$ is further from $1$ than from $-3$ exactly when it is to the left of $-1$.

Question 9

Sketch $y = |x^2 - 4x|$ and hence find the set of values of $k$ for which $|x^2 - 4x| = k$ has exactly four solutions.

โ–ถ Show solution

$x^2 - 4x = x(x - 4) = (x - 2)^2 - 4$: roots $0$ and $4$, minimum $(2, -4)$.

Reflect the part between $0$ and $4$: the graph touches the $x$-axis at $(0,0)$ and $(4,0)$ and has a local maximum at $(2, 4)$.

A horizontal line $y = k$ meets the graph four times when it is above the axis but below the hump: $0 < k < 4$.

(For $k = 4$ there are three solutions; for $k > 4$, two; for $k = 0$, two.)

Question 10

A machine fills bags of flour with a nominal mass of $500$ g. A bag is accepted if its mass $m$ grams satisfies $|m - 500| \leqslant 8$.

(a) Write the acceptable masses as an interval.   (b) As the machine warms up, the mass it delivers $t$ hours after switching on is modelled by $m = 495 + 2t$. Find the times for which the bags are accepted.   (c) At what time does the machine deliver exactly the nominal mass?   (d) Give one reason why the model may not be valid for large $t$.

โ–ถ Show solution

(a) $-8 \leqslant m - 500 \leqslant 8$, so $492 \leqslant m \leqslant 508$.

(b) $|495 + 2t - 500| \leqslant 8 \Rightarrow |2t - 5| \leqslant 8$.

$-8 \leqslant 2t - 5 \leqslant 8 \Rightarrow -3 \leqslant 2t \leqslant 13 \Rightarrow -1.5 \leqslant t \leqslant 6.5$.

But $t \geqslant 0$, so bags are accepted for $0 \leqslant t \leqslant 6.5$ hours.

(c) $|2t - 5| = 0$ when $t = 2.5$ hours.

(d) The model has the mass increasing without limit, which is unrealistic: in practice the machine would reach a steady temperature, or be recalibrated, so the mass would level off.

The Modulus Function · A Level Maths Year 2 · Created with MathJax