Absolute Value Graph: y = |x| and Its Transformations
The absolute value function measures distance from zero, ignoring direction. Its graph is a V: two straight rays meeting at a sharp corner, which makes it the standard example of a function that is continuous but not smooth.
Open this graph in the calculator
What you are looking at
The teal curve is y = |x|. For positive x it is identical to y = x. For negative x it is y = −x, which is the reflection of the left half upward. The two meet at the origin in a corner.
The rose curve is y = |x − 3| − 2, the same V moved three right and two down, so its corner is at (3, −2). The rules are the same as for any transformation: inside the bars moves horizontally and opposite to the sign; outside moves vertically.
It is a piecewise function in disguise
The compact notation hides a two-part definition: |x| equals x when x is at least 0, and −x when x is negative. Writing it out that way explains the corner. Two different straight lines meet at x = 0, and they arrive with different slopes.
Because the slopes disagree at that point, the function has no single tangent line there. It is continuous, with no gap or jump, but not differentiable at the corner. Almost every calculus course uses this example to show that the two ideas are different.
Solving equations and inequalities
An absolute value equation usually has two solutions, because two different inputs give the same distance from zero. |x − 3| = 5 means x − 3 is either 5 or −5, so x is 8 or −2.
Inequalities split into two shapes worth memorising, and graphing them makes the reason obvious.
| Inequality | Equivalent to | Region |
|---|---|---|
| |x| < a | −a < x < a | A single interval around zero |
| |x| > a | x < −a or x > a | Two separate intervals |
| |x − h| < a | h − a < x < h + a | An interval centred on h |
What it is used for
Absolute value expresses tolerance. A component specified as 10 mm ± 0.2 mm satisfies |length − 10| ≤ 0.2. It also expresses error: |measured − true| is how far off a measurement is, regardless of direction.
The same idea drives distance on the number line. |a − b| is the distance between a and b, and it does not matter which one is larger.
Questions
Why does the graph have a corner rather than a curve?
Because it is made of two straight lines with different slopes, +1 and −1, meeting at a point. Nothing rounds the join, so the change in direction is instantaneous.
Is |x| the same as √(x²)?
Yes, for all real x. Squaring discards the sign and the square root returns the non-negative value, which is exactly what absolute value does. It is sometimes a useful substitution.
Can |x| ever be negative?
No. That is its defining property. An equation such as |x| = −3 has no solution at all, which is worth checking before doing any algebra.