Absolute Value Functions

LEARNING OBJECTIVES

By the end of this lesson, you will be able to:

• Graph an absolute value function.
• Solve an absolute value equation.
• Solve an absolute value inequality.

Until the 1920s, the so-called spiral nebulae were believed to be clouds of dust and gas in our own galaxy, some tens of thousands of light years away. Then, astronomer Edwin Hubble proved that these objects are galaxies in their own right, at distances of millions of light years. Today, astronomers can detect galaxies that are billions of light years away. Distances in the universe can be measured in all directions. As such, it is useful to consider distance as an absolute value function. In this section, we will investigate absolute value functions.

Understanding Absolute Value

Recall that in its basic form $\displaystyle{f}\left({x}\right)={|x|}$, the absolute value function, is one of our toolkit functions. The absolute value function is commonly thought of as providing the distance the number is from zero on a number line. Algebraically, for whatever the input value is, the output is the value without regard to sign.

A General Note: Absolute Value Function

The absolute value function can be defined as a piecewise function

$f(x) = \begin{cases} x ,\ x \geq 0 \\ -x , x < 0\\ \end{cases}$

Example 1: Determine a Number within a Prescribed Distance

Describe all values $x$ within or including a distance of 4 from the number 5.

Solution Figure 2

We want the distance between $x$ and 5 to be less than or equal to 4. We can draw a number line to represent the condition to be satisfied.

The distance from $x$ to 5 can be represented using the absolute value as $|x - 5|$. We want the values of $x$ that satisfy the condition $|x - 5|\le 4$.

Analysis of the Solution

Note that

$\displaystyle{-4}\le{x - 5}$
$\displaystyle{1}\le{x}$
And:
$\displaystyle{x-5}\le{4}$
$\displaystyle{x}\le{9}$

So $|x - 5|\le 4$ is equivalent to $1\le x\le 9$.

However, mathematicians generally prefer absolute value notation.

Try It 1

Describe all values $x$ within a distance of 3 from the number 2.

Solution

Example 2: Resistance of a Resistor

Electrical parts, such as resistors and capacitors, come with specified values of their operating parameters: resistance, capacitance, etc. However, due to imprecision in manufacturing, the actual values of these parameters vary somewhat from piece to piece, even when they are supposed to be the same. The best that manufacturers can do is to try to guarantee that the variations will stay within a specified range, often $\displaystyle\text{\pm 1%,}\pm\text{5%,}$ or $\displaystyle\pm\text{10%}$.

Suppose we have a resistor rated at 680 ohms, $\pm 5%$. Use the absolute value function to express the range of possible values of the actual resistance.

Solution

5% of 680 ohms is 34 ohms. The absolute value of the difference between the actual and nominal resistance should not exceed the stated variability, so, with the resistance $R$ in ohms,

$|R - 680|\le 34$

Try It 2

Students who score within 20 points of 80 will pass a test. Write this as a distance from 80 using absolute value notation.

Solution

Graphing an Absolute Value Function

The most significant feature of the absolute value graph is the corner point at which the graph changes direction. This point is shown at the origin. Figure 3

Figure 4 is the graph of $y=2\left|x - 3\right|+4$. The graph of $y=|x|$ has been shifted right 3 units, vertically stretched by a factor of 2, and shifted up 4 units. This means that the corner point is located at $\left(3,4\right)$ for this transformed function. Figure 4

Example 3: Writing an Equation for an Absolute Value Function

Write an equation for the function graphed in Figure 5. Figure 5

Solution

The basic absolute value function changes direction at the origin, so this graph has been shifted to the right 3 units and down 2 units from the basic toolkit function. Figure 6

We also notice that the graph appears vertically stretched, because the width of the final graph on a horizontal line is not equal to 2 times the vertical distance from the corner to this line, as it would be for an unstretched absolute value function. Instead, the width is equal to 1 times the vertical distance. Figure 7

From this information we can write the equation

$\begin{cases}f\left(x\right)=2\left|x - 3\right|-2,\hfill & \text{treating the stretch as a vertical stretch, or}\hfill \\ f\left(x\right)=\left|2\left(x - 3\right)\right|-2,\hfill & \text{treating the stretch as a horizontal compression}.\hfill \end{cases}$

Analysis of the Solution

Note that these equations are algebraically equivalent—the stretch for an absolute value function can be written interchangeably as a vertical or horizontal stretch or compression.

Q & A

If we couldn’t observe the stretch of the function from the graphs, could we algebraically determine it?

Yes. If we are unable to determine the stretch based on the width of the graph, we can solve for the stretch factor by putting in a known pair of values for $x$ and $f\left(x\right)$.

$f\left(x\right)=a|x - 3|-2$

Now substituting in the point (1, 2)

$\begin{cases}2=a|1 - 3|-2\hfill \\ 4=2a\hfill \\ a=2\hfill \end{cases}$

Try It 3

Write the equation for the absolute value function that is horizontally shifted left 2 units, is vertically flipped, and vertically shifted up 3 units.

Solution

Q & A

Do the graphs of absolute value functions always intersect the vertical axis? The horizontal axis?

Yes, they always intersect the vertical axis. The graph of an absolute value function will intersect the vertical axis when the input is zero.

No, they do not always intersect the horizontal axis. The graph may or may not intersect the horizontal axis, depending on how the graph has been shifted and reflected. It is possible for the absolute value function to intersect the horizontal axis at zero, one, or two points.

Solving an Absolute Value Equation

Now that we can graph an absolute value function, we will learn how to solve an absolute value equation. To solve an equation such as ${8}=\left|{2}x - {6}\right|$, we notice that the absolute value will be equal to 8 if the quantity inside the absolute value is 8 or -8. This leads to two different equations we can solve independently.

$\begin{cases}2x - 6=8\hfill & \text{or}\hfill & 2x - 6=-8\hfill \\ 2x=14\hfill & \hfill & 2x=-2\hfill \\ x=7\hfill & \hfill & x=-1\hfill \end{cases}$

Knowing how to solve problems involving absolute value functions is useful. For example, we may need to identify numbers or points on a line that are at a specified distance from a given reference point.

An absolute value equation is an equation in which the unknown variable appears in absolute value bars. For example,

$\begin{cases}|x|=4,\hfill \\ |2x - 1|=3\hfill \\ |5x+2|-4=9\hfill \end{cases}$

A General Note: Solutions to Absolute Value Equations

For real numbers $A$ and $B$, an equation of the form $|A|=B$, with $B\ge 0$, will have solutions when $A=B$ or $A=-B$. If $B<0$, the equation $|A|=B$ has no solution.

How To: Given the formula for an absolute value function, find the horizontal intercepts of its graph.

1. Isolate the absolute value term.
2. Use $|A|=B$ to write $A=B$ or $\mathrm{-A}=B$, assuming $B>0$.
3. Solve for $x$.

Example 4: Finding the Zeros of an Absolute Value Function

For the function $f\left(x\right)=|4x+1|-7$ , find the values of $x$ such that $\text{ }f\left(x\right)=0$ .

Solution

$\begin{cases}0=|4x+1|-7\hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \text{Substitute 0 for }f\left(x\right).\hfill \\ 7=|4x+1|\hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \text{Isolate the absolute value on one side of the equation}.\hfill \\ \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \\ \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \\ \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \\ 7=4x+1\hfill & \text{or}\hfill & \hfill & \hfill & \hfill & -7=4x+1\hfill & \text{Break into two separate equations and solve}.\hfill \\ 6=4x\hfill & \hfill & \hfill & \hfill & \hfill & -8=4x\hfill & \hfill \\ \hfill & \hfill & \hfill & \hfill & \hfill & \hfill & \hfill \\ x=\frac{6}{4}=1.5\hfill & \hfill & \hfill & \hfill & \hfill & \text{ }x=\frac{-8}{4}=-2\hfill & \hfill \end{cases}$ Figure 9

The function outputs 0 when $x=1.5$ or $x=-2$.

Try It 4

For the function $f\left(x\right)=|2x - 1|-3$, find the values of $x$ such that $f\left(x\right)=0$.

Solution

Q & A

Should we always expect two answers when solving $|A|=B?$

No. We may find one, two, or even no answers. For example, there is no solution to $2+|3x - 5|=1$.

How To: Given an absolute value equation, solve it.

1. Isolate the absolute value term.
2. Use $|A|=B$ to write $A=B$ or $A=\mathrm{-B}$.
3. Solve for $x$.

Example 5: Solving an Absolute Value Equation

Solve $1=4|x - 2|+2$.

Solution

Isolating the absolute value on one side of the equation gives the following.

$\begin{cases}1=4|x - 2|+2\hfill \\ -1=4|x - 2|\hfill \\ -\frac{1}{4}=|x - 2|\hfill \end{cases}$

The absolute value always returns a positive value, so it is impossible for the absolute value to equal a negative value. At this point, we notice that this equation has no solutions.

Q & A

In Example 5, if $f\left(x\right)=1$ and $g\left(x\right)=4|x - 2|+2$ were graphed on the same set of axes, would the graphs intersect?

No. The graphs of $f$ and $g$ would not intersect. This confirms, graphically, that the equation $1=4|x - 2|+2$ has no solution.

