Sub topic 2
Modulus as Distance on the Number Line
This chapter assumes you can solve linear inequalities and write answers in interval notation.
Modulus as Distance
The modulus |x| equals x when x ≥ 0 and equals −x when x < 0. The more useful reading is geometric: |x − a| is the distance between x and a on the number line. So |x + 2| is the distance from x to −2.
Core Properties
| Property | Note | Column | Column | Column | Column | Column | Column |
|---|---|---|---|---|---|---|---|
| \ | x\ | ≥ 0 | Equals 0 only when x = 0 | ||||
| \ | xy\ | = \ | x\ | \ | y\ | Also holds for division when y ≠ 0 | |
| \ | x\ | ² = x² | Lets you square both sides safely | ||||
| √(x²) = \ | x\ | Not x |
Solving Modulus Equations
The equation |f(x)| = k has solutions only if k ≥ 0. When it does, f(x) = k or f(x) = −k. If the right side contains x, as in |x − 1| = 2x, solve each case and then substitute every candidate back into the original equation. Candidates that make the right side negative are false roots.
Solving |f(x)| < k and |f(x)| > k
For k > 0:
- |f(x)| < k means −k < f(x) < k. This is a single interval: points within distance k.
- |f(x)| > k means f(x) < −k or f(x) > k. This is two rays: points farther than k.
For example, |x − 3| < 2 gives (1, 5).
Multiple Modulus Terms
Each term |x − a| changes form at x = a. These values are the critical points. Mark them on the number line, rewrite the expression without modulus signs on each interval, and solve each piece within its own interval.
Take |x − 3| + |x + 2| < 9. The critical points are −2 and 3. Between them, the sum is always 5, the distance from −2 to 3. To the right of 3, 2x − 1 < 9 gives x < 5. To the left of −2, 1 − 2x < 9 gives x > −4. The solution is (−4, 5).
count = sum(1 for x in range(-100, 101) if abs(x - 3) + abs(x + 2) < 9)
print(count) # 8, the integers -3 through 4Exercise
Find all real x with |x − 1| + |x − 5| = 4.
Show answer
The distance between 1 and 5 is 4, so every x in [1, 5] works and no x outside that interval does. The solution is [1, 5].