Back to homeMathematics · Precalculus · Change subject
Start for free
Precalculus · Mathematics
Functions · Real functions

Absolute Value Functions

Before you start, make sure you know: Piecewise functions (Algebra 1)
Before you start, make sure you know: Inequalities (Algebra 1)

A machine in a woodshop cuts dowels that should be 10 inches long. The inspector doesn't care whether a dowel is too long or too short, only how far off it is. The absolute value turns any signed difference into a distance, and that gives its graph a very specific shape. By the end of this page you'll use it to decide which dowels pass inspection.

From absolute value to piecewise

Because of that two-case definition, every function with an absolute value can be rewritten as a piecewise function. (Some problems call this the modulus function. It is the same thing.) The basic example is $f(x) = |x|$, which equals $x$ on the right of $0$ and $-x$ on the left.

Graph of y = |x|: a V shape opening upward with its vertex at the origin, following y = -x on the left and y = x on the right. y = −x, x < 0 y = x, x ≥ 0 vertex (0, 0)

To rewrite $|E(x)|$ piecewise, follow three steps. First, find where the inside $E(x)$ equals $0$; that is the break point. Second, test a number on each side to see where $E(x)$ is positive and where it is negative. Third, keep $E(x)$ where it is $\ge 0$ and use $-E(x)$ where it is negative.

To evaluate, work inside the bars first and then take the absolute value. For $p(x) = |x^2 - 6x|$: $p(1) = |1 - 6| = 5$, $p(3) = |9 - 18| = 9$, and $p(7) = |49 - 42| = 7$.

Absolute values also model real "how far off is it?" situations. When time is the variable, the domain is usually $t \ge 0$, and the break point tells you the moment the error is exactly zero.

Practice★☆☆Not started
Express the function $f(x) = |3x - 6|$ as a piecewise function, clearly indicating the intervals corresponding to each algebraic expression.

Express the function $f(x) = |3x - 6|$ as a piecewise function, clearly indicating the intervals corresponding to each algebraic expression.

Solve
Practice★☆☆Not started
Calculate the numerical value of the function $g(x) = |-x^2 + 4x|$ for the points $x = -1$, $x = 0$, $x = 2$ and $x = 5$.

Calculate the numerical value of the function $g(x) = |-x^2 + 4x|$ for the points $x = -1$, $x = 0$, $x = 2$ and $x = 5$.

Solve
Practice★★☆Not started
In a laboratory, the deviation of the temperature of a chemical reaction from the ideal temperature of $22^\circ\text{C}$ is given by the function $D(t) = |2t - 12|$,…

In a laboratory, the deviation of the temperature of a chemical reaction from the ideal temperature of $22^\circ\text{C}$ is given by the function $D(t) = |2t - 12|$, where $t$ is the time in minutes. Express $D(t)$ as a piecewise function and determine at what instant the deviation is zero.

Solve

Going backwards: piecewise to absolute value

You can also go the other way. A piecewise function is an absolute value $|E|$ when two things are true. First, its two branches are opposites of each other. Second, the pieces switch exactly where the branch that is positive on its side equals $0$.

Practice★☆☆Not started
Given the following piecewise function: $f(x) = \begin{cases} x + 4 & \text{if } x \ge -4 \\ -x - 4 & \text{if } x < -4 \end{cases}$ Write its analytical expression in a…

Given the following piecewise function:

$f(x) = \begin{cases} x + 4 & \text{if } x \ge -4 \\ -x - 4 & \text{if } x < -4 \end{cases}$

Write its analytical expression in a compact form using the modulus.

Solve

The vertex, domain, range and intercepts

Move the sliders and watch the vertex.

To read an equation from a graph, find the vertex first. If the V sits on the x-axis at $(a, 0)$, the equation is $y = |x - a|$. A vertex at $x = -3$ gives $|x - (-3)| = |x + 3|$, so watch the sign.

A V-shaped graph with its vertex on the x-axis at (-2, 0), passing through the point (0, 2). vertex (−2, 0) (0, 2)
Practice★☆☆Not started
Determine the domain and the range of the function $h(x) = |x| + 5$. Justify your answer based on the properties of the modulus.

