Skip to content
Family Table Math
Auto

Modulus Equations and Inequalities

The modulus ∣x∣\lvert x \rvert measures distance from zero, so it turns up whenever size matters but direction doesn’t: tolerances in manufacturing, errors in measurement, “within 5 of”. This page shows you how to solve equations and inequalities that contain a modulus, by splitting into cases, by squaring, and by reading a graph. It finishes with the general skill of solving g(x)≥f(x)g(x) \ge f(x), both on a graph and with algebra.

∣x∣={x,x≥0−x,x<0\lvert x \rvert = \begin{cases} x, & x \ge 0 \\ -x, & x \lt 0 \end{cases}

∣x∣\lvert x \rvert is the distance from xx to 00, and ∣x−a∣\lvert x - a \rvert is the distance from xx to aa. Some useful facts:

∣x∣≥0,∣ab∣=∣a∣∣b∣,∣x∣2=x2,x2=∣x∣\lvert x \rvert \ge 0, \qquad \lvert ab \rvert = \lvert a \rvert \lvert b \rvert, \qquad \lvert x \rvert^2 = x^2, \qquad \sqrt{x^2} = \lvert x \rvert

For a number k>0k \gt 0:

StatementMeansSolution
∣x∣=k\lvert x \rvert = kdistance from 00 is kkx=kx = k or x=−kx = -k
∣x∣<k\lvert x \rvert \lt kcloser than kk to 00−k<x<k-k \lt x \lt k
∣x∣>k\lvert x \rvert \gt kfurther than kk from 00x<−kx \lt -k or x>kx \gt k

The same works with any expression inside: ∣f(x)∣=k\lvert f(x) \rvert = k means f(x)=kf(x) = k or f(x)=−kf(x) = -k. If k<0k \lt 0, the equation ∣f(x)∣=k\lvert f(x) \rvert = k has no solutions, because a modulus can’t be negative.

Split according to the sign of what’s inside the modulus.

  • ∣f(x)∣=∣g(x)∣\lvert f(x) \rvert = \lvert g(x) \rvert: solve f(x)=g(x)f(x) = g(x) and f(x)=−g(x)f(x) = -g(x). Both sides are moduli, so every solution works.
  • ∣f(x)∣=g(x)\lvert f(x) \rvert = g(x): solve f(x)=g(x)f(x) = g(x) and f(x)=−g(x)f(x) = -g(x), then check each answer in the original equation. The right side g(x)g(x) must be ≥0\ge 0, and any solution that makes it negative is extraneous.

If both sides are non-negative, squaring keeps an equation or inequality true and removes the modulus signs:

∣f(x)∣<∣g(x)∣⟺[f(x)]2<[g(x)]2\lvert f(x) \rvert \lt \lvert g(x) \rvert \quad\Longleftrightarrow\quad [f(x)]^2 \lt [g(x)]^2

This turns the problem into a polynomial one. It’s safe when both sides are moduli (or are otherwise known to be non-negative). If one side could be negative, use cases instead.

To solve ∣f(x)∣=g(x)\lvert f(x) \rvert = g(x) or ∣f(x)∣>g(x)\lvert f(x) \rvert \gt g(x), sketch y=∣f(x)∣y = \lvert f(x) \rvert and y=g(x)y = g(x) (see modulus graphs). The intersection points give the equation’s solutions, and the inequality holds wherever the first graph is above the second. A graph also tells you how many solutions to expect, which is a great check on the algebra.

Any inequality between two functions can be handled the same way.

  • Graphically: draw y=g(x)y = g(x) and y=f(x)y = f(x), find their intersection points (by hand or with the GDC’s “intersect” tool), and read off the xx-values where the graph of gg is on or above the graph of ff.
  • Analytically: rearrange to g(x)−f(x)≥0g(x) - f(x) \ge 0, factor, and use a sign chart, as on polynomial inequalities. For fractions, see rational inequalities.

The IB guide expects the algebraic method for simple polynomials up to degree 33, and technology for other functions.

Desmos understands absolute value: type abs(2x - 1) (or use the | key). On the SAT, graph y = abs(2x - 1) and y = 5 and click the intersections: x=−2x = -2 and x=3x = 3. For an inequality, read where the V-shaped graph is above or below the line. For simple equations like ∣x−4∣=6|x - 4| = 6, the two cases in your head (x−4=6x - 4 = 6 or x−4=−6x - 4 = -6) are faster. See using Desmos on the SAT.

Example 1: A basic equation and inequality

Section titled “Example 1: A basic equation and inequality”

Solve

  • (a) ∣2x−5∣=7\lvert 2x - 5 \rvert = 7
  • (b) ∣2x−5∣<7\lvert 2x - 5 \rvert \lt 7

Solution.

(a) 2x−5=72x - 5 = 7 or 2x−5=−72x - 5 = -7. So 2x=122x = 12 or 2x=−22x = -2, giving x=6x = 6 or x=−1x = -1.

Check: ∣12−5∣=7\lvert 12 - 5 \rvert = 7 ✓ and ∣−2−5∣=7\lvert -2 - 5 \rvert = 7 ✓.

(b) ∣2x−5∣<7\lvert 2x - 5 \rvert \lt 7 means −7<2x−5<7-7 \lt 2x - 5 \lt 7. Add 55 to all three parts, then divide by 22:

−2<2x<12⇒−1<x<6-2 \lt 2x \lt 12 \quad\Rightarrow\quad -1 \lt x \lt 6

Notice how (a) gives the endpoints of (b). Test a value inside: x=0x = 0 gives ∣−5∣=5<7\lvert -5 \rvert = 5 \lt 7 ✓.

Example 2: Rejecting an extraneous solution

Section titled “Example 2: Rejecting an extraneous solution”

Solve ∣x+1∣=2x−4\lvert x + 1 \rvert = 2x - 4.

Solution. The right side isn’t a modulus, so use cases and check.

Case 1: x+1=2x−4x + 1 = 2x - 4, so x=5x = 5. Check: ∣6∣=6\lvert 6 \rvert = 6 and 2(5)−4=62(5) - 4 = 6 ✓.

Case 2: x+1=−(2x−4)x + 1 = -(2x - 4), so x+1=−2x+4x + 1 = -2x + 4, 3x=33x = 3, x=1x = 1. Check: ∣2∣=2\lvert 2 \rvert = 2 but 2(1)−4=−22(1) - 4 = -2. ✗ A modulus can’t equal −2-2, so reject x=1x = 1.

The only solution is x=5x = 5.

Why the extra answer? On a graph, y=2x−4y = 2x - 4 meets the V shape y=∣x+1∣y = \lvert x + 1 \rvert only once, on its right arm. The second case found where the line meets the extension of the left arm, y=−(x+1)y = -(x + 1), below the xx-axis, which isn’t part of the modulus graph.

Solve ∣x−3∣≥∣2x+1∣\lvert x - 3 \rvert \ge \lvert 2x + 1 \rvert.

Solution. Both sides are non-negative, so square:

(x−3)2≥(2x+1)2x2−6x+9≥4x2+4x+10≥3x2+10x−80≥(3x−2)(x+4)\begin{aligned} (x - 3)^2 &\ge (2x + 1)^2 \\ x^2 - 6x + 9 &\ge 4x^2 + 4x + 1 \\ 0 &\ge 3x^2 + 10x - 8 \\ 0 &\ge (3x - 2)(x + 4) \end{aligned}

The parabola y=(3x−2)(x+4)y = (3x - 2)(x + 4) opens up with zeros −4-4 and 23\frac{2}{3}, so it’s ≤0\le 0 between them:

−4≤x≤23-4 \le x \le \frac{2}{3}
The V-shaped graphs y = |x - 3| and y = |2x + 1| meet at (-4, 7) and (2/3, 7/3); between these points the graph of |x - 3| is on top, and that region is shaded −4 −2 2 2 4 6 8 (−4, 7) (2/3, 7/3) y = |2x + 1| y = |x − 3|
∣x−3∣≥∣2x+1∣\lvert x - 3 \rvert \ge \lvert 2x + 1 \rvert where the blue graph is on or above the orange graph: from x=−4x = -4 to x=23x = \frac{2}{3}.

Check the endpoints: ∣−7∣=7=∣−7∣\lvert -7 \rvert = 7 = \lvert -7 \rvert ✓ and ∣−73∣=73=∣73∣\left\lvert -\frac{7}{3} \right\rvert = \frac{7}{3} = \left\lvert \frac{7}{3} \right\rvert ✓. Check a point inside: x=0x = 0 gives 3≥13 \ge 1 ✓.

Example 4: Solving g(x) ≥ f(x) for a cubic

Section titled “Example 4: Solving g(x) ≥ f(x) for a cubic”

Let f(x)=x3−2x2f(x) = x^3 - 2x^2 and g(x)=5x−6g(x) = 5x - 6. Solve g(x)≥f(x)g(x) \ge f(x) analytically, and confirm with a graph.

Solution. Rearrange so that one side is 00:

5x−6≥x3−2x2⟺x3−2x2−5x+6≤05x - 6 \ge x^3 - 2x^2 \quad\Longleftrightarrow\quad x^3 - 2x^2 - 5x + 6 \le 0

Let p(x)=x3−2x2−5x+6p(x) = x^3 - 2x^2 - 5x + 6. Try x=1x = 1: p(1)=1−2−5+6=0p(1) = 1 - 2 - 5 + 6 = 0, so (x−1)(x - 1) is a factor (factor theorem). Dividing gives

p(x)=(x−1)(x2−x−6)=(x−1)(x+2)(x−3)p(x) = (x - 1)(x^2 - x - 6) = (x - 1)(x + 2)(x - 3)

Sign chart with critical values −2-2, 11 and 33:

Intervalx+2x + 2x−1x - 1x−3x - 3p(x)p(x)
x<−2x \lt -2−-−-−-−-
−2<x<1-2 \lt x \lt 1++−-−-++
1<x<31 \lt x \lt 3++++−-−-
x>3x \gt 3++++++++

We need p(x)≤0p(x) \le 0, including the zeros:

x≤−2or1≤x≤3x \le -2 \quad\text{or}\quad 1 \le x \le 3

Graphically: the line and cubic meet at (−2,−16)(-2, -16), (1,−1)(1, -1) and (3,9)(3, 9), and the line is above the cubic exactly on those intervals.

The cubic y = x cubed - 2x squared and the line y = 5x - 6 meet at (-2, -16), (1, -1) and (3, 9). The regions where the line is above the cubic, x up to -2 and x from 1 to 3, are shaded. (−2, −16) (1, −1) (3, 9) −2 −1 2 3 −24 −12 12 y = f(x) = x³ − 2x² y = g(x) = 5x − 6
g(x)≥f(x)g(x) \ge f(x) where the orange line is on or above the blue cubic: x≤−2x \le -2 or 1≤x≤31 \le x \le 3.

Splitting ∣x∣<k\lvert x \rvert \lt k into two pieces. ∣x∣<k\lvert x \rvert \lt k is one interval, −k<x<k-k \lt x \lt k. It’s ∣x∣>k\lvert x \rvert \gt k that splits into two pieces.

Not checking solutions of ∣f(x)∣=g(x)\lvert f(x) \rvert = g(x). When the right side isn’t a modulus, one of the cases can give an answer that makes g(x)g(x) negative. Substitute every answer back into the original equation.

Squaring when one side might be negative. ∣x+1∣=2x−4\lvert x + 1 \rvert = 2x - 4 squared gives (x+1)2=(2x−4)2(x + 1)^2 = (2x - 4)^2, which has solutions x=5x = 5 and x=1x = 1, and x=1x = 1 is wrong. Squaring is only safe when both sides are known to be non-negative.

Dividing an inequality by an expression that could be negative. In x3≥4xx^3 \ge 4x, dividing by xx loses solutions and can flip the sign wrongly. Move everything to one side and factor instead.

Reading the wrong side of the graph. For g(x)≥f(x)g(x) \ge f(x), you want the xx-values where the graph of gg is above the graph of ff. Write the answer as xx-intervals, not yy-values, and include the intersection points when the inequality is ≥\ge or ≤\le.

Missing intersection points on the GDC. Two curves can meet at points very close together. If the graph looks like it nearly touches somewhere, zoom in before you decide there’s no intersection.

1. (Warm-up) Solve ∣x−4∣=9\lvert x - 4 \rvert = 9.

Solution

x−4=9x - 4 = 9 or x−4=−9x - 4 = -9, so x=13x = 13 or x=−5x = -5.

Check: ∣9∣=9\lvert 9 \rvert = 9 ✓ and ∣−9∣=9\lvert -9 \rvert = 9 ✓.

2. (Warm-up) Solve

  • (a) ∣3x+2∣≤8\lvert 3x + 2 \rvert \le 8
  • (b) ∣2x−1∣=−3\lvert 2x - 1 \rvert = -3
Solution

(a) −8≤3x+2≤8-8 \le 3x + 2 \le 8, so −10≤3x≤6-10 \le 3x \le 6 and

−103≤x≤2-\frac{10}{3} \le x \le 2

(b) No solutions: a modulus is never negative.

3. (Core) Solve ∣x−1∣=∣3x+5∣\lvert x - 1 \rvert = \lvert 3x + 5 \rvert.

Solution

Both sides are moduli, so either the insides are equal or they are opposites.

x−1=3x+5x - 1 = 3x + 5 gives −2x=6-2x = 6, so x=−3x = -3.

x−1=−(3x+5)x - 1 = -(3x + 5) gives 4x=−44x = -4, so x=−1x = -1.

Check: ∣−4∣=∣−4∣\lvert -4 \rvert = \lvert -4 \rvert ✓ and ∣−2∣=∣2∣\lvert -2 \rvert = \lvert 2 \rvert ✓.

4. (Core) Solve ∣x2−5∣=4\lvert x^2 - 5 \rvert = 4.

Solution

x2−5=4x^2 - 5 = 4 or x2−5=−4x^2 - 5 = -4. So x2=9x^2 = 9 or x2=1x^2 = 1:

x=−3, −1, 1, 3x = -3, \ -1, \ 1, \ 3

On a graph, the horizontal line y=4y = 4 crosses the W shape y=∣x2−5∣y = \lvert x^2 - 5 \rvert four times, which confirms there are four solutions.

5. (Core) Solve ∣2x+3∣>x+6\lvert 2x + 3 \rvert \gt x + 6.

Solution

Split at x=−32x = -\frac{3}{2}, where 2x+32x + 3 changes sign.

Case x≥−32x \ge -\frac{3}{2}: 2x+3>x+62x + 3 \gt x + 6 gives x>3x \gt 3. All of these satisfy x≥−32x \ge -\frac{3}{2}, so this case gives x>3x \gt 3.

Case x<−32x \lt -\frac{3}{2}: −(2x+3)>x+6-(2x + 3) \gt x + 6 gives −3x>9-3x \gt 9, so x<−3x \lt -3 (dividing by −3-3 flips the sign). All of these satisfy x<−32x \lt -\frac{3}{2}.

x<−3orx>3x \lt -3 \quad\text{or}\quad x \gt 3

Check: x=0x = 0 gives 3>63 \gt 6, false ✓ (it’s not in the solution); x=4x = 4 gives 11>1011 \gt 10 ✓; x=−4x = -4 gives 5>25 \gt 2 ✓.

6. (Core) Let f(x)=x3−xf(x) = x^3 - x and g(x)=3x2−3g(x) = 3x^2 - 3. Solve g(x)≥f(x)g(x) \ge f(x) analytically.

Solution3x2−3≥x3−x⟺x3−3x2−x+3≤03x^2 - 3 \ge x^3 - x \quad\Longleftrightarrow\quad x^3 - 3x^2 - x + 3 \le 0

Factor by grouping: x2(x−3)−(x−3)=(x−3)(x2−1)=(x−3)(x−1)(x+1)x^2(x - 3) - (x - 3) = (x - 3)(x^2 - 1) = (x - 3)(x - 1)(x + 1).

Critical values −1-1, 11, 33. The cubic has a positive leading coefficient, so its signs from left to right are −-, ++, −-, ++. We need ≤0\le 0:

x≤−1or1≤x≤3x \le -1 \quad\text{or}\quad 1 \le x \le 3

Check: x=2x = 2 gives g(2)=9g(2) = 9 and f(2)=6f(2) = 6, and 9≥69 \ge 6 ✓. x=0x = 0 gives g(0)=−3g(0) = -3 and f(0)=0f(0) = 0, and −3≥0-3 \ge 0 is false ✓.

7. (Core) A machine fills bags of flour with a target mass of 500500 g. A bag passes inspection if its mass mm grams satisfies ∣m−500∣≤12\lvert m - 500 \rvert \le 12.

  • (a) Find the range of masses that pass.
  • (b) Does a bag of 487.5487.5 g pass?
Solution

(a) −12≤m−500≤12-12 \le m - 500 \le 12, so 488≤m≤512488 \le m \le 512 grams. In words: the mass must be within 1212 g of 500500 g.

(b) ∣487.5−500∣=12.5>12\lvert 487.5 - 500 \rvert = 12.5 \gt 12, so no, it fails.

8. (Challenge) Solve ∣x−2∣+∣x+1∣=5\lvert x - 2 \rvert + \lvert x + 1 \rvert = 5.

Solution

The insides change sign at x=2x = 2 and x=−1x = -1, so use three cases.

x≥2x \ge 2: both insides are non-negative: (x−2)+(x+1)=5(x - 2) + (x + 1) = 5, so 2x−1=52x - 1 = 5 and x=3x = 3. This satisfies x≥2x \ge 2 ✓.

−1≤x<2-1 \le x \lt 2: −(x−2)+(x+1)=5-(x - 2) + (x + 1) = 5 gives 3=53 = 5, which is impossible. No solutions here.

x<−1x \lt -1: −(x−2)−(x+1)=5-(x - 2) - (x + 1) = 5 gives −2x+1=5-2x + 1 = 5, so x=−2x = -2. This satisfies x<−1x \lt -1 ✓.

Solutions: x=−2x = -2 and x=3x = 3.

This makes sense as distances: ∣x−2∣+∣x+1∣\lvert x - 2 \rvert + \lvert x + 1 \rvert is the distance from xx to 22 plus the distance from xx to −1-1. Any point between −1-1 and 22 gives a total of exactly 33, so the total is 55 only at points 11 unit beyond either end.

9. (Challenge) Use technology to solve ex≤∣x2−4∣e^x \le \lvert x^2 - 4 \rvert. Give the endpoints to 3 s.f.

Solution

Graph y=exy = e^x and y=∣x2−4∣y = \lvert x^2 - 4 \rvert (on most GDCs, “abs”). The modulus graph is a W shape touching the axis at x=±2x = \pm 2, with a bump of height 44 at x=0x = 0.

Use “intersect” for every crossing. Near x=−2x = -2, zoom in: the two graphs cross twice very close together, because e−2≈0.135e^{-2} \approx 0.135 is small and the W shape dips to 00 there.

x=−2.03,x=−1.96,x=1.06x = -2.03, \qquad x = -1.96, \qquad x = 1.06

For x>2x \gt 2, exe^x is always above x2−4x^2 - 4 (at x=2x = 2 it’s 7.397.39 against 00, and it grows faster), so there are no more crossings.

The modulus graph is on or above the exponential:

x≤−2.03or−1.96≤x≤1.06x \le -2.03 \quad\text{or}\quad -1.96 \le x \le 1.06

Check a point in each part: x=−3x = -3 gives e−3≈0.050≤5e^{-3} \approx 0.050 \le 5 ✓; x=−2x = -2 gives 0.135≤00.135 \le 0, false ✓ (excluded); x=0x = 0 gives 1≤41 \le 4 ✓; x=2x = 2 gives 7.39≤07.39 \le 0, false ✓.