Absolute Value Functions

Learning Outcomes

  • Graph an absolute value function.
  • Solve an absolute value equation.
  • Solve an absolute value inequality.
The Milky Way.

Figure 1. Distances in deep space can be measured in all directions. As such, it is useful to consider distance in terms of absolute values. (credit: “s58y”/Flickr)

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 [latex]\displaystyle{f}\left({x}\right)={|x|}[/latex], 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

[latex]f(x) = \begin{cases} x ,\ x \geq 0 \\ -x , x < 0 \end{cases} [/latex]

Example 1: Determine a Number within a Prescribed Distance

Describe all values [latex]x[/latex] within or including a distance of 4 from the number 5.

Try It

Describe all values [latex]x[/latex] 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 [latex]\displaystyle\pm\text{1%,}\pm\text{5%,}[/latex] or [latex]\displaystyle\pm\text{10%}[/latex].

Suppose we have a resistor rated at 680 ohms, [latex]\pm 5%[/latex]. 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.

Graph of an absolute function

Figure 3

Figure 4 shows how to find the graph of [latex]y=2\left|x - 3\right|+4[/latex]. The graph of [latex]y=|x|[/latex] 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 [latex]\left(3,4\right)[/latex] for this transformed function.

Graph of the different types of transformations for an absolute function.

Figure 4

Example 3: Writing an Equation for an Absolute Value Function

Write an equation for the function graphed in Figure 5.

Graph of an absolute function. Two rays stem from the point 3, negative 2. One ray crosses the point 0, 4. The other ray crosses the point 5, 2.

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 [latex]x[/latex] and [latex]f\left(x\right)[/latex].

[latex]f\left(x\right)=a|x - 3|-2[/latex]

Now substituting in the point (1, 2)

[latex]\begin{align}&2=a|1 - 3|-2 \\ &4=2a \\ &a=2 \end{align}[/latex]

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.

Graph of the different types of transformations for an absolute function.

Figure 8. (a) The absolute value function does not intersect the horizontal axis. (b) The absolute value function intersects the horizontal axis at one point. (c) The absolute value function intersects the horizontal axis at 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 [latex]{8}=\left|{2}x - {6}\right|[/latex], 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.

[latex]\begin{align}2x - 6&=8 & \text{or} && 2x - 6&=-8 \\ 2x&=14 &&& 2x&=-2 \\ x&=7 &&& x&=-1 \\ \text{ } \end{align}[/latex]

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,

[latex]|2x - 1|=3[/latex]

A General Note: Solutions to Absolute Value Equations

For real numbers [latex]A[/latex] and [latex]B[/latex], an equation of the form [latex]|A|=B[/latex], with [latex]B\ge 0[/latex], will have solutions when [latex]A=B[/latex] or [latex]A=-B[/latex]. If [latex]B<0[/latex], the equation [latex]|A|=B[/latex] 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 [latex]0[\latex].
  2. Isolate the absolute value term.
  3. Use [latex]|A|=B[/latex] to write [latex]A=B[/latex] or [latex]\mathrm{-A}=B[/latex], assuming [latex]B>0[/latex].
  4. Solve for [latex]x[/latex].

Example 4: Finding the Zeros of an Absolute Value Function

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

Try It

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

Try It

Q & A

Should we always expect two answers when solving [latex]|A|=B?[/latex]

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

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

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

Example 5: Solving an Absolute Value Equation

Solve [latex]1=4|x - 2|+2[/latex].

Try It

Q & A

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

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

Graph of g(x)=4|x-2|+2 and f(x)=1.

Figure 10

Try It

Find where the graph of the function [latex]f\left(x\right)=-|x+2|+3[/latex] 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

[latex]|{A}|<{ B },|{ A }|\le{ B },|{ A }|>{ B },\text{ or } |{ A }|\ge { B }[/latex],

where an expression [latex]A[/latex] (and possibly but not usually [latex]B[/latex] ) depends on a variable [latex]x[/latex]. Solving the inequality means finding the set of all [latex]x[/latex] 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

[latex]|x|<{ 200 }\text{ or }{ -200 }<{ x }<{ 200 }\text{ }[/latex]

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 [latex]x[/latex] such that the distance between [latex]x[/latex] and 600 is less than 200. We represent the distance between [latex]x[/latex] and 600 as [latex]|{ x } - {600 }|[/latex].

[latex]|{ x } -{ 600 }|<{ 200 }[/latex]
[latex]{ -200 }<{ x } - { 600 }<{ 200 }[/latex]
[latex]{-200 }+{ 600 }<{ x } - {600 }+{ 600 }<{ 200 }+{ 600 }[/latex]
[latex]{ 400 }<{ x }<{ 800 }[/latex]

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 [latex]|x-A|\le B[/latex] for real numbers [latex]a[/latex] and [latex]b[/latex] where [latex]b[/latex] is positive, solve the absolute value inequality algebraically.

  1. Find boundary points by solving [latex]|x-A|=B[/latex].
  2. Test intervals created by the boundary points to determine where [latex]|x-A|\le B[/latex].
  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 [latex]|x - 5|\le 4[/latex].

Analysis of the Solution

For absolute value inequalities,

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

The [latex]<[/latex] or [latex]>[/latex] symbol may be replaced by [latex]\le \text{ or }\ge [/latex].

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

[latex]\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}[/latex] [latex]\begin{align} &\\&&& \text{Rewrite by removing the absolute value bars}. \\ &&& \text{Isolate the }x. \\& \end{align}[/latex]

Try It

Solve [latex]|x+2|\le 6[/latex].

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 [latex]f\left(x\right)=-\frac{1}{2}|4x - 5|+3[/latex], determine the [latex]x\text{-}[/latex] values for which the function values are negative.

Try It

Solve [latex]-2|k - 4|\le -6[/latex].

Try It


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 [latex]|A|<B,|A|\le B,|A|>B,\text{ or }|A|\ge B[/latex]. 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.


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