Try It 5

Find where the graph of the function $f\left(x\right)=-|x+2|+3$ intersects the horizontal and vertical axes.

Solution

Solving an Absolute Value Inequality

Absolute value equations may not always involve equalities. Instead, we may need to solve an equation within a range of values. We would use an absolute value inequality to solve such an equation. An absolute value inequality is an equation of the form

$|{A}|<{ B },|{ A }|\le{ B },|{ A }|>{ B },\text{ or } |{ A }|\ge { B }$,

where an expression $A$ (and possibly but not usually $B$ ) depends on a variable $x$. Solving the inequality means finding the set of all $x$ that satisfy the inequality. Usually this set will be an interval or the union of two intervals.

There are two basic approaches to solving absolute value inequalities: graphical and algebraic. The advantage of the graphical approach is we can read the solution by interpreting the graphs of two functions. The advantage of the algebraic approach is it yields solutions that may be difficult to read from the graph.

For example, we know that all numbers within 200 units of 0 may be expressed as

$|x|<{ 200 }\text{ or }{ -200 }<{ x }<{ 200 }\text{ }$

Suppose we want to know all possible returns on an investment if we could earn some amount of money within $200 of$600. We can solve algebraically for the set of values $x$ such that the distance between $x$ and 600 is less than 200. We represent the distance between $x$ and 600 as $|{ x } - {600 }|$.

$|{ x } -{ 600 }|<{ 200 }$
OR
${ -200 }<{ x } - { 600 }<{ 200 }$
${-200 }+{ 600 }<{ x } - {600 }+{ 600 }<{ 200 }+{ 600 }$
${ 400 }<{ x }<{ 800 }$

This means our returns would be between $400 and$800.

Sometimes an absolute value inequality problem will be presented to us in terms of a shifted and/or stretched or compressed absolute value function, where we must determine for which values of the input the function’s output will be negative or positive.

How To: Given an absolute value inequality of the form $|x-A|\le B$ for real numbers $a$ and $b$ where $b$ is positive, solve the absolute value inequality algebraically.

1. Find boundary points by solving $|x-A|=B$.
2. Test intervals created by the boundary points to determine where $|x-A|\le B$.
3. Write the interval or union of intervals satisfying the inequality in interval, inequality, or set-builder notation.

Example 6: Solving an Absolute Value Inequality

Solve $|x - 5|\le 4$.

Solution

With both approaches, we will need to know first where the corresponding equality is true. In this case we first will find where $|x - 5|=4$. We do this because the absolute value is a function with no breaks, so the only way the function values can switch from being less than 4 to being greater than 4 is by passing through where the values equal 4. Solve $|x - 5|=4$.

$\begin{cases}x - 5=4 \hfill & \text{or}\hfill & {x - 5 }={ -4 }\\ \hfill {x }= {9}&\text{or}\hfill & \hfill{ x }={ 1 }\hfill \end{cases}$

After determining that the absolute value is equal to 4 at $x=1$ and $x=9$, we know the graph can change only from being less than 4 to greater than 4 at these values. This divides the number line up into three intervals:

${ x }<{ 1 },\text{ }{ 1 }<{ x }<{ 9 },\text{ and }{ x }>{ 9 }$.

To determine when the function is less than 4, we could choose a value in each interval and see if the output is less than or greater than 4, as shown in the table below.

Interval test $x$ $f\left(x\right)$ $<4$ or $>4?$
${ x }<{ 1 }$ 0 $|0 - 5|=5$ Greater than
${ 1 }<{ x }<{ 9 }$ 6 $|6 - 5|=1$ Less than
${ x }>{ 9 }$ 11 $|11 - 5|=6$ Greater than

Because $1\le x\le 9$ is the only interval in which the output at the test value is less than 4, we can conclude that the solution to $|x - 5|\le 4$ is $1\le x\le 9$, or $\left[1,9\right]$.

To use a graph, we can sketch the function $f\left(x\right)=|x - 5|$. To help us see where the outputs are 4, the line $g\left(x\right)=4$ could also be sketched. Figure 11. Graph to find the points satisfying an absolute value inequality.

We can see the following:

• The output values of the absolute value are equal to 4 at $x=1$ and $x=9$.
• The graph of $f$ is below the graph of $g$ on $1<x<9$. This means the output values of $f\left(x\right)$ are less than the output values of $g\left(x\right)$.
• The absolute value is less than or equal to 4 between these two points, when $1\le x\le 9$. In interval notation, this would be the interval $\left[1,9\right]$.

Analysis of the Solution

For absolute value inequalities,

