Sub topic 6
Modulus Functions and Their V-Shaped Graphs
This chapter assumes you can solve linear and quadratic equations, plot points on the coordinate plane, handle inequalities, and state the absolute value of a number. The modulus function turns those skills into a graph tool. CAT uses it for minimum-value questions, equation-counting questions, and piecewise sketches.
The definition and the basic graph
The modulus (absolute value) of a number is its distance from zero on the number line. As a function:
- |x| = x when x ≥ 0
- |x| = -x when x < 0
So |x| is never negative. The graph of y = |x| is a V with its corner (the vertex) at the origin. The right arm is the line y = x and the left arm is the line y = -x. The graph is symmetric about the y-axis, so |-x| = |x|. That makes it an even function.
Key facts about f(x) = |x|:
- Domain: all real numbers.
- Range: y ≥ 0.
- Minimum value: 0, reached at x = 0.
- No maximum, because both arms rise without bound.
- Slopes: -1 on the left, +1 on the right.
The modulus is also a distance. |x - a| is the distance between x and a. Read this way, many problems become geometry on a number line.
The general form |x - h| + k
Shifts from the transformations chapter apply directly. For y = a|x - h| + k:
| Part | Effect | Column | Column |
|---|---|---|---|
| h | Vertex moves to x = h (right if h > 0) | ||
| k | Vertex moves to y = k (up if k > 0) | ||
| a > 0 | V opens upward, minimum value k | ||
| a < 0 | V opens downward (inverted), maximum value k | ||
| \ | a\ | Steepness. The arms have slopes ±a |
Example: y = -2|x + 3| + 4. Rewrite x + 3 as x - (-3), so h = -3. The vertex is (-3, 4). Since a = -2 is negative, the V opens downward and 4 is the maximum. The arms have slopes +2 (left) and -2 (right).
Solving equations and inequalities with modulus
Three rules cover most cases, for a constant c:
- |E| = c with c > 0 gives E = c or E = -c. If c < 0 there is no solution.
- |E| < c (c > 0) gives -c < E < c.
- |E| > c (c > 0) gives E > c or E < -c.
For example, |2x - 5| ≤ 7 gives -7 ≤ 2x - 5 ≤ 7, so -2 ≤ 2x ≤ 12 and -1 ≤ x ≤ 6.
When the modulus is on both sides, or the other side contains x, split by cases on the sign of the expression inside. Solve |x - 3| = 2x:
- Case x ≥ 3: x - 3 = 2x gives x = -3. This violates x ≥ 3, so reject it.
- Case x < 3: -(x - 3) = 2x gives 3 = 3x, so x = 1. This satisfies x < 3, so keep it.
The only solution is x = 1. Always check each candidate against the case condition. Rejected roots are a common source of wrong answers.
Also note that the right side must be non-negative. Here 2x ≥ 0 requires x ≥ 0, and x = 1 passes.
Breakpoints and piecewise form
Each modulus term |x - a| changes behaviour at x = a. That point is a breakpoint (or critical point). Between breakpoints, each modulus becomes an ordinary linear expression, so the whole function is piecewise linear.
Take f(x) = |x - 1| + |x - 4|. The breakpoints are 1 and 4:
| Region | f(x) |
|---|---|
| x < 1 | (1 - x) + (4 - x) = 5 - 2x |
| 1 ≤ x ≤ 4 | (x - 1) + (4 - x) = 3 |
| x > 4 | (x - 1) + (x - 4) = 2x - 5 |
The graph falls with slope -2, runs flat at height 3 between 1 and 4, then rises with slope +2. It looks like a flat-bottomed trough rather than a sharp V.
Minimum of a sum of moduli
This is the most tested pattern. Consider f(x) = |x - a₁| + |x - a₂| + ... + |x - aₙ|, the sum of distances from x to n fixed points.
- If n is odd, the minimum occurs at the median of the points.
- If n is even, the minimum occurs at every x between the two middle points, and the value is the same across that whole stretch.
For two points, the minimum is the gap between them. For |x - 2| + |x - 5| the minimum is 3, and the code below checks it.
def f(x):
return abs(x - 2) + abs(x - 5)
values = [f(i / 2) for i in range(0, 15)]
print(min(values))For three points, say |x - 1| + |x - 4| + |x - 10|, the median is 4. Then f(4) = 3 + 0 + 6 = 9. Moving x anywhere else increases the total, because one move away from 4 gains distance to one point but loses to two.
Why the median works: slope of f at any x equals (number of points to the left of x) minus (number to the right). The function falls while more points lie to the right and rises once more lie to the left. The minimum sits where the slope changes sign.
For a maximum, the slope logic reverses. On a closed interval, the maximum of a piecewise linear function occurs at an endpoint or a breakpoint. So check those points only.
Weighted moduli
With coefficients, such as f(x) = 2|x - 1| + |x - 6|, the slope in each region is the weighted count of points on the left minus those on the right. Here the weight 2 dominates, so the minimum is at x = 1, where f = 5. A shortcut: the minimum sits at the breakpoint where the cumulative weight first reaches half of the total weight. Total weight is 3, half is 1.5, and the weight at x = 1 is 2, which crosses it.
Counting solutions with graphs
To count solutions of |x - 2| = k, draw y = |x - 2| and the horizontal line y = k:
- k < 0: no intersection, 0 solutions.
- k = 0: touches the vertex, 1 solution.
- k > 0: cuts both arms, 2 solutions.
For |x - 1| + |x - 4| = k, use the trough shape. If k < 3, there are no solutions. If k = 3, every x in [1, 4] works, so there are infinitely many. If k > 3, there are exactly 2.
A nested form, such as ||x - 2| - 3| = 1, is solved by peeling layers: |x - 2| - 3 = ±1, so |x - 2| = 4 or 2, giving x = 6, -2, 4, 0. That is four solutions. Graphically the V is shifted down by 3, the part below the axis is folded up, and the line y = 1 cuts the result four times.
Folding: |f(x)| versus f(|x|)
These look alike but behave differently.
| Form | Operation on graph of f | Column | Column |
|---|---|---|---|
| y = \ | f(x)\ | Reflect the parts below the x-axis upward. Output is never negative | |
| y = f(\ | x\ | ) | Discard the left half, copy the right half onto the left. Result is symmetric about the y-axis |
Example: for f(x) = x - 2, |f(x)| = |x - 2| is a V with vertex at x = 2. But f(|x|) = |x| - 2 is a V with vertex at (0, -2) and x-intercepts at ±2.
Common errors
- Forgetting to test candidates against case conditions.
- Treating |a + b| as |a| + |b|. The triangle inequality only gives |a + b| ≤ |a| + |b|, with equality when a and b have the same sign (or one is zero).
- Using |x|² = x² incorrectly in reverse: √(x²) = |x|, not x.
- Assuming a sum of moduli has a single minimizing point. With an even count of points it has a whole interval.
- Missing that |E| = c has no solution when c < 0.
Exercises
Exercise
Find the minimum value of f(x) = |x - 3| + |x - 7| + |x - 8|, and the x where it occurs.
Show answer
There are three points, so the minimum is at the median, x = 7. f(7) = 4 + 0 + 1 = 5. The minimum value is 5.
Exercise
How many real solutions does ||x| - 4| = 2 have?
Show answer
|x| - 4 = 2 or -2, so |x| = 6 or 2. Each gives two values of x: ±6 and ±2. There are 4 solutions.
Exercise
For what values of k does |x - 1| + |x - 4| = k have exactly two solutions?
Show answer
The minimum of the left side is 3, flat on [1, 4]. For k > 3 the line y = k cuts the two outer arms once each, giving exactly 2 solutions. So k > 3.