4. Absolute Value Equations & Inequalities
Before you start
- Translate freely between inequality, interval, and graph notation
- Apply the flip rule for inequalities when multiplying by a negative
- Solve compound inequalities and combine using AND or OR
- Define absolute value as distance from zero on the number line
By the end you'll be able to
- Solve absolute-value equations by splitting into the positive and negative cases
- Recognize when an absolute-value equation has no solution because distance cannot be negative
- Convert |expr| <= k into a single bounded interval (intersection)
- Convert |expr| >= k into the union of two unbounded rays
- Connect absolute-value structure to L1 regularization and Mean Absolute Error
Absolute Value Inequalities
Absolute value measures distance from zero. An absolute value inequality bounds how far a
quantity can be from zero. Two cases — ≤ and ≥ — produce structurally different solutions.
Definition (piecewise)
For any real number
The bars strip the sign — they never produce a negative value. This piecewise form is the reason every absolute-value equation or inequality splits into two cases: one where the inside is non-negative (and the bars do nothing) and one where the inside is negative (and the bars flip the sign).
The two cases
Case 1: |expression| ≤ k
This is an intersection (AND). The expression must be within distance
Solve all three sections together to isolate the variable.
Case 2: |expression| ≥ k
This is a union (OR). The expression is at least
The solution is two disjoint rays.
Worked example
Solve and graph:
Step 1 — recognize the structure. This is ≤ (intersection). Rewrite as a compound
inequality:
Step 2 — add 5 to all three sections to isolate the variable term:
Step 3 — divide all three sections by 2:
In interval notation:
Common mistakes
- Dropping the absolute value bars and only solving the positive case. This gives you
— you’ve lost the lower bound entirely. - Forgetting to flip the inequality when multiplying or dividing by a negative number.
This rule is non-negotiable; if you divide by
, the inequality direction reverses. - Confusing
≤and≥structures. They produce different solution shapes — one bounded interval vs. two unbounded rays.
Machine learning relevance
Absolute value mechanics are the direct mathematical foundation for two cornerstone ML techniques:
- L1 regularization (Lasso): Adds
as a penalty term in the cost function, encouraging weights to shrink to exactly zero. This produces sparse models — most features end up with zero weight, leaving you with a small, interpretable subset. - Mean Absolute Error (MAE):
. Unlike MSE, MAE doesn’t square errors, so it’s more robust to outliers. The “absolute value” intuition you build here shapes how you reason about loss functions later.
Understanding the bounds of absolute values is also required for defining margin boundaries in Support Vector Machines and confidence intervals in statistical inference.
Common mistakes
These are the traps learners hit most often on this topic. Knowing them in advance is half the fix.
Dropping the absolute-value bars and solving only one case
has TWO solutions: AND . Solving only the positive case loses half the answer. Setting an absolute value equal to a negative
has no solution — distance can’t be negative. Stop and write ‘no solution’ rather than forcing through. Confusing ≤ with ≥ in inequality structure
is one bounded interval . is two disjoint rays . Memorize the shapes.
Practice problems
Try each on paper first. Click Show solution only after you've made a real attempt.
- Problem 1Solve:
. Show solution
- Case 1:
. - Case 2:
.
Answer:
or . - Case 1:
- Problem 2Solve and graph:
. Show solution
. - Subtract 1:
.
Interval:
. - Problem 3Solve:
. Show solution
. .
Interval:
. - Problem 4Solve:
. Show solution
.
Distance is never negative. No solution.
- Problem 5Solve:
. Show solution
. . .
Interval:
. - Problem 6Solve:
. Show solution
. .
Interval:
. - Problem 7Why does L1 regularization in ML use absolute values?
Show solution
L1 =
. The corner at zero produces a discontinuous derivative that lets gradient descent push weights to exactly zero, producing sparse models. L2 (using ) lacks the corner, so weights only approach zero asymptotically.
Practice quiz
- Question 1Solve: |x| = 7
- Question 2Solve: |x - 3| = 5
- Question 3Solve: |x| = -4
- Question 4Solve: |2x - 5| ≤ 7. Give the interval.
- Question 5Solve: |x + 2| > 3. Use interval notation.
- Question 6|3x| = 12 implies:
- Question 7Solve: |x - 1| + 2 = 6
- Question 8Which ML loss is built on absolute value?
- Question 9Which regularizer corresponds to summing absolute values of weights?
- Reflection 10Why does L1 regularization produce sparse models, while L2 doesn’t?
Week 4 recap
You translated absolute-value equations into the positive and negative cases, decoded the structural pattern that <= produces a single bounded interval and
= produces a union of two unbounded rays, and connected absolute-value mechanics to L1 regularization and Mean Absolute Error in modeling. The takeaway is that |x| means distance from zero, and distance is never negative — that single fact diagnoses no-solution cases instantly. Three trap families fell this week: the single-case trap (writing only the positive split), the force-it-through trap (assigning a value to |x| = -k instead of declaring no solution), and the structural-pattern confusion (mixing up the interval shape for <= versus >=). The cumulative review reinforced PEMDAS, multi-step isolation, the inequality flip rule, distribution with negatives, and identity-vs-contradiction diagnosis from weeks one through three.
Coming next: Week 5 — Systems of Linear Equations (2 Variables)
Next week you broaden from one variable to two: pairs of linear equations forming a system. You will learn substitution and elimination, the algorithmic precursors to matrix inversion that powers closed-form linear regression and computer graphics. Solutions become points in the plane rather than numbers on a line, and you will classify systems by whether the lines meet at one point, run parallel, or coincide.
Saved in your browser only — no account, no server.