James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AA HL › Topic 2: Functions › Modulus equations

Modulus equations & inequalities

Solving equations and inequalities that involve |x|: splitting into cases, squaring both sides, and using a sketch to know how many solutions to expect and which ones to reject.

AHL 2.16HL onlyPaper 1Paper 2≈ 70 min to work through
Before you start: the graph of y=|f(x)| and solving inequalities. See Further graphs and Inequalities.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Interpret |x−a| as the distance between x and aAHL 2.16
  • Solve |f(x)|=k and |f(x)|=|g(x)|AHL 2.16
  • Solve |f(x)|=g(x) and reject invalid solutionsAHL 2.16
  • Solve |f(x)|<k, |f(x)|>k and |f(x)|<|g(x)|AHL 2.16
  • Use a sketch to solve harder modulus inequalitiesAHL 2.16

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

|x| is the size of x without its sign: |x|=x if x≥0 and |x|=−x if x<0. So |x−a| is the distance between x and a on the number line. Every modulus equation is really two ordinary equations (one for each sign). The skill is choosing the quickest method and throwing away solutions that do not fit.

2.1 The modulus as a distance

|x−3|=2 asks: which numbers are at distance 2 from 3? Answer: 1 and 5. |x−3|<2 asks which numbers are closer than 2 to 3: 1<x<5. Thinking of distance makes simple cases instant.

Basic results (for k > 0) Not in booklet: learn it
|f(x)|=k⟺f(x)=±k|f(x)|<k⟺−k<f(x)<k|f(x)|>k⟺f(x)>k or f(x)<−k

Also useful: |a|2=a2, |ab|=|a||b| and |ab|=|a||b|.

2.2 Equations |f(x)| = k and |f(x)| = |g(x)|

Worked example 1Paper 1
Solve |2x−3|=5.
2x−3=5⇒x=4
2x−3=−5⇒x=−1

When both sides are moduli, either use f(x)=±g(x), or square both sides. Squaring is safe here because both sides are already non-negative, so no false solutions are created.

Worked example 2Paper 1
Solve |x−1|=|2x+3|.
x−1=2x+3⇒x=−4
Case 1: same sign.
x−1=−(2x+3)⇒3x=−2⇒x=−23
Case 2: opposite signs.
Or square: (x−1)2=(2x+3)2⇒3x2+14x+8=0⇒(3x+2)(x+4)=0.
Same answers either way.

2.3 Equations |f(x)| = g(x): check your answers

If the right-hand side is not a modulus, it could be negative, and a modulus can never equal a negative number. Splitting into f(x)=±g(x) or squaring can produce solutions that do not satisfy the original equation. Always substitute back, or check that g(x)≥0.

Worked example 3Paper 1
Solve |x−2|=2x+1.
Case 1: x−2=2x+1⇒x=−3. Check: right side =−5<0. Reject.
Case 2: −(x−2)=2x+1⇒x=13. Check: |13−2|=53 and 2·13+1=53 ✓
x=13
A sketch shows why: the V-shape y=|x−2| meets the rising line y=2x+1 only once.
Worked example 4Paper 1
Solve |x2−4|=3x.
Case 1: x2−4=3x⇒(x−4)(x+1)=0⇒x=4 or x=−1. Since 3x≥0 is needed, reject −1.
Case 2: 4−x2=3x⇒x2+3x−4=0⇒(x+4)(x−1)=0⇒x=1 or x=−4. Reject −4.
x=1 or x=4
Check: |1−4|=3 ✓ and |16−4|=12 ✓.

2.4 Modulus inequalities

Worked example 5Paper 1
Solve |3x−2|≤7.
−7≤3x−2≤7
−5≤3x≤9⇒−53≤x≤3

With moduli on both sides, squaring is the cleanest method: both sides are non-negative, so squaring keeps the direction of the inequality.

Worked example 6Paper 1
Solve |x−1|>|2x+3|.
(x−1)2>(2x+3)2⇒x2−2x+1>4x2+12x+9
0>3x2+14x+8⇒(3x+2)(x+4)<0
−4<x<−23
The critical values are the solutions of the equation in WE2, as expected.
Worked example 7Paper 1
Solve |xx−1|<2.
|x||x−1|<2⇒|x|<2|x−1| (multiplying by |x−1|>0, with x≠1)
Multiplying by a modulus is safe: it is positive.
Square: x2<4(x−1)2⇒0<3x2−8x+4=(3x−2)(x−2)
x<23 or x>2. (x=1 is already excluded.)

2.5 Using a sketch (the hard cases)

