The Modulus Function
Strip away the sign, and every negative output flips upright — a graph that folds itself in half along the x-axis.
Defining the modulus
The modulus (or absolute value) of a number, $|x|$, strips away its sign and returns only its distance from zero. Formally,
So $|5|=5$ and $|-5|=5$: both outputs are non-negative, always. For a linear function, $y=|ax+b|$ takes the graph of $y=ax+b$ and reflects any part that dips below the x-axis back up above it, since the modulus can never output a negative value.
The sharp "vertex" of $y=|ax+b|$ sits exactly where the original line crosses the x-axis, i.e. where $ax+b=0$, so $x=-\dfrac{b}{a}$. To the left of the vertex the graph follows $y=-(ax+b)$; to the right, it follows the original $y=ax+b$. The graph is never negative, and the vertex is always the graph's minimum point.
Solving modulus equations and inequalities
An equation like $|2x-1|=x$ can be solved graphically (sketch both $y=|2x-1|$ and $y=x$, and read off intersection $x$-values) or algebraically, using one of two equivalent approaches:
Case split: solve the equation once assuming the expression inside the modulus is non-negative (so $|ax+b|=ax+b$), and once assuming it's negative (so $|ax+b|=-(ax+b)$) — then check each candidate solution actually satisfies the case assumed. Squaring: since $|A|=B \Leftrightarrow A^2=B^2$ (when $B\ge0$), squaring both sides removes the modulus entirely, at the cost of possibly introducing extra solutions that must be checked back in the original equation.
Inequalities such as $|2x-1|>x$ follow the same two approaches, but need extra care: solutions to a modulus inequality are typically a union of intervals, and a sketch is the most reliable way to see exactly which regions satisfy it before committing to algebra.
Even when solving algebraically, a quick sketch of both sides of an equation or inequality shows immediately how many solutions to expect and roughly where they lie — an essential sanity check, since squaring can silently introduce extra "solutions" that don't actually satisfy the original equation.
Worked example 1
A sketch alone doesn't give exact solution values — but it's invaluable for predicting how many solutions an algebraic method should produce, and for catching extraneous "solutions" that squaring can introduce (see Example 2).
Worked example 2
Squaring is only reversible when both roots are checked back in the original equation — because squaring can turn a false statement like $|{-5}|=-5$ into a true one ($25=25$), silently manufacturing invalid solutions. Here both roots happened to check out, but this must always be verified, never assumed.
Worked example 3
On the sketch from Example 1, the V-shaped graph $y=|2x-1|$ sits above the line $y=x$ everywhere except the middle section between the two intersection points — exactly the regions $x<\tfrac13$ and $x>1$ found algebraically here.
Worked example 4
When squaring $|A|=B$ where $B$ might be negative, extraneous roots can creep in. But $|A|=|B|$ squares to $A^2=B^2$ regardless of either expression's sign, since both sides of the original equation are guaranteed non-negative — so every algebraic root is automatically a genuine solution. Checking is still good exam practice, but here it's a formality rather than a necessity.
Every graph here has been the linear case $y=|ax+b|$, giving a V-shape. The same "reflect what's negative" idea extends to sketching $y=|f(x)|$ for any function $f$ — quadratics, cubics and beyond — plus a second, different way of folding a graph using $y=f(|x|)$. Both are covered in the final lesson of this topic.
Squaring an equation like $|2x-1|=x-5$ without first noting that the right-hand side could be negative — since $|2x-1|\ge0$ always, any solution requires $x-5\ge0$ too. Skipping this check is exactly how squaring introduces invalid roots that solve $A^2=B^2$ but not the original $|A|=B$; always verify final answers in the original, un-squared equation.
Check yourself
Solve $|3x+2|=x+4$ algebraically, checking both roots.
(Hint: square both sides, solve the quadratic, then verify each root in the original equation.)