Modulus / Absolute Value Functions
A full online textbook lesson on modulus graphs, including y=|x| and y=|f(x)|.
On this page
- The parent modulus function
- Translations
- Modulus of a function
- Domain and range ideas
- Videos
- 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.
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)\).
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.
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)\).
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)\).
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.
6. Practice with solutions
- State the domain and range of \(y=|x|\).
Show solution
Domain: \(\mathbb{R}\). Range: \([0,\infty)\).
- Sketch \(y=|x+3|-2\).
Show solution
This is \(y=|x|\) translated 3 units left and 2 units down. The vertex is \((-3,-2)\).
- 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.
- 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)\).