## Absolute Value Functions

### Learning Outcomes

• 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.

### Try It

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

### 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\pm\text{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.

### Try It

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

## 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 shows how to find 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

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{align}&2=a|1 - 3|-2 \\ &4=2a \\ &a=2 \end{align}

### Try It

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

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{align}2x - 6&=8 & \text{or} && 2x - 6&=-8 \\ 2x&=14 &&& 2x&=-2 \\ x&=7 &&& x&=-1 \\ \text{ } \end{align}

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,

$|x|=4$
$|2x - 1|=3$
$|5x+2|-4=9$

### 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. Set the function equal to $0[\latex]. 2. Isolate the absolute value term. 3. Use [latex]|A|=B$ to write $A=B$ or $\mathrm{-A}=B$, assuming $B>0$.
4. 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$ .

### Try It

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

### Try It

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$.

### Try It

Q & A

In Example 5, if the functions $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.

Figure 10

### Try It

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

## Solving an Absolute Value Inequality

Absolute value expressions may not always involve equations. Instead we may need to solve where an expression is within a range of values. We would use an absolute value inequality to solve such an equation. An absolute value inequality is an inequality 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$.

### Analysis of the Solution

For absolute value inequalities,

$|x-A|<C[latex] can be rewritten [latex]-C<x-A<C$ and $|x-A| > C$ can be rewritten $x-A < -C \text{ or } x-A > C$.

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

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

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

### Try It

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.

### Try It

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 }$