maths.freePrecalculus › 1. Functions › Absolute Value Functions

Absolute Value Functions

Graph an absolute value function.

Understanding Absolute Value

Recall that in its basic form \(f(x)=|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.

Example

Try it.

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

Solution

We want the distance between \(x\) and 5 to be less than or equal to 4. We can draw a number line, such as the one in , 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.\)

Example

Try it.

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 \(\text{\pm 1\%,}\ \pm \text{5\%,}\) or \(\pm \text{10\%}\text{.}\)

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\]

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

shows the graph of \(y=2|x-3|+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 \((3,4)\) for this transformed function.

Example

Try it.

Write an equation for the function graphed in .

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

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 as shown in .

From this information we can write the equation

\[\begin{array}{ll}f(x)=2|x-3|-2, & \text{treating the stretch as a vertical stretch, or} \\ f(x)=|2(x-3)|-2, & \text{treating the stretch as a horizontal compression}.\end{array}\]

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=|2x-6|,\) 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{array}{lll}2x-6=8 & \text{or} & 2x-6=-8 \\ 2x=14 & & 2x=-2 \\ x=7 & & x=-1\end{array}\]

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{array}{l}|x|=4, \\ |2x-1|=3 \\ |5x+2|-4=9\end{array}\]
Example

Try it.

For the function \(f(x)=|4x+1|-7\), find the values of \(x\) such that \(f(x)=0\).

Solution

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

The function outputs 0 when \(x=1.5\) or \(x=-2.\) See .

Example

Try it.

Solve \(1=4|x-2|+2.\)

Solution

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

\[\begin{array}{l}1=4|x-2|+2 \\ -1=4|x-2| \\ -\frac{1}{4}=|x-2|\end{array}\]

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.

Condensed — the full section is in OpenStax Precalculus 2e.

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,\ \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}\ -200Suppose 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|.\)