When the inequality mixes a modulus with a non-modulus expression, squaring is unsafe and case-splitting gets messy. The reliable method: sketch both sides, solve the equation (rejecting false solutions as in 3.3), and read the inequality off the sketch.

Worked example 8Paper 1
Solve |x−2|<2x+1.
From WE3 the graphs y=|x−2| and y=2x+1 meet only at x=13.
For large x the line is above the V (e.g. x=10: 8<21).
One test value on each side of the intersection settles it.
x>13
Worked example 9Paper 1
Solve |x2−5x|<6.
Equation: x2−5x=6⇒x=6,−1; x2−5x=−6⇒x=2,3.
Sketch y=|x2−5x|: roots 0 and 5, with the dip between them reflected up to a maximum of 6.25 at x=2.5.
Since 6.25>6, the graph pokes above y=6 between 2 and 3.
Below y=6: −1<x<2 or 3<x<6
Which method?
  • |f(x)| against a constant: use ±k directly.
  • Modulus on both sides: square both sides.
  • Modulus against a non-constant expression: split into cases, check every solution, and use a sketch for inequalities.
  • Not sure? Sketch first: it tells you how many solutions to expect.
On your TI-Nspire Calculator tricks →

On Paper 2, use abs( ) from the template menu. Graph both sides and find the intersections, or use nSolve with a sensible starting value. For inequalities, read the intervals off the graph.

3Explore it

The navy V is y=|ax+b| and the red line is y=cx+d. The green bars show where |ax+b|<cx+d. Make the line steep or shallow and see the number of solutions change.

4Common mistakes & exam tips

Common mistakes

  • Not checking solutions of |f(x)|=g(x): one case often gives a value where g(x)<0.
  • Squaring both sides when one side is not a modulus, which can create false solutions or reverse an inequality.
  • Writing |f(x)|>k as −k>f(x)>k, which is impossible. It is two separate inequalities.
  • Writing |a+b|=|a|+|b|. This is false in general.
  • In |fg|<k, forgetting to exclude the zeros of g.

Exam tips

  • Show both cases explicitly, and write "reject" next to any invalid solution with a reason.
  • A quick sketch of the V or the reflected curve is worth drawing even when not asked for.
  • For |f(x)|<|g(x)|, square and factorise: the critical values are the solutions of the equation.
  • Leave answers exact on Paper 1 (fractions and surds).

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Solve |5−2x|=3.
x=1 or x=4
FluencyP2
Solve |x+4|<1.
−5<x<−3
FluencyP3
Solve |2x+1|=|x−4|.
x=−5 or x=1
FluencyP4
Solve |x−3|≥2x.
Equation: x−3=2x gives −3 (reject, 2x<0); 3−x=2x gives x=1. Answer x≤1.
Problem solvingP5
Solve |x+1|>|x−3|.
Square: 8x>8, so x>1. (Distance from −1 is greater than distance from 3.)
Problem solvingP6
Solve |x2−2|=x.
x2−x−2=0: x=2 (reject −1). x2+x−2=0: x=1 (reject −2). x=1 or x=2.

6Exam-style questions

Original questions in the style of the IB exam, with full markschemes. Give yourself about 1 minute per mark.

Question 1Paper 1[4 marks]

Solve the equation |2x+1|=|x−4|.

2x+1=x−4 or (2x+1)2=(x−4)2M1
x=−5A1
2x+1=−(x−4)M1
x=1A1
Question 2Paper 1[6 marks]

  • (a)On the same axes, sketch the graphs of y=|x+3| and y=5−x.[2]
  • (b)Hence solve the inequality |x+3|<5−x.[4]
(a)
V-shape with vertex (−3,0)A1
line with intercepts (0,5) and (5,0)A1
(b)
x+3=5−xM1
x=1A1
−(x+3)=5−x has no solution, so one intersectionR1
x<1A1
Question 3Paper 1[7 marks]

  • (a)Solve the equation |x2−5x|=6.[4]
  • (b)Hence solve the inequality |x2−5x|<6.[3]
(a)
x2−5x−6=0 and x2−5x+6=0M1
x=−1, 6A1
x=2, 3A1A1
(b)
sketch or sign analysisM1
−1<x<2A1
3<x<6A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try real IB questions. Your school or teacher will have these papers.

PaperQuestionFocusDifficulty
Nov 2022 · Paper 1Q11Solving |f(x)|>1 using a sketch of y=|f(x)|★★★
Nov 2025 · TZ3 · Paper 1Q5Solving |f(x)|≥(f(x))2★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake