What the graph of y = |x − 2| looks like
y = |x − 2| measures how far x is from 2, so it is 0 at x = 2 and grows by 1 for every unit you move away in either direction. Graphically it is y = |x| slid 2 units to the right, with its corner at (2, 0) and a y-intercept of |0 − 2| = 2.
Inequalities like |x − 2| < 1 can be read straight off the graph: the curve is below height 1 between x = 1 and x = 3, so the solution is 1 < x < 3.
Key features of y = |x − 2|
| Property | Value |
|---|---|
| Function | y = |x − 2| (Shifted absolute value) |
| Family | Absolute value |
| Domain | All real numbers (−∞, ∞) |
| Range | y ≥ 0, i.e. [0, ∞) |
| x-intercept(s) | x = 2 |
| y-intercept | y = 2 |
| Symmetry | Neither even nor odd (symmetric about the vertical line x = 2) |
| Asymptotes | None |
| Period | Not periodic |
| Increasing on | [2, ∞) |
| Decreasing on | (−∞, 2] |
| Key points | Vertex (corner) at (2, 0) |
| Derivative f′(x) | −1 for x < 2, 1 for x > 2 (undefined at 2) |
| Antiderivative ∫ f(x) dx | (x − 2)|x − 2|/2 + C |
Symmetry: Neither even nor odd (symmetric about the vertical line x = 2). For example f(2) = 0 but f(−2) = 4, which is neither the same value nor its negative. Intercepts: the graph meets the x-axis at x = 2 and the y-axis at y = 2.
Table of values for y = |x − 2|
| x | y = |x − 2| | Slope f′(x) |
|---|---|---|
| −3 | 5 | −1 |
| −2 | 4 | −1 |
| −1 | 3 | −1 |
| 0 | 2 | −1 |
| 1 | 1 | −1 |
| 2 | 0 | undefined |
| 3 | 1 | 1 |
How to sketch y = |x − 2| by hand
Plot the points from the table — (−3, 5), (−2, 4), (−1, 3), (0, 2), (1, 1), (2, 0) — on axes running from about −3 to 7 horizontally. There are no asymptotes to draw. Then join the points with a smooth curve. As a check on the shape — increasing: [2, ∞); decreasing: (−∞, 2].
Derivative, tangent line and area
The derivative of y = |x − 2| is −1 for x < 2, 1 for x > 2 (undefined at 2), which gives the slope of the curve at each point (the third column of the table). At x = 1 the curve is at height 1 and its slope is f′(1) = −1, so the tangent line there is y = −x + 2.
The signed area under the curve from x = 0 to x = 4 is 4, found using the antiderivative (x − 2)|x − 2|/2 + C.
Related graphs and transformations
- y = |x| — Parent V-shape (shift right 2)
- y = (x − 2)² — Same shift on a parabola
- y = 2x + 1 — A straight line
- y = ⌊x⌋ — A step function
Browse all graphs of common functions by family, or open the graphing calculator.