Functions & Graphs

How to Graph Absolute Value Functions

Short answer: Start with the V-shaped graph of y = |x|, which has its corner at (0, 0). For y = |x − h| + k, move it h units right and k units up. y = |x − 2| − 1 has its vertex at (2, −1) and crosses the x-axis at x = 1 and x = 3.

The V-shaped graph y = |x − 2| − 1 with its vertex at (2, −1), arrows showing a shift 2 right and 1 down from y = |x|.

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

Three panels: y = |x| with vertex (0, 0); y = |x − 2| with vertex (2, 0); y = |x − 2| − 1 with vertex (2, −1) and roots at 1 and 3.
From |x| to |x − 2| − 1 in two moves: 2 units right, then 1 unit down.
  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.)
  2. 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.

Values of y = |x − 2| − 1
x01234
y10−101

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 2 as 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.)

Plot |x − 2| − 1 and y = 2 →

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

Watch for these
  • Moving the graph left for |x − 2|. It moves right.
  • Typing |x-2| with bar characters. Use abs(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.

The line y = 2x + 1 with its x-intercept (−0.5, 0) marked by a circle and its y-intercept (0, 1) marked by a square.
Functions & Graphs

How to Find X- and Y-Intercepts on a Graph

Two short procedures — set y = 0 for x-intercepts, set x = 0 for the y-intercept — worked for a line and a parabola, plus how to treat calculator estimates.

Updated 3 min read
The parabola y = x² − 4 with its roots at (−2, 0) and (2, 0) and its vertex at (0, −4) highlighted.
Functions & Graphs

How to Graph Quadratic Functions

Find the roots, vertex and axis of symmetry of y = x² − 4, sketch the parabola, and see how a repeated root like (x − 1)² touches the axis.

Updated 4 min read