Determine the domain and the range of the function $h(x) = |x| + 5$. Justify your answer based on the properties of the modulus.

Solve
Practice★☆☆Not started
Given the following graph of a modulus function, deduce its analytical expression in the form $y = |x - a|$.

Given the following graph of a modulus function, deduce its analytical expression in the form $y = |x - a|$.

X Y 1 2 3 1 2 V(2, 0)
Solve
Practice★☆☆Not started
Determine the exact coordinates of the points of intersection with the Cartesian axes of the function $h(x) = |x - 3| - 5$.

Determine the exact coordinates of the points of intersection with the Cartesian axes of the function $h(x) = |x - 3| - 5$.

Solve

Stretching and flipping: $a|x - h| + k$

If the coefficient of $x$ is inside the bars, factor it out first: $|4x + 8| = |4(x + 2)| = 4|x + 2|$. Then you can see the vertex at $x = -2$ and the slope $4$ at a glance.

An inverted V with a positive constant, like $y = k - |x - h|$, is the case $a = -1$. Its highest point is the vertex $(h, k)$, and it hits the x-axis where $|x - h| = k$, that is, at $x = h \pm k$. This describes anything that rises and then falls at a steady rate, like a bouncing ball's path.

The same reasoning finds the parameters of a model like $S(t) = A - |Bt - C|$ with $A, B, C > 0$. The peak value is $A$. The peak happens where the inside is $0$, and a zero of $S$ is a point where $|Bt - C| = A$.

Practice★★☆Not started
In a billiards simulation, a ball bounces against the cushion located on the x-axis. The trajectory of the ball follows the function $y = 4 - |x - 3|$. Observe the…

In a billiards simulation, a ball bounces against the cushion located on the x-axis. The trajectory of the ball follows the function $y = 4 - |x - 3|$. Observe the representation and analytically determine the coordinates of the point where the ball reaches its maximum separation from the cushion and the points where it would impact the x-axis.

X Y P(3, 4) −1 7
Solve
Practice★★☆Not started
Determine the coordinates of the vertex and the points of intersection with the axes of the function $f(x) = -|2x - 6| + 8$. Do the branches of this function open…

Determine the coordinates of the vertex and the points of intersection with the axes of the function $f(x) = -|2x - 6| + 8$. Do the branches of this function open towards the positive or negative y-axis?

Solve
Practice★★★Not started
In signal processing, an inverted triangular wave can be modeled with the function $S(t) = A - |B t - C|$. Determine the parameters $A, B, C > 0$ knowing that the signal…

In signal processing, an inverted triangular wave can be modeled with the function $S(t) = A - |B t - C|$. Determine the parameters $A, B, C > 0$ knowing that the signal reaches its maximum value of $12\text{ V}$ at time $t = 5\text{ s}$, and that it crosses the x-axis (value $0\text{ V}$) at times $t = 2\text{ s}$ and $t = 8\text{ s}$.

Solve

Absolute value of a quadratic

This is the method for problems like "how far is a company's profit margin from its target?" The inside of the bars is the signed difference from the target. Where it is negative, the company was below target. Where it is positive, it was above. Where it is $0$, it was exactly on target. The absolute value then reports the size of the gap.

Practice★☆☆Not started
Express the quadratic modulus function $f(x) = |x^2 - 25|$ as a piecewise function.

Express the quadratic modulus function $f(x) = |x^2 - 25|$ as a piecewise function.

Solve
Practice★★☆Not started
Express the function $f(x) = |x^2 - 5x + 6|$ as a piecewise function. State in which interval or intervals the original parabola $y = x^2 - 5x + 6$ has been reflected in…

Express the function $f(x) = |x^2 - 5x + 6|$ as a piecewise function. State in which interval or intervals the original parabola $y = x^2 - 5x + 6$ has been reflected in the x-axis.

Solve
Practice★★☆Not started
A company's profit margin, in thousands of dollars, with respect to its annual target is modeled by the function $M(x) = |x^2 - 40x + 300|$, where $x$ is the number of…

