The absolute value |x| is the distance of x from 0, so it is never negative: |3| = 3 and |−3| = 3. Its graph is a sharp V, and transformations of that V are a favourite way to practise shifts.
The basic graph: y = |x|
- For x ≥ 0, |x| = x — a line with gradient 1.
- For x < 0, |x| = −x — a line with gradient −1.
The two pieces meet at the vertex (0, 0). The graph is symmetric about the y-axis.
In the calculator, type abs(x) (or use the |x| key).
Transforming to y = |x − 2| − 1
- Horizontal shift. Replacing x with x − 2 moves the graph 2 units right. The vertex moves to (2, 0). (The sign feels backwards: x − 2 means right, x + 2 means left.)
- Vertical shift. Subtracting 1 outside the absolute value moves the graph 1 unit down. The vertex becomes (2, −1).
Finding the key points
Roots. Solve |x − 2| − 1 = 0, so |x − 2| = 1. A distance of 1 from 2 means x − 2 = 1 or x − 2 = −1, so x = 3 or x = 1.
y-intercept. y = |0 − 2| − 1 = 2 − 1 = 1, giving (0, 1).
Vertex. (2, −1), the lowest point. The range is y ≥ −1.
| x | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| y | 1 | 0 | −1 | 0 | 1 |
The symmetric values about x = 2 confirm the axis of symmetry.
Compare y = |x| and y = |x − 2| − 1 →
In Roots & intersections, the calculator reports x-intercepts ≈ (1, 0) and (3, 0) and a y-intercept of (0, 1).
The corner at the vertex
Unlike a parabola, the V has a sharp corner. The gradient jumps from −1 on the left to +1 on the right, so there is no single tangent line at the vertex. In calculus language the function is continuous there but not differentiable. When sketching, draw two straight rays that meet at a point — don’t round it off.
Other transformations
- Steeper V: y = 3|x| has gradients ±3.
- Upside-down V: y = −|x| opens downwards with a maximum at the vertex.
- General form: y = a|x − h| + k has vertex (h, k), opens up if a > 0 and down if a < 0.
Solving with the graph
Absolute value equations and inequalities become easy to see once you have the V:
- |x − 2| − 1 = 0 — read the roots: x = 1 and x = 3.
- |x − 2| − 1 = 2 — add the line
2as y₂ and find the intersections: |x − 2| = 3, so x = −1 or x = 5. - |x − 2| − 1 < 0 — the graph is below the x-axis between the roots, so 1 < x < 3. (Our calculator does not shade inequalities, but the roots tell you the boundary.)
Check each intersection by substitution: |−1 − 2| − 1 = 3 − 1 = 2 ✓ and |5 − 2| − 1 = 2 ✓.
Piecewise form
You can also write the function without the bars, which helps with algebra:
- for x ≥ 2: y = (x − 2) − 1 = x − 3;
- for x < 2: y = −(x − 2) − 1 = −x + 1.
Each piece is a straight line, and they meet at the vertex (2, −1).
Common mistakes
- Moving the graph left for |x − 2|. It moves right.
- Typing
|x-2|with bar characters. Useabs(x-2). - Rounding the corner into a curve.
- Solving |x − 2| = 1 and keeping only x = 3.
Common questions
Can |x| ever be negative?
No. |x| is a distance, so it is always zero or positive. Expressions such as |x − 2| − 1 can be negative because of the subtraction outside.
Why does the root finder handle the vertex correctly?
If a V just touches the axis, as y = |x − 2| does at x = 2, there is no sign change. Our tool also searches for points where the function reaches zero without crossing and labels them as touching.
How this guide was made: drafted with AI assistance under the site’s editorial policy. Worked examples and plotted figures are computed by the same maths engine as our calculators and checked by automated tests. Found an error? Report a correction.