What the graph of y = |x| looks like
|x| is the distance of x from zero, so it is x for positive numbers and −x for negative ones. The graph is two straight half-lines — y = −x on the left and y = x on the right — meeting at a sharp corner at the origin.
That corner is why |x| has no derivative at 0: the slope jumps from −1 to 1. It is the standard example of a function that is continuous everywhere but not differentiable everywhere. Shifts work as for parabolas: |x − h| + k has its vertex at (h, k).
Key features of y = |x|
| Property | Value |
|---|---|
| Function | y = |x| (Absolute value function) |
| Family | Absolute value |
| Domain | All real numbers (−∞, ∞) |
| Range | y ≥ 0, i.e. [0, ∞) |
| x-intercept(s) | x = 0 |
| y-intercept | y = 0 |
| Symmetry | Even — symmetric about the y-axis |
| Asymptotes | None |
| Period | Not periodic |
| Increasing on | [0, ∞) |
| Decreasing on | (−∞, 0] |
| Key points | Vertex (corner) at (0, 0); slopes −1 and 1 |
| Derivative f′(x) | −1 for x < 0, 1 for x > 0 (undefined at 0) |
| Antiderivative ∫ f(x) dx | x|x|/2 + C |
Symmetry: Even — symmetric about the y-axis. For example f(2) = 2 and f(−2) = 2 are equal, so the left half mirrors the right half. Intercepts: the graph meets the x-axis at x = 0 and the y-axis at y = 0.
Table of values for y = |x|
| x | y = |x| | Slope f′(x) |
|---|---|---|
| −3 | 3 | −1 |
| −2 | 2 | −1 |
| −1 | 1 | −1 |
| 0 | 0 | undefined |
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 3 | 1 |
How to sketch y = |x| by hand
Plot the points from the table — (−3, 3), (−2, 2), (−1, 1), (0, 0), (1, 1), (2, 2) — on axes running from about −5 to 5 horizontally. There are no asymptotes to draw. Then join the points with a smooth curve. As a check on the shape — increasing: [0, ∞); decreasing: (−∞, 0].
Derivative, tangent line and area
The derivative of y = |x| is −1 for x < 0, 1 for x > 0 (undefined at 0), which gives the slope of the curve at each point (the third column of the table). At x = 2 the curve is at height 2 and its slope is f′(2) = 1, so the tangent line there is y = x.
The signed area under the curve from x = −1 to x = 2 is 2.5, found using the antiderivative x|x|/2 + C.
Related graphs and transformations
- y = |x − 2| — Shifted right 2
- y = x — The right half
- y = −x — The left half
- y = x² — Smooth U-shape instead of a corner
- y = ⌊x⌋ — Another piecewise function
Browse all graphs of common functions by family, or open the graphing calculator.