Graphing absolute values: piecewise formulas, reflections, and root counts
Two basic ways to handle an absolute value
For any real ,
A graph involving absolute values can therefore be drawn by splitting the domain where the expressions inside change sign. A useful special case is : retain the parts of above the horizontal axis and reflect every part below it across that axis.
The reflection rule applies to an absolute value around the whole output. It cannot be applied indiscriminately to every expression that happens to contain absolute values.
Example: two linear absolute values
For , the sign-change points are and . Thus
The pieces meet continuously at and .

Example: reflect a cubic
First draw . Its derivative is , so it has a local maximum at and local minimum at .
The factorization gives three zeros: .

Reflect the portions with negative output to obtain :

The three zeros stay in the same positions. Reflection changes heights, not horizontal coordinates.
Problem 1: an area bounded by a V-shaped graph
Problem. Find the area enclosed by and .
Split at :
The vertex is .

The line intersects the two branches at and . The enclosed triangle has base length four and height four, so its area is

The source presents this as a past numerical-reasoning problem from a Japanese civil-service examination. Its key step is recognizing the elementary triangle rather than introducing an unnecessary integral.
Problem 2: the least uniform bound on an interval
Problem. For a given real number , find the least real such that
for every with .
This asks for the maximum of the absolute value on the interval. Complete the square:
The vertex lies inside the interval, giving minimum value . The maximum of the unreflected quadratic occurs at and is . Hence its output range is exactly , and
The two extremes have equal absolute value when , or . Consequently
At the shared boundary both formulas equal .
![An upward quadratic on [-1,1], with vertex height a-1/4 and right-endpoint height a+2.](/images/blog/screenshot-2018-08-26-17.52.20.png)

The range calculation handles all , including values for which the entire original graph lies below the axis. If one additionally minimizes over , the best choice is and the least possible bound is ; that is a separate optimization from finding for a fixed .
Problem 3: count distinct real roots
Problem. For each real , determine the number of distinct real solutions of
Write the fixed graph as
We count its intersections with the line .

The branch x < 3
Its intersections satisfy
Tangency occurs when , giving or . The double roots are and , respectively, so both are in the correct branch.
An intersection can also pass through the branch boundary . This occurs when , or .
For , the left quadratic has one root below three and one above three, so only one counts. At , its roots are and ; the latter is excluded from this branch. For , both roots are below three. For , the discriminant is negative. For , both roots are negative and therefore below three. At , the double root contributes one distinct intersection.
The branch x >= 3
Here the equation is
Its two roots have opposite signs. The positive one lies at or above three precisely when the polynomial's value at three is nonpositive:
Thus this branch contributes one root when and none otherwise. The boundary root is counted here only, preventing duplication.
Combine the counts
The total number of distinct real roots is:
- : one.
- : two.
- : three.
- : two.
- : one.
- : two.
- : three.
A discriminant calculation alone would overcount roots that lie outside a branch's domain. Check both the tangent point and every ordinary root against the interval where the chosen piecewise formula is valid.
Related: root placement in intervals and graphical parameter separation.
Related articles
- Equating rational and irrational parts: proof and worked problems
- How to simplify nested square roots, with three worked examples
- Conditional probability: the formula, information protocols, and worked examples
- Integration by parts: formulas, proof, and four useful patterns
- Triple-angle identities: remember, derive, and apply them
About the author
Koki Saito
Physician and graduate of the University of Tokyo Faculty of Medicine. Drawing on his entrance-exam experience, he explains how to choose mathematical methods and construct complete solutions.
Full profile →Have a question or spotted an error? Contact us.