$\begin{cases}{|x-A| }<{ C },\hfill & \hfill &{ |x-A| }>{ C },\hfill \\{ -C }<{ x-A }<{ C },\hfill & \hfill &{ x-A }<{ -C }\text{ or }{ x-A }>{ C }.\hfill \end{cases}$

The $<$ or $>$ symbol may be replaced by $\le \text{ or }\ge$.

So, for this example, we could use this alternative approach.

$\begin{cases}|x - 5|\le 4\hfill & \hfill & \hfill & \hfill \\ -4\le x - 5\le 4\hfill & \hfill & \hfill & \text{Rewrite by removing the absolute value bars}.\hfill \\ -4+5\le x - 5+5\le 4+5\hfill & \hfill & \hfill & \text{Isolate the }x.\hfill \\ 1\le x\le 9\hfill & \hfill & \hfill & \hfill \end{cases}$

Try It 6

Solve $|x+2|\le 6$.

How To: Given an absolute value function, solve for the set of inputs where the output is positive (or negative).

1. Set the function equal to zero, and solve for the boundary points of the solution set.
2. Use test points or a graph to determine where the function’s output is positive or negative.

Example 7: Using a Graphical Approach to Solve Absolute Value Inequalities

Given the function $f\left(x\right)=-\frac{1}{2}|4x - 5|+3$, determine the $x\text{-}$ values for which the function values are negative.

Solution

We are trying to determine where $f\left(x\right)<0$, which is when $-\frac{1}{2}\text{ }|4x - 5|+3<0$. We begin by isolating the absolute value.

$\begin{cases}-\frac{1}{2}|4x - 5|<-3 \hfill & \text{Multiply both sides by -2, and reverse the inequality}.\hfill \\ |4x - 5|>6\hfill & \hfill \end{cases}$

Next we solve for the equality $|4x - 5|=6$.

$\begin{cases}4x - 5=6\hfill & \hfill & 4x - 5=-6\hfill \\ 4x - 5=6\hfill & \text{ or }\hfill & 4x=-1\hfill \\ x=\frac{11}{4}\hfill & \hfill & x=-\frac{1}{4}\hfill \end{cases}$ Figure 12

Now, we can examine the graph of $f$ to observe where the output is negative. We will observe where the branches are below the x-axis. Notice that it is not even important exactly what the graph looks like, as long as we know that it crosses the horizontal axis at $x=-\frac{1}{4}$ and $x=\frac{11}{4}$ and that the graph has been reflected vertically.

We observe that the graph of the function is below the x-axis left of $x=-\frac{1}{4}$ and right of $x=\frac{11}{4}$. This means the function values are negative to the left of the first horizontal intercept at $x=-\frac{1}{4}$, and negative to the right of the second intercept at $x=\frac{11}{4}$. This gives us the solution to the inequality.

$x<-\frac{1}{4}\text{ }\text{or}\text{ }x>\frac{11}{4}$

In interval notation, this would be $\left(-\infty ,-0.25\right)\cup \left(2.75,\infty \right)$.

Try It 7

Solve $-2|k - 4|\le -6$.

Key Concepts

• The absolute value function is commonly used to measure distances between points.
• Applied problems, such as ranges of possible values, can also be solved using the absolute value function.
• The graph of the absolute value function resembles a letter V. It has a corner point at which the graph changes direction.
• In an absolute value equation, an unknown variable is the input of an absolute value function.
• If the absolute value of an expression is set equal to a positive number, expect two solutions for the unknown variable.
• An absolute value equation may have one solution, two solutions, or no solutions.
• An absolute value inequality is similar to an absolute value equation but takes the form $|A|<B,|A|\le B,|A|>B,\text{ or }|A|\ge B$. It can be solved by determining the boundaries of the solution set and then testing which segments are in the set.
• Absolute value inequalities can also be solved graphically.

Glossary

absolute value equation
an equation of the form $|A|=B$, with $B\ge 0$; it will have solutions when $A=B$ or $A=-B$
absolute value inequality
a relationship in the form $|{ A }|<{ B },|{ A }|\le { B },|{ A }|>{ B },\text{or }|{ A }|\ge{ B }$

1. How do you solve an absolute value equation?

2. How can you tell whether an absolute value function has two x-intercepts without graphing the function?

3. When solving an absolute value function, the isolated absolute value term is equal to a negative number. What does that tell you about the graph of the absolute value function?

4. How can you use the graph of an absolute value function to determine the x-values for which the function values are negative?

5. How do you solve an absolute value inequality algebraically?

6. Describe all numbers $x$ that are at a distance of 4 from the number 8. Express this using absolute value notation.