\[\begin{array}{l} \\ |x-600|<200\text{ or }-200This 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.

Condensed — the full section is in OpenStax Precalculus 2e.

Key Concepts

  • The absolute value function is commonly used to measure distances between points. See .
  • Applied problems, such as ranges of possible values, can also be solved using the absolute value function. See .
  • The graph of the absolute value function resembles a letter V. It has a corner point at which the graph changes direction. See .
  • 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. See .
  • An absolute value equation may have one solution, two solutions, or no solutions. See .
  • An absolute value inequality is similar to an absolute value equation but takes the form \(|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. See .
  • Absolute value inequalities can also be solved graphically. See .

Section Exercise

Try it.

How do you solve an absolute value equation?

Solution

Isolate the absolute value term so that the equation is of the form \(|A|=B.\) Form one equation by setting the expression inside the absolute value symbol, \(A,\) equal to the expression on the other side of the equation, \(B.\) Form a second equation by setting \(A\) equal to the opposite of the expression on the other side of the equation, \(-B.\) Solve each equation for the variable.

Try it.

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

Try it.

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?

Solution

The graph of the absolute value function does not cross the \(x\)-axis, so the graph is either completely above or completely below the \(x\)-axis.

Try it.

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

Try it.

How do you solve an absolute value inequality algebraically?

Solution

First determine the boundary points by finding the solution(s) of the equation. Use the boundary points to form possible solution intervals. Choose a test value in each interval to determine which values satisfy the inequality.

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

Try it.

\(y=|x-1|\)

Solution

Try it.

\(y=|x+1|\)

Try it.

\(y=|x|+1\)

Solution

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

Try it.

\(y=|x|-2\)

Try it.

\(y=-|x|\)

Solution

Try it.

\(y=-|x|-2\)

Try it.

\(y=-|x-3|-2\)

Solution

Try it.

\(f(x)=-|x-1|-2\)

Try it.

\(f(x)=-|x+3|+4\)

Solution

Try it.

\(f(x)=2|x+3|+1\)

Try it.

\(f(x)=3|x-2|+3\)

Solution

Try it.

\(f(x)=|2x-4|-3\)

Try it.

\(f(x)=|3x+9|+2\)

Solution

Try it.

\(f(x)=-|x-1|-3\)

Try it.

\(f(x)=-|x+4|-3\)

Solution

Try it.

\(f(x)=\frac{1}{2}|x+4|-3\)

Try it.

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

Solution

range: \([0,20]\)

Try it.

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

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

Try it.

\(f(x)=-0.1|0.1(0.2-x)|+0.3\)

Solution

\(x\text{-}\) intercepts:

Try it.

\(f(x)=4\times {10}^{9}|x-(5\times {10}^{9})|+2\times {10}^{9}\)

Condensed — the full section is in OpenStax Precalculus 2e.

Practice (40)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. Describe all values \(x\) within or including a distance of 4 from the number 5.

    Vis svaret

    We want the distance between \(x\) and 5 to be less than or equal to 4. We can draw a number line, such as the one in , 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.\)

  2. Describe all values \(x\) within a distance of 3 from the number 2.

    Vis svaret

    \(|x-2|\le 3\)

  3. 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 \(\text{\pm 1\%,}\ \pm \text{5\%,}\) or \(\pm \text{10\%}\text{.}\)

    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.

    Vis svaret

    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\]
  4. Students who score within 20 points of 80 will pass a test. Write this as a distance from 80 using absolute value notation.

    Vis svaret

    using the variable \(p\) for passing, \(|p-80|\le 20\)

  5. Write an equation for the function graphed in .

    Vis svaret

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

    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 as shown in .

    From this information we can write the equation

    \[\begin{array}{ll}f(x)=2|x-3|-2, & \text{treating the stretch as a vertical stretch, or} \\ f(x)=|2(x-3)|-2, & \text{treating the stretch as a horizontal compression}.\end{array}\]
  6. Write the equation for the absolute value function that is horizontally shifted left 2 units, is vertically reflected, and vertically shifted up 3 units.

    Vis svaret

    \(f(x)=-|x+2|+3\)

  7. For the function \(f(x)=|4x+1|-7\), find the values of \(x\) such that \(f(x)=0\).

    Vis svaret

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

    The function outputs 0 when \(x=1.5\) or \(x=-2.\) See .

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

    Vis svaret

    \(x=-1\) or \(x=2\)

  9. Solve \(1=4|x-2|+2.\)

    Vis svaret

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

    \[\begin{array}{l}1=4|x-2|+2 \\ -1=4|x-2| \\ -\frac{1}{4}=|x-2|\end{array}\]

    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.

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

    Vis svaret

    \(f(0)=1,\) so the graph intersects the vertical axis at \((0,1).\) \(f(x)=0\) when \(x=-5\) and \(x=1\) so the graph intersects the horizontal axis at \((-5,0)\) and \((1,0).\)

  11. Solve \(|x\ -5|<4.\)

    Vis svaret

    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{array}{lll}\begin{array}{l}x-5=4 \\ x=9\end{array} & \text{or}\ & \begin{array}{l}x-5=-4 \\ x=1\end{array}\end{array}\]

    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,\ 19.\]

    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 .

    Interval test \(x\) \(x\) \(<4\) or \(>4?\)
    \(x<1\) 0 \(|0-5|=5\) Greater than
    \(16 \(|6-5|=1\) Less than
    \(x>9\) 11 \(|11-5|=6\) Greater than

    Because \(1

    To use a graph, we can sketch the function \(f(x)=|x-5|.\) To help us see where the outputs are 4, the line \(g(x)=4\) could also be sketched as in .

    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
    • The absolute value is less than or equal to 4 between these two points, when \(1
  12. Solve \(|x+2|\le 6.\)

    Vis svaret

    \(-8\le x\le 4\)

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

    Vis svaret

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

    \[\begin{array}{lllll}-\frac{1}{2}|4x-5|<-3\begin{array}{llll} & & & \end{array} & \text{Multiply both sides by -2, and reverse the inequality}. \\ |4x-5|>6 & \end{array}\]

    Next we solve for the equality \(|4x-5|=6.\)

    \[\begin{array}{ll}4x-5=6\text{ or} & 4x-5=-6 \\ 4x-5=6 & 4x=-1 \\ x=\frac{11}{4} & x=-\frac{1}{4}\end{array}\]

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

    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{or}\ x>\frac{11}{4}\]

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

  14. Solve \(-2|k-4|\le -6.\)

    Vis svaret

    \(k\le 1\) or \(k\ge 7;\) in interval notation, this would be \((-\infty ,1]\cup [7,\infty )\)

  15. How do you solve an absolute value equation?

    Vis svaret

    Isolate the absolute value term so that the equation is of the form \(|A|=B.\) Form one equation by setting the expression inside the absolute value symbol, \(A,\) equal to the expression on the other side of the equation, \(B.\) Form a second equation by setting \(A\) equal to the opposite of the expression on the other side of the equation, \(-B.\) Solve each equation for the variable.

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

  17. 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?

    Vis svaret

    The graph of the absolute value function does not cross the \(x\)-axis, so the graph is either completely above or completely below the \(x\)-axis.

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

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

    Vis svaret

    First determine the boundary points by finding the solution(s) of the equation. Use the boundary points to form possible solution intervals. Choose a test value in each interval to determine which values satisfy the inequality.

  20. Describe all numbers \(x\) that are at a distance of 4 from the number 8. Express this using absolute value notation.

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

    Vis svaret

    \(|x+4|=\frac{1}{2}\)

  22. Describe the situation in which the distance that point \(x\) is from 10 is at least 15 units. Express this using absolute value notation.

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

    Vis svaret

    \(|f(x)-8|<0.03\)

  24. \(|x+3|=9\)

  25. \(|6-x|=5\)

    Vis svaret

    \(\{1,11\}\)

  26. \(|5x-2|=11\)

  27. \(|4x-2|=11\)

    Vis svaret

    \(\{-\frac{9}{4},\ \frac{13}{4}\}\)

  28. \(2|4-x|=7\)

  29. \(3|5-x|=5\)

    Vis svaret

    \(\{\frac{10}{3},\ \frac{20}{3}\}\)

  30. \(3|x+1|-4=5\)

  31. \(5|x-4|-7=2\)

    Vis svaret

    \(\{\frac{11}{5},\ \frac{29}{5}\}\)

  32. \(0=-|x-3|+2\)

  33. \(2|x-3|+1=2\)

    Vis svaret

    \(\{\frac{5}{2},\frac{7}{2}\}\)

  34. \(|3x-2|=7\)

  35. \(|3x-2|=-7\)

    Vis svaret

    No solution

  36. \(|\frac{1}{2}x-5|=11\)

  37. \(|\frac{1}{3}x+5|=14\)

    Vis svaret

    \(\{-57,27\}\)

  38. \(-|\frac{1}{3}x+5|+14=0\)

  39. \(f(x)=2|x+1|-10\)

    Vis svaret

    \((0,-8);\ (-6,0),\ (4,0)\)

  40. \(f(x)=4|x-3|+4\)

Symbols used here

\infty
infinity
Not a number: "grows without bound" in limits and intervals.
A \cup B,\ A \cap B,\ A \setminus B
union, intersection, difference
In either; in both; in A but not B.
\pm
plus or minus
Both signs at once: x = 3 ± 2 means 5 and 1.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
\sup,\ \inf
supremum, infimum
Least upper bound, greatest lower bound.
|x|
absolute value / modulus
Distance from zero: |−3| = 3. For a complex number, distance from the origin.
\binom{n}{k}
binomial coefficient, "n choose k"
Number of k-element subsets of n things: n!/(k!(n−k)!).
\pi
pi
Ratio of a circle's circumference to its diameter, 3.14159…
e
Euler's number
2.71828…, the base whose exponential is its own derivative.
i
imaginary unit
i² = −1.
\theta
theta
The usual name for an angle.
\log_b x,\ \ln x
logarithm, natural log
The exponent b must be raised to for x; ln uses base e.
\mathbf{v},\ \vec{v}
vector
A quantity with magnitude and direction; a column of numbers.

How to: Absolute Value Functions

  1. Graph an absolute value function.
  2. Solve an absolute value equation.
  3. Solve an absolute value inequality.
  4. Isolate the absolute value term.
  5. Use
  6. Solve for
  7. Isolate the absolute value term.
  8. Use

Questions people ask

What is a function, really?

A rule that assigns exactly one output to each input. The vertical-line test on a graph is the same idea: no input may have two outputs.

Why do we need complex numbers?

Because x² + 1 = 0 has no real solution, and allowing one new number i with i² = −1 makes every polynomial equation solvable. They then turn out to describe rotation, waves and alternating current more naturally than real numbers do.

Prøv din egen

Parts of this page are adapted from OpenStax Precalculus 2e (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.

Mer i Precalculus