Modulus / Absolute Value Functions

A full online textbook lesson on modulus graphs, including y=|x| and y=|f(x)|.

Online textbookIndependent studyWorked examplesRadford Mathematics

On this page

  1. The parent modulus function
  2. Translations
  3. Modulus of a function
  4. Domain and range ideas
  5. Videos
  6. Practice

1. The parent modulus function

The simplest modulus function is \(y=|x|\). It gives the distance of \(x\) from 0 on the number line, so the output is never negative.

\[ |x|=\begin{cases} x,&x\ge 0\\ -x,&x<0 \end{cases} \]

Worked example 1: sketch \(y=|x|\)

The graph consists of two straight-line pieces meeting at the origin. To the right of the origin, \(|x|=x\). To the left, \(|x|=-x\).

The domain is \(\mathbb{R}\). The range is \([0,\infty)\).

-4-3-2-11234-112345y0xy=|x|(0,0)

The graph has a V-shape and its lowest point is the vertex at the origin.

2. Translations of \(y=|x|\)

Translations work in the same way as for any other function.

\[y=|x-a|+b\]

The vertex moves to \((a,b)\).

Worked example 2: sketch \(y=|x-2|\)

This is the parent graph translated 2 units to the right. The vertex is \((2,0)\).

-2-1123456-112345y0xy=|x−2|(2,0)

The V-shape is unchanged. Only the position of the vertex changes.

3. Modulus of a function: \(y=|f(x)|\)

To sketch \(y=|f(x)|\), keep the part of \(y=f(x)\) above the \(x\)-axis unchanged, and reflect the part below the \(x\)-axis upward.

This is one of the most important modulus graph rules in IB and IGCSE courses.

Worked example 3: sketch \(y=|x^2-4|\)

First sketch \(y=x^2-4\). It is a parabola with vertex \((0,-4)\) and roots at \(x=-2\) and \(x=2\).

The section between \(-2\) and \(2\) lies below the \(x\)-axis, so that section is reflected upward.

The point \((0,-4)\) becomes \((0,4)\). The roots remain at \((-2,0)\) and \((2,0)\).

-3-2-1123-5-4-3-2-11234567y0xy=x²−4y=|x²−4|(−2,0)(2,0)(0,4)

The red curve is \(y=x^2-4\). The blue curve is \(y=|x^2-4|\).

4. Domain and range ideas

  • The modulus sign does not usually change the domain.
  • It can change the range because negative outputs become positive.
  • For \(y=|f(x)|\), the lowest possible value is 0 unless the whole graph of \(f(x)\) is already above the axis.

5. Related Radford Mathematics videos

These videos support the graph ideas used on this page.

Reflections

Useful for understanding \(y=|f(x)|\).

Vertical translations

Helpful when sketching translated modulus graphs.

Horizontal translations

Helpful when sketching \(|x-a|\).

6. Practice with solutions

  1. State the domain and range of \(y=|x|\).
    Show solution

    Domain: \(\mathbb{R}\). Range: \([0,\infty)\).

  2. Sketch \(y=|x+3|-2\).
    Show solution

    This is \(y=|x|\) translated 3 units left and 2 units down. The vertex is \((-3,-2)\).

  3. Explain how to obtain \(y=|f(x)|\) from \(y=f(x)\).
    Show solution

    Keep the part above the \(x\)-axis unchanged and reflect any part below the \(x\)-axis upward.

  4. Find the range of \(y=|x^2-9|\).
    Show solution

    The modulus makes all outputs non-negative, and 0 occurs at \(x=\pm3\). So the range is \([0,\infty)\).