A company's profit margin, in thousands of dollars, with respect to its annual target is modeled by the function $M(x) = |x^2 - 40x + 300|$, where $x$ is the number of months elapsed. Express the function piecewise to identify in which periods the company was exactly on target, below it (before applying the modulus) or above it.

Solve

Touching the axis and reading a graph

Where the parabola crosses the x-axis, reflecting creates a sharp corner. How many corners the graph of $|x^2 + bx + c|$ has depends on the discriminant $b^2 - 4c$:

Discriminant Zeros of the parabola Graph of $\lvert x^2 + bx + c \rvert$
$> 0$ two two corners on the x-axis, an arch between them
$= 0$ one (double) touches the axis at one point, no reflection: $\lvert (x - r)^2 \rvert = (x - r)^2$
$< 0$ none same as the parabola, entirely above the axis

Now suppose a graph of $f(x) = |x^2 + bx + c|$ shows two zeros and the highest point of the arch between them. Use the zeros to build a system, and use the peak to check your work.

Graph of an absolute value of a parabola with zeros at x = 2 and x = 8 and a local maximum at (5, 9) between them. (2, 0) (8, 0) (5, 9)
Practice★★★Not started
Given the function $f(x) = |x^2 - 2x + k|$, determine the value of the parameter $k$ knowing that the graph of the function touches the x-axis at a single point. For…

Given the function $f(x) = |x^2 - 2x + k|$, determine the value of the parameter $k$ knowing that the graph of the function touches the x-axis at a single point. For that value of $k$, express $f(x)$ without using the modulus.

Solve
Practice★★★Not started
The graph shown corresponds to the function $f(x) = |x^2 + bx + c|$. From the observable singular points (roots and local maximum), set up a system of equations and…

The graph shown corresponds to the function $f(x) = |x^2 + bx + c|$. From the observable singular points (roots and local maximum), set up a system of equations and determine the values of the parameters $b$ and $c$.

X Y 2 6 4 M(4, 4)
Solve

Absolute value of a rational function

For $f(x) = \left|\dfrac{N(x)}{D(x)}\right|$ the sign of the quotient matters. Find every number that makes the numerator $0$ or the denominator $0$, build a sign chart, and keep the quotient where it is positive and flip it where it is negative. The domain stays the same: the denominator can't be $0$.

