Skip to main content

Absolute value functions

Graph of y equals the absolute value of x

Absolute values turn negative values into positive ones, and leave positive ones unchanged. Absolute value functions are useful for expressing situations where only magnitude matters, without regard to direction, like measuring distance, temperature differences, profit or loss diffeerences, and margin of error.

Absolute values

The absolute value of any number \(x\) gives a measure of its size or magnitude, regardless of whether it is positive or negative. It is the distance from \(0\) on a number line.

We represent the absolute value of \(x\) using two vertical lines \(\left|\,\right|\). For example, the absolute value of \(x\) would be \(\left|x\right|\).

Example 1 – finding the absolute value

Find \(\left|2\right|\).

To find the absolute value, we simply turn any negative value into a positive one. \(2\) is already positive, so \(\left|2\right|=2\).

Find \(\left|-2\right|\).

To find the absolute value, we simply turn any negative value into a positive one.
\[\left|-2\right|=2\]

Find \(\left|-4+3\right|\).

The operation is inside the vertical lines, so first, complete the operation.
\[-4+3=-1\]

Then, find the absolute value by turning the negative into a positive.
\[\left|-1\right|=1\]

Find \(\left|-8\right|+\left|-1\right|\).

Here, the operation is outside the vertical lines, so we find the absolute values first, then complete the calculation.
\[\begin{align*} \left|-8\right|+\left|-1\right| & = 8+1\\
& = 9
\end{align*}\]

Exercise – finding the absolute value

Evaluate the following.

  1. \(\left|-11\right|\)
  2. \(\left|-9+4\right|\)
  3. \(-\left|4\right|-\left|-5\right|\)
  4. \(\left|-12\right|-\left|3\right|\)
  5. \(\left|-30\right|\div\left|5\right|\)

    1. \(11\)
    2. \(5\)
    3. \(-9\)
    4. \(9\)
    5. \(6\)

Solving equations involving absolute values

Equations involving absolute values often have two solutions because the absolute value measures distance from \(0\) and is always positive. This means the expression inside can be equal to either a positive or negative value.

For example, if \(\left|x\right|=7\), \(x\) can be \(7\) or \(-7\) since both give an answer of \(7\).

Example 1 – solving equations involving absolute values

Solve \(\left|x-2\right|=3\).

We consider two cases: \(x-2=3\) and \(x-2=-3\).

For \(x-2=3\):
\[\begin{align*} x-2 & = 3\\
x & = 5
\end{align*}\]

For \(x-2=-3\):
\[\begin{align*} x-2=-3\\
x & = -1
\end{align*}\]

Therefore, \(x=-1\) and \(x=3\).

Solve \(\left|2x+1\right|=\left|x-5\right|\).

When we have absolute value expressions on both sides of the equation, it is easier for us to square both sides.
\[\begin{align*} \left|2x+1\right| & = \left|x-5\right|\\
\left(2x+1\right)^{2} & = \left(x-5\right)^{2}\\
4x^{2}+4x+1 & = x^{2}-10x+25\\
4x^{2}+4x+1-x^{2}+10x-25 & = 0\\
3x^{2}+14x-24 & = 0\\
(3x-4)(x+6) & = 0\\
3x-4=0 & \textrm{ or } x+6=0\\
x=\dfrac{4}{3} & \textrm{ or } x=-6
\end{align*}\]

Therefore, \(x=-6\) and \(x=\dfrac{4}{3}\).

Find the set of \(x\in\mathbb{R}\) such that \(\left|\dfrac{2-x}{3}\right|<4\).

Working with inequalities is a bit more complicated. Let's look at the working out step by step.

First, let's multiply both sides by \(3\).
\[\begin{align*} \left|\frac{2-x}{3}\right| & < 4\\
\left|2-x\right| & < 12
\end{align*}\]

Next, we need to remove the absolute value. When we do this, we get a double inequeality. The magnitude is \(12\) on either side of \(0\), so \(2-x\) is between \(-12\) and \(12\).
\[-12<2-x<12\]

We need to subtract \(2\) from both sides.
\[-14<x<10\]

Finally, we get rid of the negative by reversing the inequality signs.
\[14>x>-10\]

We express our final answer as a set: \(\left\{ x \in \mathbb{R} : -10 < x < 14 \right\}\).

