# How do you graph y = -2|x-4|+4?

Apr 20, 2018

Try getting rid of the absolute value operator by rewriting it as a piecewise function.
graph{-2abs(x-4)+4 [-10, 10, -5, 5]}

#### Explanation:

The inner function of the absolute value operator has a single zero at $x = 4$. Thus the output of the absolute value would be linear on ranges $\left(- \infty , 4\right)$ and $\left(4 , \infty\right)$. Hence it would be possible to define an equivalent piecewise function with no absolute values on the two ranges.

$y = - 2 \textcolor{b l u e}{\left[\textcolor{red}{-} \textcolor{b l a c k}{\left(x - 4\right)}\right]} + 4 = 2 \left(x - 4\right) + 4 = 2 x - 4$,
$x \in \left(- \infty , 4\right)$

$y = - 2 \textcolor{b l u e}{\left[\textcolor{b l a c k}{\left(x - 4\right)}\right]} + 4 = - 2 x + 12$,
$x \in \left(4 , \infty\right)$

Note that you'll need to reverse the sign of the inner function when removing the absolute value operator in case the expression inside the absolute value yields a negative value.

Plotting the two functions on their respective range gives: Combining the two rays will give the final v-shaped curve.
graph{-2abs(x-4)+4 [-4, 16, -5, 5]}