The function $f(x) = |x|$ is a piecewise function in disguise: $$|x| = \begin{cases} -x & \text{if } x < 0 \\ x & \text{if } x \ge 0 \end{cases}$$ Its graph is a V: the line $y = -x$ on the left, the line $y = x$ on the right, meeting at the vertex $(0, 0)$.
Why it works
Why a V? Absolute value is distance from $0$, as in absolute value equations, so it is never negative, and it grows at the same rate in both directions. In $f(x) = a|x - h| + k$: the inside is $0$ when $x = h$, so the turn happens there; then the output is $k$, so the vertex is $(h, k)$. The number $a$ is the slope of the right side ($-a$ on the left): a positive $a$ opens up, a negative $a$ opens down, and a larger $|a|$ makes a narrower V.
Key idea
$f(x) = a|x - h| + k$ is a V with vertex $(h, k)$. It opens up if $a > 0$ and down if $a < 0$; its two sides are lines with slopes $a$ and $-a$.
Worked examples
Worked example: Read the features
Describe the graph of $f(x) = -2|x + 1| + 4$.
- Write it as $-2|x - (-1)| + 4$: $h = -1$ and $k = 4$, so the vertex is $(-1, 4)$.
- $a = -2 < 0$: it opens down, so $4$ is the maximum value.
- Each side has slope $\pm 2$: from the vertex, go $1$ right and $2$ down.
Answer: Vertex $(-1, 4)$, opens down, maximum $4$.
Worked example: Write it as two lines
Write $g(x) = |x - 3| + 1$ without bars for $x \ge 3$ and for $x < 3$.
- For $x \ge 3$, $x - 3 \ge 0$, so $|x - 3| = x - 3$ and $g(x) = x - 2$.
- For $x < 3$, $x - 3 < 0$, so $|x - 3| = 3 - x$ and $g(x) = 4 - x$.
Answer: $g(x) = x - 2$ for $x \ge 3$; $g(x) = 4 - x$ for $x < 3$.
The sign inside the bars is opposite to the shift: $|x - 3|$ moves the vertex right to $x = 3$, and $|x + 1|$ moves it left to $x = -1$.