Skip to content
MathsGenie logo
Quick links
Open app

Course home

  1. A Level
  2. Maths OCR
  3. Revision guides

1.2.12 The modulus function (A-level only)

What you'll learn

  • What modulus notation means and how to evaluate expressions involving it.
  • How to sketch modulus graphs using reflection and transformations.
  • How to solve equations involving one or more modulus expressions.
  • How to interpret and solve modulus inequalities using distance and algebra.

Modulus as distance

The modulus or absolute value of a real number is its distance from zero on the number line. Distance cannot be negative, so modulus always produces a non-negative answer.

For example, 5 and −5-5−5 are both 5 units from zero. Therefore:

∣5∣=5and∣−5∣=5|5|=5 \qquad\text{and}\qquad |-5|=5∣5∣=5and∣−5∣=5

The vertical bars in ∣x∣|x|∣x∣ are modulus signs, not brackets.

Definition

The modulus function

For any real number xxx,

∣x∣={x,x≥0,−x,x<0.|x|= \begin{cases} x, & x\ge 0,\\ -x, & x<0. \end{cases}∣x∣={x,−x,​x≥0,x<0.​

In particular, ∣x∣≥0|x|\ge 0∣x∣≥0 for every real value of xxx.

The second part of the definition can seem surprising. If xxx is negative, then −x-x−x is positive. For example, if x=−7x=-7x=−7, then −x=7-x=7−x=7.

Example

Evaluating modulus expressions

Evaluate ∣3−8∣+∣−4∣|3-8|+|-4|∣3−8∣+∣−4∣.

  1. Calculate the expressions inside the modulus signs: 3−8=−53-8=-53−8=−5, while the second value is already −4-4−4.
  2. Take each distance from zero: ∣−5∣=5|-5|=5∣−5∣=5 and ∣−4∣=4|-4|=4∣−4∣=4.
  3. Add the resulting non-negative values to obtain 5+4=95+4=95+4=9.
Common Mistake

Treating modulus signs as brackets

You cannot simply remove modulus signs. For instance, ∣−3∣=3|-3|=3∣−3∣=3, not −3-3−3. Evaluate the expression inside first, then apply the modulus.

The graph of the modulus function

The graph of y=∣x∣y=|x|y=∣x∣ is made from two straight-line pieces:

  • when x≥0x\ge 0x≥0, it follows y=xy=xy=x;
  • when x<0x<0x<0, it follows y=−xy=-xy=−x.

These pieces meet at the vertex, meaning the point where the graph changes direction, at (0,0)(0,0)(0,0). The result is a V-shaped graph.

You can obtain it from y=xy=xy=x by reflecting the part below the xxx-axis upwards. More generally, the graph of y=∣f(x)∣y=|f(x)|y=∣f(x)∣ is formed by keeping the parts of y=f(x)y=f(x)y=f(x) on or above the xxx-axis and reflecting every part below the xxx-axis in the xxx-axis.

The graph of the modulus function and the distance interpretation of a modulus inequality

Key Idea

Modulus reflects negative outputs

To sketch y=∣f(x)∣y=|f(x)|y=∣f(x)∣, leave every point with f(x)≥0f(x)\ge 0f(x)≥0 unchanged and replace every negative output by its positive counterpart. The xxx-coordinates do not change.

Example

Sketching a transformed modulus graph

Sketch y=∣x−2∣+1y=|x-2|+1y=∣x−2∣+1 and identify its vertex.

  1. Begin with y=∣x∣y=|x|y=∣x∣, whose vertex is (0,0)(0,0)(0,0).
  2. Replacing xxx by x−2x-2x−2 translates the graph 2 units to the right, moving the vertex to (2,0)(2,0)(2,0).
  3. Adding 1 translates the graph 1 unit upwards, so the final vertex is (2,1)(2,1)(2,1). The graph remains V-shaped, with gradients −1-1−1 and 1 on its two branches.
Tip

Check the vertex

For y=∣x−a∣+cy=|x-a|+cy=∣x−a∣+c, the expression inside the modulus is zero when x=ax=ax=a. The vertex is therefore (a,c)(a,c)(a,c).

Equations of the form ∣f(x)∣=k|f(x)|=k∣f(x)∣=k

If k>0k>0k>0, the equation ∣f(x)∣=k|f(x)|=k∣f(x)∣=k says that f(x)f(x)f(x) is a distance kkk from zero. There are therefore two possibilities:

f(x)=korf(x)=−kf(x)=k \qquad\text{or}\qquad f(x)=-kf(x)=korf(x)=−k

If k=0k=0k=0, there is only one condition: f(x)=0f(x)=0f(x)=0. If k<0k<0k<0, there are no real solutions because a modulus cannot be negative.

Example

Solving a linear modulus equation

Solve ∣2x−3∣=7|2x-3|=7∣2x−3∣=7.

  1. Split the equation into the two possible cases:

    2x−3=7or2x−3=−72x-3=7 \qquad\text{or}\qquad 2x-3=-72x−3=7or2x−3=−7
  2. Solve the first equation: 2x=102x=102x=10, so x=5x=5x=5.

  3. Solve the second equation: 2x=−42x=-42x=−4, so x=−2x=-2x=−2. Both values satisfy the original equation, so the solution set is x=5x=5x=5 or x=−2x=-2x=−2.

The relation ∣a∣=∣b∣|a|=|b|∣a∣=∣b∣

Two numbers have equal modulus precisely when they have the same square:

∣a∣=∣b∣⟺a2=b2|a|=|b| \quad\Longleftrightarrow\quad a^2=b^2∣a∣=∣b∣⟺a2=b2

The symbol ⟺\Longleftrightarrow⟺ means if and only if, often shortened to “iff”. It says that each statement implies the other.

This relation works because squaring, like modulus, removes the sign. Equivalently:

a2=b2⇒(a−b)(a+b)=0⇒a=b or a=−ba^2=b^2 \Rightarrow (a-b)(a+b)=0 \Rightarrow a=b\text{ or }a=-ba2=b2⇒(a−b)(a+b)=0⇒a=b or a=−b
Example

Solving an equation with modulus on both sides

Solve ∣2x−1∣=∣x+5∣|2x-1|=|x+5|∣2x−1∣=∣x+5∣.

  1. Use ∣a∣=∣b∣|a|=|b|∣a∣=∣b∣ iff a2=b2a^2=b^2a2=b2:

    (2x−1)2=(x+5)2(2x-1)^2=(x+5)^2(2x−1)2=(x+5)2
  2. Use the difference of two squares:

    ((2x−1)−(x+5))((2x−1)+(x+5))=0\big((2x-1)-(x+5)\big)\big((2x-1)+(x+5)\big)=0((2x−1)−(x+5))((2x−1)+(x+5))=0

    This simplifies to (x−6)(3x+4)=0(x-6)(3x+4)=0(x−6)(3x+4)=0.

  3. Set each factor equal to zero, giving x=6x=6x=6 or x=−43x=-\frac{4}{3}x=−34​.

Tip

A quicker equivalent method

From ∣f(x)∣=∣g(x)∣|f(x)|=|g(x)|∣f(x)∣=∣g(x)∣, you may write f(x)=g(x)f(x)=g(x)f(x)=g(x) or f(x)=−g(x)f(x)=-g(x)f(x)=−g(x). This is equivalent to squaring both sides and often reduces the algebra.

Modulus inequalities as distances

The expression ∣x−a∣|x-a|∣x−a∣ is the distance between xxx and aaa on a number line.

Therefore, ∣x−a∣<b|x-a|<b∣x−a∣<b means that xxx is less than bbb units away from aaa. Provided b>0b>0b>0:

∣x−a∣<b⟺a−b<x<a+b|x-a|<b \quad\Longleftrightarrow\quad a-b<x<a+b∣x−a∣<b⟺a−b<x<a+b

The solution is the open interval centred at a‘,extendinga`, extending a‘,extendingb$ units in each direction. The endpoints are excluded because the inequality is strict.

Similarly:

∣x−a∣≤b⟺a−b≤x≤a+b|x-a|\le b \quad\Longleftrightarrow\quad a-b\le x\le a+b∣x−a∣≤b⟺a−b≤x≤a+b
Example

Solving a modulus inequality using distance

Solve ∣x−4∣<3|x-4|<3∣x−4∣<3.

  1. Interpret the expression as the distance between xxx and 4. This distance must be less than 3.
  2. Move 3 units to either side of the centre 4: the endpoints are 4−3=14-3=14−3=1 and 4+3=74+3=74+3=7.
  3. Since the inequality is strict, exclude both endpoints. The solution is 1<x<71<x<71<x<7.

You can also apply the standard result after rearranging a linear expression.

Example

Rearranging a linear modulus inequality

Solve ∣2x−5∣≤7|2x-5|\le 7∣2x−5∣≤7.

  1. Rewrite the modulus inequality as a compound inequality:

    −7≤2x−5≤7-7\le 2x-5\le 7−7≤2x−5≤7
  2. Add 5 to all three parts:

    −2≤2x≤12-2\le 2x\le 12−2≤2x≤12
  3. Divide all three parts by 2 to obtain −1≤x≤6-1\le x\le 6−1≤x≤6.

Inequalities outside an interval

If ∣x−a∣>b|x-a|>b∣x−a∣>b, then the distance between xxx and aaa is greater than bbb. The solutions lie outside the interval:

∣x−a∣>b⟺x<a−borx>a+b|x-a|>b \quad\Longleftrightarrow\quad x<a-b \quad\text{or}\quad x>a+b∣x−a∣>b⟺x<a−borx>a+b

For ≥\ge≥, include the endpoints.

Key Idea

Inside or outside

For positive bbb, “less than” gives values between a−ba-ba−b and $a+b`, while “greater than” gives values outside those boundaries.

Example

Solving an outside-interval inequality

Solve ∣3x+1∣≥5|3x+1|\ge 5∣3x+1∣≥5.

  1. A modulus is at least 5 when its contents are at least 5 or at most −5-5−5:

    3x+1≥5or3x+1≤−53x+1\ge 5 \qquad\text{or}\qquad 3x+1\le -53x+1≥5or3x+1≤−5
  2. Solve the first inequality: 3x≥43x\ge 43x≥4, so x≥43x\ge\frac{4}{3}x≥34​.

  3. Solve the second inequality: 3x≤−63x\le-63x≤−6, so x≤−2x\le-2x≤−2. Hence x≤−2x\le-2x≤−2 or x≥43x\ge\frac{4}{3}x≥34​.

Common Mistake

Check the right-hand side

The usual interval rules assume b>0b>0b>0. If the right-hand side is zero or negative, reason from ∣f(x)∣≥0|f(x)|\ge 0∣f(x)∣≥0 instead of applying the rule automatically.

Common Mistake

Using and instead of or

A greater-than modulus inequality normally produces two separate regions, joined by or. A value cannot usually lie to the left and right of the interval at the same time.

Exam technique

In the exam

  1. Interpret modulus as distance, then decide whether the solution should lie inside an interval or outside it.
  2. For equations, include both sign possibilities and substitute solutions back when you have squared or performed non-reversible algebra.
  3. Show endpoint inclusion clearly: use <<< or >>> with open endpoints, and ≤\le≤ or ≥\ge≥ with included endpoints.
  4. Check that your answer is possible: a modulus can never equal or be less than a negative number.
Self review

Check yourself

  • How would you sketch y=∣x+3∣−2y=|x+3|-2y=∣x+3∣−2, and where is its vertex?
  • Can you solve ∣4x−1∣=∣x+8∣|4x-1|=|x+8|∣4x−1∣=∣x+8∣ using both the squaring method and the two-case method?
  • What is the difference between the solution sets of ∣x−5∣<2|x-5|<2∣x−5∣<2 and ∣x−5∣>2|x-5|>2∣x−5∣>2?

How was this guide?

Teach Genie

Review 1.2.12 The modulus function (A-level only) by teaching Genie

Teach it back in your own words, spot gaps, and remember it better.

Start teaching
Genie and Baby Genie

1.2.12 The modulus function (A-level only) Revision Guide

  1. A Level
  2. /Maths
  3. /1.2.12 The modulus function (A-level only)