0:00 / 0:00

Absolute Value Functions

The absolute value function is defined as follows:
x={xif  x0xif  x<0\boxed{|x| = \begin{cases} x\hspace{1.06cm} \text{if }\ x\geq0\\ -x\hspace{0.8cm}\text{if }\ x<0\\ \end{cases}}

Wize Tip
Functions defined in this way are called piecewise: they have different behaviours depending on the value of xx.

In this case, we see that positive numbers xx are unchanged, but negative numbers are negated to "undo" the negative.

Graph of x\bco{|x|}

The graph of y=x\colorOne{y=|x|} is similar to the graph of y=xy=x.
The only difference is for numbers less than 0: the y-values must stay positive!
Domain: xRx \in \reals (all real numbers)
Range: {yR  y0}\{ y \in \reals \ |\ y\ge 0 \} (only non-negative numbers)

  x    y=x  2211001122\begin{array}{c|c} \ \ x \ \ &\ \ y=|x| \ \ \\[0.2em] \hline \colorFour{-2} & \colorOne2 \\ \colorFour{-1} & \colorOne1 \\ 0 & 0 \\ 1 & 1\\ 2 & 2 \end{array}

PAGE BREAK

Graphing Absolute Value Functions

The absolute value of a function is the same as the original function, except that negative parts are reflected up across the x-axis to make them positive.


Steps

1. Graph the original function

2. Wherever the function is negative (below the x-axis), "flip" it up to make it positive.


Example

Graph y=2x6y=|2x-6|.

Start by graphing y=2x6y=2x-6. This has a y-intercept of -6 and a slope of 2.

Notice the x-intercept at x=3. Here, the function changes sign. We have to flip the negative part up to make it positive.

























0:00 / 0:00

Example: Absolute Value Functions

a) Graph the function f(x)=x2+6x+7f(x)=|x^2+6x+7|.

To begin, we consider the function without the absolute value: y=x2+6x+7y=x^2+6x+7.

We can approach graphing this quadratic in a few ways, but here we'll complete the square to convert to vertex form.

y=(x2+6x)+7=(x2+6x+(62)2(62)2)+7=(x2+6x+9)9+7=(x+3)22\begin{aligned} y &= (x^2+6x)+7\\[0.5em] &= \Big(x^2+6x+\left(\small \frac{6}{2}\right)^2 - \left(\small \frac{6}{2}\right)^2 \Big)+7\\[0.5em] &= (x^2 +6x +9) -9+7\\[0.5em] &= (x+3)^2 -2 \end{aligned}
Therefore, the vertex is (3,2)(-3,-2), and the parabola opens up since the leading coefficient a=1a=1 is positive.


Now we look for where the function is negative.
In this case, we see that the y-values are negative between the x-intercepts.
Take this section and reflect it up across the x-axis to obtain the graph of y=x2+6x+7y=|x^2+6x+7|:


PAGE BREAK
b) Write f(x)=x2+6x+7f(x)=|x^2+6x+7| as a piecewise function.

We see that there are two "parts" to this graph.

To be precise about where they split, we must find the zeros using the quadratic formula.
x=6±624(1)(7)2(1)=6±82=6±222=3±2x4.414, 1.586\begin{aligned} x &= \dfrac{-6 \pm \sqrt{6^2-4(1)(7)}}{2(1)} \\[1em] &= \dfrac{-6 \pm \sqrt{8}}{2} \\[1em] &= \dfrac{-6 \pm 2\sqrt{2}}{2} \\[1em] &= -3\pm \sqrt{2} \\[1em] x &\approx -4.414,\ -1.586 \end{aligned}

  1. The first part is the original function without the absolute value: x2+6x+7x^2+6x+7. This is the part of the graph that has not been reflected. It appears to the left of the leftmost x-intercept: x<4.414x<-4.414 and to the right of the rightmost x-intercept: x>1.586x>-1.586
  2. The second part is the part that we reflected across the x-axis. This function is simply the negative of the original: (x2+6x+7)    x26x7-(x^2+6x+7) \ \ \longrightarrow\ \ -x^2-6x-7 It appears between the x-intercepts: 4.414x1.586-4.414 \le x \le -1.586
Putting these together, we can write the following piecewise function:
x2+6x+7={x2+6x+7,ifx<4.414  or  x>1.586x26x7,if1.586x4.414|x^2+6x+7| = \left\{ \begin{array}{rcl} x^2+6x+7, & \text{if}& x<-4.414 \ \text{ or }\ x>-1.586\\[0.5em] -x^2-6x-7, & \text{if} & -1.586\le x \le-4.414 \end{array} \right.

Practice: Absolute Value Functions

The following table of values shows values of xx and the corresponding values of f(x)f\left(x\right).

Fill in the third column with the correct values of f(x)\left|f\left(x\right)\right|.
xf(x)|f(x)|
-2-8
-15
0-2
1-1
29

Practice: Absolute Value Functions

Answer the following questions about the function f(x)=12x2f\left(x\right)=\left|-\dfrac{1}{2}x-2\right|.
Select the correct graph of f(x)=12x2f\left(x\right)=\left|-\dfrac{1}{2}x-2\right|.

Practice: Absolute Value Functions

The following questions refer to the function y=x22x+8y=|-x^2-2x+8|.
What are the xx-intercepts of the quadratic inside the absolute value: y=x22x+8y=-x^2-2x+8?