7. Describe all numbers $x$ that are at a distance of $\frac{1}{2}$ from the number −4. Express this using absolute value notation.

8. Describe the situation in which the distance that point $x$ is from 10 is at least 15 units. Express this using absolute value notation.

9. Find all function values $f\left(x\right)$ such that the distance from $f\left(x\right)$ to the value 8 is less than 0.03 units. Express this using absolute value notation.

For the following exercises, solve the equations below and express the answer using set notation.

10. $|x+3|=9$

11. $|6-x|=5$

12. $|5x - 2|=11$

13. $|4x - 2|=11$

14. $2|4-x|=7$

15. $3|5-x|=5$

16. $3|x+1|-4=5$

17. $5|x - 4|-7=2$

18. $0=-|x - 3|+2$

19. $2|x - 3|+1=2$

20. $|3x - 2|=7$

21. $|3x - 2|=-7$

22. $\left|\frac{1}{2}x - 5\right|=11$

23. $\left|\frac{1}{3}x+5\right|=14$

24. $-\left|\frac{1}{3}x+5\right|+14=0$

For the following exercises, find the x- and y-intercepts of the graphs of each function.

25. $f\left(x\right)=2|x+1|-10$

26. $f\left(x\right)=4|x - 3|+4$

27. $f\left(x\right)=-3|x - 2|-1$

28. $f\left(x\right)=-2|x+1|+6$

For the following exercises, solve each inequality and write the solution in interval notation.

29. $\left|x - 2\right|>10$

30. $2|v - 7|-4\ge 42$

31. $|3x - 4|\le 8$

32. $|x - 4|\ge 8$

33. $|3x - 5|\ge 13$

34. $|3x - 5|\ge -13$

35. $\left|\frac{3}{4}x - 5\right|\ge 7$

36. $\left|\frac{3}{4}x - 5\right|+1\le 16$

For the following exercises, graph the absolute value function. Plot at least five points by hand for each graph.

37. $y=|x - 1|$

38. $y=|x+1|$

39. $y=|x|+1$

For the following exercises, graph the given functions by hand.

40. $y=|x|-2$

41. $y=-|x|$

42. $y=-|x|-2$

43. $y=-|x - 3|-2$

44. $f\left(x\right)=-|x - 1|-2$

45. $f\left(x\right)=-|x+3|+4$

46. $f\left(x\right)=2|x+3|+1$

47. $f\left(x\right)=3|x - 2|+3$

48. $f\left(x\right)=|2x - 4|-3$

49. $f\left(x\right)=|3x+9|+2$

50. $f\left(x\right)=-|x - 1|-3$

51. $f\left(x\right)=-|x+4|-3$

52. $f\left(x\right)=\frac{1}{2}\left|x+4\right|-3$

53. Use a graphing utility to graph $f\left(x\right)=10|x - 2|$ on the viewing window $\left[0,4\right]$. Identify the corresponding range. Show the graph.

54. Use a graphing utility to graph $f\left(x\right)=-100|x|+100$ on the viewing window $\left[-5,5\right]$. Identify the corresponding range. Show the graph.

For the following exercises, graph each function using a graphing utility. Specify the viewing window.

55. $f\left(x\right)=\left(-0.1\right)\left|0.1\left(0.2-x\right)\right|+0.3$

56. $f\left(x\right)=4\times {10}^{9}\left|x-\left(5\times {10}^{9}\right)\right|+2\times {10}^{9}$

For the following exercises, solve the inequality.

57. $\left|-2x-\frac{2}{3}\left(x+1\right)\right|+3>-1$

58. If possible, find all values of $a$ such that there are no $x\text{-}$ intercepts for $f\left(x\right)=2|x+1|+a$.

59. If possible, find all values of $a$ such that there are no $y$ -intercepts for $f\left(x\right)=2|x+1|+a$.

60. Cities A and B are on the same east-west line. Assume that city A is located at the origin. If the distance from city A to city B is at least 100 miles and $x$ represents the distance from city B to city A, express this using absolute value notation.

61. The true proportion $p$ of people who give a favorable rating to Congress is 8% with a margin of error of 1.5%. Describe this statement using an absolute value equation.

62. Students who score within 18 points of the number 82 will pass a particular test. Write this statement using absolute value notation and use the variable $x$ for the score.

63. A machinist must produce a bearing that is within 0.01 inches of the correct diameter of 5.0 inches. Using $x$ as the diameter of the bearing, write this statement using absolute value notation.

64. The tolerance for a ball bearing is 0.01. If the true diameter of the bearing is to be 2.0 inches and the measured value of the diameter is $x$ inches, express the tolerance using absolute value notation.