For asymptotes: the vertical asymptotes are where the denominator is $0$ (the bars don't change that). A horizontal asymptote $y = L$ of the quotient becomes $y = |L|$.

Practice★★★Not started
Express the rational function with modulus $f(x) = \left| \frac{2x - 4}{x + 1} \right|$ as a piecewise function. Then, determine its domain and the equations of its…

Express the rational function with modulus $f(x) = \left| \frac{2x - 4}{x + 1} \right|$ as a piecewise function. Then, determine its domain and the equations of its horizontal and vertical asymptotes.

Solve

Sums of absolute values and nested absolute values

When a function has several absolute values, list every break point (where each inside is $0$), sort them, and handle each interval separately. On each interval, every absolute value has a fixed sign, so you can drop all the bars.

To find the average rate of change on $[a, b]$, use $\dfrac{g(b) - g(a)}{b - a}$. For $g$ above on $[-3, 2]$: $g(-3) = 5$ and $g(2) = 5$, so the rate is $\dfrac{5 - 5}{5} = 0$. You can evaluate with the original formula, or use the piece that applies to each endpoint.

If you only need the function on one interval, you don't need the whole piecewise function. Decide the signs on that interval and drop the bars:

Nested absolute values, like $f(x) = \big||x| - 3\big|$, are handled from the inside out. For $x \ge 0$, $|x| = x$ and $f(x) = |x - 3|$. For $x < 0$, $|x| = -x$ and $f(x) = |-x - 3| = |x + 3|$. Resolving each of those gives a "W" shape with zeros at $x = \pm 3$ and a peak $(0, 3)$.

Graph of y = ||x| - 3| for x from -6 to 6: a W shape with zeros at x = -3 and x = 3 and a local maximum at (0, 3). (0, 3) (−3, 0) (3, 0)

In general, the graph of $f(x) = \big||x| - c\big|$ (with $c > 0$) has zeros at $x = \pm c$ and a peak at $(0, c)$. So to find $c$ from a graph, read either the positive x-intercept or the height of the middle peak (the y-intercept). Both equal $c$.

Practice★★☆Not started
Simplify the expression of the function $f(x) = 2x + |x - 4|$ by writing it as a piecewise function. Next, calculate the average rate of change in the interval $[2, 6]$.

Simplify the expression of the function $f(x) = 2x + |x - 4|$ by writing it as a piecewise function. Next, calculate the average rate of change in the interval $[2, 6]$.

Solve
Practice★★★Not started
The altitude error of an inspection drone during a maneuver is modeled by the sum of two moduli: $E(t) = |t^2 - 4t + 3| + |t - 2|$, where $t$ is the time in seconds.…

The altitude error of an inspection drone during a maneuver is modeled by the sum of two moduli: $E(t) = |t^2 - 4t + 3| + |t - 2|$, where $t$ is the time in seconds. Express the function $E(t)$ without using moduli in the time interval $t \in [1, 3]$.

Solve
Practice★★★Not started
The following graph shows a nested modulus function of the form $f(x) = ||x| - c|$. Observe the vertices and points of intersection, deduce the value of $c$ and write…

The following graph shows a nested modulus function of the form $f(x) = ||x| - c|$. Observe the vertices and points of intersection, deduce the value of $c$ and write the expression of the piecewise function for the interval $x \in [-4, 4]$.

X Y −3 3 3
Solve

Absolute value equations

Geometrically, solving $|E(x)| = 0$ means finding the x-intercept. For a V-shaped graph, this is the vertex sitting on the x-axis: the graph touches the axis there.

To find where two absolute value graphs meet, set them equal and split into the two cases. The solution gives $x$; afterwards, compute $y$ to get the point.

The "$E = F$ or $E = -F$" shortcut is the quickest. If you prefer to see the signs, you can also split by interval: use the break points of both bars, drop the bars on each interval, solve, and keep only solutions that lie in that interval.

Practice★☆☆Not started
Solve the equation $|2x - 8| = 0$ and explain what this result represents geometrically with respect to the graph of the function $f(x) = |2x - 8|$.

Solve the equation $|2x - 8| = 0$ and explain what this result represents geometrically with respect to the graph of the function $f(x) = |2x - 8|$.

Solve
Practice★★☆Not started
Find analytically the points of intersection between the modulus function $f(x) = |3x - 2|$ and the constant function $g(x) = 7$.

Find analytically the points of intersection between the modulus function $f(x) = |3x - 2|$ and the constant function $g(x) = 7$.

Solve
Practice★★★Not started
Find analytically the points of intersection of the functions $f(x) = |x + 1|$ and $g(x) = |2x - 5|$. Hint: analyze the different cases according to the sign of the…

Find analytically the points of intersection of the functions $f(x) = |x + 1|$ and $g(x) = |2x - 5|$. Hint: analyze the different cases according to the sign of the expressions inside the modulus.

Solve

Absolute value inequalities and domains

Back to the woodshop: the dowels pass inspection if the error $|x - 10|$ is at most $0.25$ in. We solve it and graph it.

Number line showing the solution of |x - 10| ≤ 0.25: a shaded segment from 9.75 to 10.25 with closed endpoints. 9.75 10 10.25 distance from 10 is at most 0.25

This is the tool for domain problems with square roots: the radicand must be $\ge 0$.

Practice★★☆Not started
A machine cuts metal rods with a target length of $250\text{ mm}$. The cutting error function is defined as $E(x) = |x - 250|$. If quality control requires that…

A machine cuts metal rods with a target length of $250\text{ mm}$. The cutting error function is defined as $E(x) = |x - 250|$. If quality control requires that $E(x) \le 1.5$, set up the corresponding inequality and determine the interval of valid lengths for the rods.

Solve
Practice★★★Not started
Find the domain of definition of the irrational function $h(x) = \sqrt{8 - |x^2 - 8|}$. To do this, set up and solve the corresponding modulus inequality.

Find the domain of definition of the irrational function $h(x) = \sqrt{8 - |x^2 - 8|}$. To do this, set up and solve the corresponding modulus inequality.

Solve

Summary

See all the exercises in this section