Find the set of \(x\in\mathbb{R}\) such that \(\left|\dfrac{x-2}{3}\right|\geq2\).

First, multiply both sides by \(3\).
\[\begin{align*} \left|\dfrac{x-2}{3}\right| & \geq 2\\
\left| x-2 \right| \geq 6
\end{align*}\]

We consider two cases: \(x-2\geq6\) and \(x-2\geq-6\).

For \(x-2\geq6\):
\[\begin{align*} x-2 & \geq 6\\
x & \geq 8
\end{align*}\]

For \(x-2\geq-6\):
\[\begin{align*} x-2 & \geq -6\\
x & \geq -4
\end{align*}\]

We express our final answer as a set: \(\left\{ x: x\leq-4\right\}\cup\left\{ x : x\geq8\right\}\).

Exercise – solving equations involving absolute values

Find the following, for \(x\in\mathbb{R}\).

  1. \(\left\{x:\left|x\right|=6\right\}\)
  2. \(\left\{x:\left|x-1\right|<3\right\}\)
  3. \(\left\{x:\left|\dfrac{x-3}{2}\right|\geq1\right\}\)
  4. \(\left\{x:\left|\dfrac{x}{2}\right|=\left|x+2\right|\right\}\)

  1. \(x=-6\) and \(x=6\)
  2. \(\left\{x:-2<x<4\right\}\)
  3. \(\left\{x:x\leq1\right\}\cup\left\{x:x\geq5\right\}\)
  4. \(x=-4\) and \(x=-\dfrac{4}{3}\)

Graphs of absolute value functions

Absolute value functions are hybrid functions. They have the general form:

\[f:\mathbb{R}\rightarrow\mathbb{R},\textrm{where }f(x)=\left|x\right|=\begin{cases} -x & x<0\\ x & x\geq0 \end{cases}\]

The graph of \(y=\left|x\right|\) is shown.

Graph of y equals the absolute value of x
  • The domain of \(y=\left|x\right|\) is \(\mathbb{R}\), the set of all real numbers.
  • The range of \(y=\left|x\right|\) is \(\mathbb{R}^{+}\cup\left\{ 0\right\}\), the set of all positive real numbers and \(0\).

In general, to sketch the graph of \(y=\left|f(x)\right|\), we need to sketch the graph of \(y=f(x)\) first, then reflect the \(x\)-axis portion of the graph below the \(x\)-axis.

Transforming graphs of absolute value functions

Absolute value functions can be transformed like other graphs and functions. Let's look at the basic form \(y=\left|x\right|\) as an example.

Example 1 – transforming graphs of absolute value functions

Graph \(y=\left|x-2\right|\).

The \(x-2\) indicates that the graph is being translated \(2\) units to the right.

Graph of y equals the absolute value of x minus 2

Graph \(y=\left|x\right|+1\).

The \(+1\) outside of the vertical bars indicates that the graph is being translated \(1\) unit up.

Graph of y equals the absolute value of x, plus 1

Graph \(y=3-\left|x\right|\).

\(y=3-\left|x\right|\) is the same as \(y=-\left|x\right|+3\).

The \(-\) in front of the \(\left|x\right|\) indicates that the graph is being reflected about the \(x\)-axis. The \(+3\) indicates that the graph is being translated \(3\) units up.

Graph of y equals 3 minus the absolute value of x

Graph \(\left\{ (x,y):y=\left|x^{2}-1\right|\right\}\).

The \(x^{2}-1\) indicates that the \(x^{2}\) graph has been translated \(1\) unit down. The vertical bars then tell us to reflect the portion below the \(x\)-axis up.

Graph of y equals the absolute value of x squared minus 1

Exercise – transforming graphs of absolute value functions

Sketch the following graphs.

  1. \(y=\left|x+4\right|\)
  2. \(y=\left|x-1\right|-3\)
  3. \(y=\left|3-x^{2}\right|\)

  1. \(y=\left|x+4\right|\)
    Graph of y equals the absolute value of x plus 4
  2. \(y=\left|x-1\right|-3\)
    Graph of y equals the absolute value of x minus 1, minus 3
  3. \(y=\left|3-x^{2}\right|\)
    Graph of y equals the absolute value of 3 minus x squared

Images on this page by RMIT, licensed under CC BY-NC 4.0