What you'll learn
- How to interpret and calculate the modulus of a real number.
- How to sketch graphs involving ∣f(x)∣|f(x)|∣f(x)∣ and f(∣x∣)f(|x|)f(∣x∣).
- How to solve equations and inequalities containing modulus signs.
- How modulus can model distances and absolute differences.
What is the modulus function?
The modulus of a real number is its distance from zero on the number line. It is written using vertical bars: ∣x∣|x|∣x∣.
Because distance cannot be negative, ∣x∣|x|∣x∣ is always non-negative.
For example:
- ∣5∣=5|5|=5∣5∣=5 because 5 is five units from zero.
- ∣−5∣=5|-5|=5∣−5∣=5 because negative 5 is also five units from zero.
- ∣0∣=0|0|=0∣0∣=0.
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.The second line changes the sign of a negative input, making the output positive.
Notice that ∣x∣|x|∣x∣ does not mean “remove the minus sign”. You must first determine whether the expression inside the modulus signs is positive or negative.
Evaluating modulus expressions
Find the value of ∣3−8∣+∣−4∣|3-8|+|-4|∣3−8∣+∣−4∣.
- Evaluate each expression inside the modulus signs: 3−8=−53-8=-53−8=−5, while the second value is already negative 4.
- Take each distance from zero: ∣−5∣=5|-5|=5∣−5∣=5 and ∣−4∣=4|-4|=4∣−4∣=4.
- Add the resulting non-negative values to obtain 5+4=95+4=95+4=9.
Modulus means distance
You can interpret ∣x∣|x|∣x∣ as the distance between xxx and zero. More generally, ∣x−a∣|x-a|∣x−a∣ is the distance between xxx and aaa.
The graph of the modulus function
The graph of y=∣x∣y=|x|y=∣x∣ consists of two straight-line sections:
- when x≥0x\ge 0x≥0, it follows y=xy=xy=x;
- when x<0x<0x<0, it follows y=−xy=-xy=−x.
These sections meet at the vertex, the point where the direction of the graph changes. Here, the vertex is the origin.

The graph has range y≥0y\ge 0y≥0 because a modulus output cannot be negative. It is also symmetric about the yyy-axis because ∣−x∣=∣x∣|-x|=|x|∣−x∣=∣x∣.
Translations and stretches
A graph such as
y=a∣x−h∣+ky=a|x-h|+ky=a∣x−h∣+khas its vertex at (h,k)(h,k)(h,k).
- hhh translates the graph horizontally.
- kkk translates it vertically.
- aaa produces a vertical stretch and may reflect the graph in the xxx-axis.
- If a>0a>0a>0, the graph opens upwards; if a<0a<0a<0, it opens downwards.
Sketching a translated modulus graph
Sketch y=2∣x−3∣−4y=2|x-3|-4y=2∣x−3∣−4 and state its vertex and intercepts.
-
Read the vertex from the form a∣x−h∣+ka|x-h|+ka∣x−h∣+k: here h=3h=3h=3 and k=−4k=-4k=−4, so the vertex is (3,−4)(3,-4)(3,−4). Since the coefficient 2 is positive, the graph opens upwards.
-
Find the xxx-intercepts by setting y=0y=0y=0:
2∣x−3∣−4=0∣x−3∣=2x−3=2orx−3=−2x=5orx=1.\begin{aligned} 2|x-3|-4&=0\\ |x-3|&=2\\ x-3&=2 \quad \text{or} \quad x-3=-2\\ x&=5 \quad \text{or} \quad x=1. \end{aligned}2∣x−3∣−4∣x−3∣x−3x=0=2=2orx−3=−2=5orx=1. -
Find the yyy-intercept by substituting x=0x=0x=0:
y=2∣0−3∣−4=2(3)−4=2.y=2|0-3|-4=2(3)-4=2.y=2∣0−3∣−4=2(3)−4=2.The graph therefore passes through (1,0)(1,0)(1,0), (3,−4)(3,-4)(3,−4), (5,0)(5,0)(5,0) and (0,2)(0,2)(0,2).
Horizontal translation signs
In ∣x−h∣|x-h|∣x−h∣, the vertex has xxx-coordinate hhh, not −h-h−h. For example, ∣x−3∣|x-3|∣x−3∣ has its vertex at x=3x=3x=3.
Modulus transformations of general graphs
There are two different transformations you must distinguish.
The graph of y=∣f(x)∣y=|f(x)|y=∣f(x)∣
The modulus is applied to the output of fff.
- Keep every part of y=f(x)y=f(x)y=f(x) that is on or above the xxx-axis.
- Reflect every part below the xxx-axis in the xxx-axis.
Therefore, the transformed graph has no points below the xxx-axis.
The graph of y=f(∣x∣)y=f(|x|)y=f(∣x∣)
Here the modulus is applied to the input.
- Keep the part of y=f(x)y=f(x)y=f(x) for x≥0x\ge 0x≥0.
- Reflect this right-hand part in the yyy-axis.
- Discard the original part for x<0x<0x<0.
The resulting graph is symmetric about the yyy-axis.

