Graph of y = |x| (Absolute value function)

· How we calculate · Free, no sign-up

Quick answer

The graph of y = |x| is a V-shape with its vertex at the origin (0, 0). Domain: All real numbers (−∞, ∞); range: y ≥ 0, i.e. [0, ∞). x-intercept: x = 0; y-intercept: y = 0. It is even (symmetric about the y-axis).

Functiony = |x|
DomainAll real numbers (−∞, ∞)
Rangey ≥ 0, i.e. [0, ∞)
x-intercept(s)x = 0
y-intercepty = 0
Derivative−1 for x < 0, 1 for x > 0 (undefined at 0)
Graph of y = |x| for −5 ≤ x ≤ 5−5−4−3−2−1012345−2−10123456
Graph of y = |x| for −5 ≤ x ≤ 5, −2 ≤ y ≤ 6. Dots mark intercepts.
Zoom, pan and trace y = |x| in the interactive grapher.Open the Graphing Calculator →

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|

Key features of y = |x|
PropertyValue
Functiony = |x| (Absolute value function)
FamilyAbsolute value
DomainAll real numbers (−∞, ∞)
Rangey ≥ 0, i.e. [0, ∞)
x-intercept(s)x = 0
y-intercepty = 0
SymmetryEven — symmetric about the y-axis
AsymptotesNone
PeriodNot periodic
Increasing on[0, ∞)
Decreasing on(−∞, 0]
Key pointsVertex (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) dxx|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|

Values of y = |x|
xy = |x|Slope f′(x)
−33−1
−22−1
−11−1
00undefined
111
221
331

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

Browse all graphs of common functions by family, or open the graphing calculator.

Frequently asked questions

What is the domain and range of y = |x|?

Domain: All real numbers (−∞, ∞). Range: y ≥ 0, i.e. [0, ∞).

What are the intercepts of y = |x|?

x-intercept(s): x = 0. y-intercept: y = 0.

What is the derivative of y = |x|?

f′(x) = −1 for x < 0, 1 for x > 0 (undefined at 0). At x = 2 the curve is at height 2 and its slope is f′(2) = 1, so the tangent line there is y = x.

Is y = |x| even, odd or neither?

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.

Does y = |x| have asymptotes?

None.