A clear walkthrough of absolute value functions: the parent function f(x) = |x|, its V-shaped graph, the piecewise definition behind it, and how adding, subtracting, or multiplying numbers shifts, stretches, or flips the graph.
What is an absolute value function?
An absolute value function is any function that contains the absolute value of a variable expression. The most basic example, called the parent function, is
\( f(x) = |x| \)
Recall from introduction to absolute value that \(|x|\) means "the distance of \(x\) from zero," which is always zero or positive. Because the output can never be negative, the graph of an absolute value function always bends into a V shape instead of continuing in a straight line.
Writing an absolute value function as a piecewise function
Every absolute value function is secretly two linear functions joined at a corner. For the parent function, this looks like:
\( f(x) = \begin{cases} x, & x \ge 0 \) \( -x, & x < 0 \end{cases} \)
When \(x\) is zero or positive, \(|x|\) simply equals \(x\). When \(x\) is negative, \(|x|\) equals \(-x\), which flips the negative value back to a positive one. This is why the topic is sometimes described using the phrase "absolute value and piecewise functions": the V-shaped graph is really the union of two rays, one with slope \(1\) and one with slope \(-1\), meeting at the vertex.
Graphing the parent function
To graph \(f(x) = |x|\), it helps to build a table of values first:
x
-2
-1
0
1
2
f(x)
2
1
0
1
2
Plotting these points produces the classic V shape shown below, with the vertex sitting right at the origin.
The parent absolute value function f(x) = |x|, with vertex at (0, 0).
The domain of this function is all real numbers, since any \(x\)-value can be substituted in. The range, however, is only \(y \ge 0\), because the output is never negative.
Transformations of the absolute value function
Just like other function families, the parent function can be shifted, stretched, or flipped using the general form
\( f(x) = a|x - h| + k \)
\(h\) shifts the graph left or right, moving the vertex to \(x = h\).
\(k\) shifts the graph up or down, moving the vertex to \(y = k\).
\(a\) controls the steepness of the two branches; a larger \(|a|\) makes the V narrower, and a smaller \(|a|\) makes it wider.
If \(a\) is negative, the V flips upside down, opening downward instead of upward.
Worked example
Graph \( f(x) = |x - 2| + 1 \).
Compare this to \(a|x-h|+k\): here \(h = 2\) and \(k = 1\), so the vertex moves from \((0, 0)\) to \((2, 1)\). Since \(a = 1\), the shape and steepness stay the same as the parent function, just relocated.
Graph of f(x) = |x - 2| + 1, with vertex shifted to (2, 1).
Notice the graph is identical to \(f(x) = |x|\), only slid \(2\) units right and \(1\) unit up. Writing this transformed version as a piecewise function follows the same idea as before, splitting at the vertex \(x = 2\):
\( f(x) = \begin{cases} x - 1, & x \ge 2 \) \( 3 - x, & x < 2 \end{cases} \)
Why the vertex matters
The vertex of an absolute value function is the sharp corner point where the graph changes direction, and it always corresponds to the value of \(x\) that makes the expression inside the absolute value equal to zero. Finding that \(x\)-value first (by setting \(x - h = 0\)) is often the fastest way to sketch a quick graph without a full table of values.
Where absolute value functions show up next
Once you're comfortable graphing these V-shaped functions, the next natural steps are solving absolute value equations, where you find the \(x\)-values that make the function equal a given number, and using the graph to reason about absolute value inequalities. Function notation itself, writing \(f(x)\) instead of \(y\), is also worth reviewing if the notation used here feels unfamiliar.