Inside or outside?
For ∣f(x)∣|f(x)|∣f(x)∣, reflect negative outputs in the xxx-axis. For f(∣x∣)f(|x|)f(∣x∣), copy the non-negative inputs across the yyy-axis.
Transforming a quadratic graph
Describe the graph of y=∣x2−4∣y=|x^2-4|y=∣x2−4∣.
-
Begin with y=x2−4y=x^2-4y=x2−4, an upward-opening parabola with roots x=−2x=-2x=−2 and x=2x=2x=2 and vertex (0,−4)(0,-4)(0,−4).
-
Identify where its output is negative: x2−4<0x^2-4<0x2−4<0 between the roots, so the section for −2<x<2-2<x<2−2<x<2 lies below the xxx-axis.
-
Reflect only that section in the xxx-axis. It becomes y=4−x2y=4-x^2y=4−x2 for −2<x<2-2<x<2−2<x<2, while the outer sections remain y=x2−4y=x^2-4y=x2−4.
-
The full graph can therefore be written
y={x2−4,x≤−2 or x≥2,4−x2,−2<x<2.y= \begin{cases} x^2-4, & x\le -2 \text{ or } x\ge 2,\\ 4-x^2, & -2<x<2. \end{cases}y={x2−4,4−x2,x≤−2 or x≥2,−2<x<2.
Solving modulus equations
The equation ∣A∣=k|A|=k∣A∣=k asks which values of AAA are a distance kkk from zero.
If k>0k>0k>0, there are two possibilities:
∣A∣=k⇒A=korA=−k.|A|=k \quad\Rightarrow\quad A=k \quad\text{or}\quad A=-k.∣A∣=k⇒A=korA=−k.If k=0k=0k=0, then A=0A=0A=0. If k<0k<0k<0, there are no real solutions because a modulus cannot be negative.
Solving a modulus equation
Solve ∣2x−5∣=7|2x-5|=7∣2x−5∣=7.
-
Split the equation into the two possible cases:
2x−5=7or2x−5=−7.2x-5=7 \quad\text{or}\quad 2x-5=-7.2x−5=7or2x−5=−7. -
Solve the first case:
2x=12⇒x=6.2x=12 \Rightarrow x=6.2x=12⇒x=6. -
Solve the second case:
2x=−2⇒x=−1.2x=-2 \Rightarrow x=-1.2x=−2⇒x=−1.The solutions are therefore x=6x=6x=6 and x=−1x=-1x=−1.
Equations with modulus on both sides
For equations such as ∣f(x)∣=g(x)|f(x)|=g(x)∣f(x)∣=g(x), remember that the right-hand side must be non-negative. Squaring both sides can help, but you must check the resulting solutions in the original equation.
Solving an equation by squaring
Solve ∣x−1∣=x+3|x-1|=x+3∣x−1∣=x+3.
-
Since the left-hand side is non-negative, require x+3≥0x+3\ge 0x+3≥0, giving x≥−3x\ge -3x≥−3.
-
Square both sides:
(x−1)2=(x+3)2x2−2x+1=x2+6x+9−8x=8x=−1.\begin{aligned} (x-1)^2&=(x+3)^2\\ x^2-2x+1&=x^2+6x+9\\ -8x&=8\\ x&=-1. \end{aligned}(x−1)2x2−2x+1−8xx=(x+3)2=x2+6x+9=8=−1. -
Check in the original equation: ∣−1−1∣=2|-1-1|=2∣−1−1∣=2 and −1+3=2-1+3=2−1+3=2, so x=−1x=-1x=−1 is valid.
Solving modulus inequalities
Distance provides the clearest interpretation.
For k>0k>0k>0:
∣x−a∣<k⟺a−k<x<a+k,|x-a|<k \quad\Longleftrightarrow\quad a-k<x<a+k,∣x−a∣<k⟺a−k<x<a+k,because xxx is less than kkk units from aaa.
Similarly,
∣x−a∣>k⟺x<a−korx>a+k,|x-a|>k \quad\Longleftrightarrow\quad x<a-k \quad\text{or}\quad x>a+k,∣x−a∣>k⟺x<a−korx>a+k,because xxx is more than kkk units from aaa.
The same patterns apply to ≤\le≤ and ≥\ge≥, with the boundary values included.
Inside and outside
A “less than” modulus inequality usually gives values between two boundaries. A “greater than” modulus inequality usually gives values outside them.
Finding an acceptable range
A manufactured component is accepted when its length xxx mm differs from 50 mm by no more than 0.3 mm. Find the acceptable values of xxx.
-
Translate “differs from 50 by no more than 0.3” into the distance inequality ∣x−50∣≤0.3|x-50|\le 0.3∣x−50∣≤0.3.
-
Rewrite this as a compound inequality:
−0.3≤x−50≤0.3.-0.3\le x-50\le 0.3.−0.3≤x−50≤0.3. -
Add 50 throughout:
49.7≤x≤50.3.49.7\le x\le 50.3.49.7≤x≤50.3.Therefore, accepted components have lengths from 49.7 mm to 50.3 mm, including both limits.
Forgetting two regions
When solving ∣x−a∣>k|x-a|>k∣x−a∣>k, do not give only one side of the answer. Values can lie more than kkk units to the left or to the right of aaa.
Intersections and graphical reasoning
An equation involving modulus can also be solved by finding intersections between graphs. For example, the solutions of ∣f(x)∣=g(x)|f(x)|=g(x)∣f(x)∣=g(x) are the xxx-coordinates where y=∣f(x)∣y=|f(x)|y=∣f(x)∣ and y=g(x)y=g(x)y=g(x) meet.
This is especially useful when an exact algebraic solution is difficult or when a question asks for the number of solutions as a parameter changes.
Counting intersections
Determine the number of solutions of ∣x∣=2−x|x|=2-x∣x∣=2−x.
- The right-hand side must be non-negative, so any solution must satisfy x≤2x\le 2x≤2.
- For x≥0x\ge 0x≥0, use ∣x∣=x|x|=x∣x∣=x. Then x=2−xx=2-xx=2−x, so x=1x=1x=1.
- For x<0x<0x<0, use ∣x∣=−x|x|=-x∣x∣=−x. This gives −x=2−x-x=2-x−x=2−x, which simplifies to 0=20=20=2 and has no solution.
- There is therefore exactly one solution, x=1x=1x=1.
In the exam
- Decide whether the modulus acts on an input, an output, or a distance before starting any algebra.
- When solving ∣A∣=k|A|=k∣A∣=k, consider both A=kA=kA=k and A=−kA=-kA=−k, but first check that kkk is non-negative.
- Check solutions in the original equation after squaring or splitting into cases, and use a quick graph or number line to verify inequality regions.
- For graph transformations, mark roots and turning points before reflecting the relevant sections.
Check yourself
- What is the difference between constructing y=∣f(x)∣y=|f(x)|y=∣f(x)∣ and constructing y=f(∣x∣)y=f(|x|)y=f(∣x∣)?
- How would you solve ∣3x+1∣=8|3x+1|=8∣3x+1∣=8, and why should you expect up to two solutions?
- What interval is represented by ∣x−4∣≤1.5|x-4|\le 1.5∣x−4∣≤1.5?