This whole subtopic is higher level. Nothing in it is on an SL paper.
Educerie · IB Diploma · Mathematics: analysis and approaches
Topic 2 Functions · 2.16 The graphs of |f(x)|, f(|x|), 1/f(x), f(ax + b) and [f(x)]², and modulus equations and inequalities
What you must be able to do
| You must be able to | Level | What it looks like in the exam |
|---|---|---|
| Know the modulus function ∣x∣, its graph and its properties | HL | "Sketch y = ∣2x − 3∣" (2 marks); modulus as distance |
| Sketch y = ∣f(x)∣ and y = f(∣x∣) from the graph of f | HL | Graph given on a grid: "sketch y = ∣f(x)∣", key points labelled (3 marks) |
| Sketch y = 1/f(x) from the graph of f, with asymptotes and turning points | HL | "Sketch y = 1/f(x), showing any asymptotes and the coordinates of any turning points" (4 marks) |
| Sketch y = f(ax + b) as a translation and a horizontal stretch | HL | "Describe the transformations"; "write down the image of the vertex" (2 to 3 marks) |
| Sketch y = [f(x)]² from the graph of f | HL | Zeros, turning points and values ±1 tracked correctly (3 marks) |
| Solve modulus equations algebraically and graphically, rejecting invalid roots | HL | "Solve ∣x² − 4∣ = 3x" (5 marks) |
| Solve modulus inequalities, with technology where no algebra will do | HL | "Solve ∣x − 1∣ > ∣2x + 4∣" (4 marks); Paper 2 "solve ∣3x arccos x∣ > 1" |
Before you start
You need the transformations of 2.11, including the order of transformations, and the reflections y = −f(x) and y = f(−x). You need asymptotes (2.4, 2.8, 2.13), even functions (2.14), and inequalities by graph and by sign (2.15). Every example on this page starts from the same function, f(x) = x² − 2x − 3 = (x + 1)(x − 3), with zeros −1 and 3, y-intercept −3 and vertex (1, −4), so you can see what each rule does to one familiar parabola.
1The idea in one paragraph
Each of the five new graphs is made from y = f(x) by one simple rule. |f(x)| keeps the positive outputs and flips the negative ones up. f(|x|) throws away the left half of the graph and replaces it with a mirror image of the right half. 1/f(x) replaces every height by its reciprocal, so zeros become asymptotes, big becomes small, and small becomes big. f(ax + b) is the SL transformations with one more horizontal step. [f(x)]² squares every height, so everything goes non-negative and heights above 1 grow while heights below 1 shrink. The modulus also gives equations and inequalities, and those are solved either by splitting into cases or by reading the graphs that this page teaches you to draw.
2The modulus function
The modulus (absolute value) of x is its size without its sign:
|x| = x when x ≥ 0, and |x| = −x when x < 0
So |5| = 5 and |−5| = −(−5) = 5. Think of |x| as the distance from x to 0 on the number line, and |x − a| as the distance from x to a. Figure 1(a) shows y = |x|: the line y = x for x ≥ 0, and its reflection y = −x for x < 0, a V with its corner at the origin.
Three facts get used constantly:
- |ab| = |a||b| and |a/b| = |a|/|b|, but |a + b| is not |a| + |b| in general: |3 + (−5)| = 2, while |3| + |−5| = 8.
- |x|² = x², and |x| = √(x²). That is why squaring both sides of an equation between two moduli is safe.
- |x| ≥ 0 always, so an equation like |x − 2| = −3 has no solution.
Figure 1(b) shows y = |2x − 3|. The line y = 2x − 3 is negative for x < 1.5; those outputs are made positive, so that piece of the line is reflected up in the x-axis. The corner of the V is at the zero of the inside, (1.5, 0).
3y = |f(x)| and y = f(|x|)
These two look alike on paper and do completely different things. Figure 2 shows both, for f(x) = x² − 2x − 3.
y = |f(x)|: the modulus acts on the output. Every point with f(x) ≥ 0 stays where it is. Every point with f(x) < 0 is reflected in the x-axis, (x, y) → (x, −y). In Figure 2(a) the part of the parabola between the zeros −1 and 3 was below the axis, so it is flipped up: the vertex (1, −4) becomes a maximum at (1, 4). The zeros stay where they are, and there the graph usually has a sharp corner. The whole graph lies on or above the x-axis.
y = f(|x|): the modulus acts on the input. For x ≥ 0, |x| = x, so the graph is exactly the graph of f. For x < 0, f(|x|) = f(−x), so the left half is the reflection of the right half in the y-axis. In practice: rub out everything left of the y-axis, and reflect what is on the right across. Figure 2(b) shows the result: the minimum at (1, −4) is copied to (−1, −4), and the zero at 3 is copied to −3. The original zero at −1 has gone, because it was on the discarded left half. f(|x|) is always an even function (2.14): its graph is symmetric in the y-axis.
|f(x)| reflects what is below the x-axis upwards. f(|x|) replaces the left half by the mirror image of the right half.
To tell them apart in the exam, ask where the modulus bars are. Around the whole function: outputs, vertical flip. Around the x alone: inputs, horizontal mirror.
4y = 1/f(x)
Take each height y of the original graph and replace it by 1/y. Everything about the new graph follows from how 1/y behaves.
| On y = f(x) | On y = 1/f(x) | Why |
|---|---|---|
| a zero, f(a) = 0 | a vertical asymptote x = a | 1 divided by something near 0 is huge |
| a vertical asymptote x = a | a zero (the graph approaches (a, 0)) | 1 divided by something huge is near 0 |
| f(x) → ±∞ as x → ±∞ | horizontal asymptote y = 0 | the same reason |
| horizontal asymptote y = k, k ≠ 0 | horizontal asymptote y = 1/k | the reciprocal of k |
| f(x) = 1 or f(x) = −1 | the same point: invariant | 1/1 = 1 and 1/(−1) = −1 |
| positive / negative | positive / negative | the sign never changes |
| a maximum at (a, b), b ≠ 0 | a minimum at (a, 1/b), and the other way round | bigger heights give smaller reciprocals |
| increasing (away from zeros) | decreasing | the same reason |
Worked example 1 · 1/f for our parabola (Paper 1). Sketch y = 1/(x² − 2x − 3).
- Zeros of f at −1 and 3 give the vertical asymptotes x = −1 and x = 3.
- f → +∞ at both ends, so 1/f → 0: the horizontal asymptote is y = 0, approached from above.
- The minimum of f at (1, −4) becomes a maximum at (1, −¼).
- The y-intercept of f is −3, so the y-intercept of 1/f is (0, −⅓).
- Where f = 1, x = 1 ± √5; where f = −1, x = 1 ± √3. At those four points the two graphs meet.
Figure 3 draws it. Outside the zeros f is positive, so both outer branches of 1/f are above the axis, rising towards the asymptotes. Between the zeros f is negative, so the middle branch is below the axis, an upside-down arch that peaks at (1, −¼) and falls to −∞ at each asymptote.
Compare 2.13: y = 1/(x² − 2x − 3) is a rational function of the form (ax + b)/(cx² + dx + e) with a = 0, and the two pages reach the same graph by different routes.
5y = f(ax + b)
At SL you met y = f(x − a) and y = f(qx) separately. HL combines them. Both changes are inside the bracket, so both are horizontal, and the order matters. The safe way is to build the expression in two steps, replacing x each time:
- Replace x by x + b: f(x) becomes f(x + b). A translation by the vector (−b, 0), that is, b units left.
- Replace x by ax: f(x + b) becomes f(ax + b). A horizontal stretch with scale factor 1/a.
Translate first, then stretch. Check that it lands where it should: in f(x + b), putting ax in place of x gives f(ax + b). Stretching first would give f(ax), then replacing x by x + b gives f(a(x + b)) = f(ax + ab), which is different.
The alternative order is also correct if the translation is adjusted: write f(ax + b) = f(a(x + b/a)), a horizontal stretch with scale factor 1/a followed by a translation by (−b/a, 0). Either description earns the marks, as long as the numbers match the order.
A single point moves by solving for the new x: the point (p, q) on y = f(x) goes to the point where ax + b = p, that is ((p − b)/a, q).
Worked example 2. For f(x) = x² − 2x − 3, sketch y = f(2x + 1).
- Translate 1 left: y = f(x + 1). The vertex (1, −4) goes to (0, −4); the zeros −1 and 3 go to −2 and 2.
- Stretch horizontally with scale factor ½: y = f(2x + 1). The vertex stays at (0, −4), since it is on the y-axis; the zeros halve to −1 and 1.
Figure 4 shows both steps. The point rule gives the same thing directly: the zero at 3 goes to (3 − 1)/2 = 1, and the vertex at 1 goes to (1 − 1)/2 = 0. And a check by algebra: f(2x + 1) = (2x + 1)² − 2(2x + 1) − 3 = 4x² − 4, with zeros ±1 and vertex (0, −4).
If a is negative, the stretch includes a reflection in the y-axis: f(−2x + 1) is f(2x + 1) reflected in the y-axis, since replacing x by −x in f(2x + 1) gives f(−2x + 1).
6y = [f(x)]²
Square every height. Four consequences:
- Nothing is negative. The whole graph lies on or above the x-axis.
- Zeros stay zeros, and become touching points. Near a zero, f(x) is small and changes sign; its square is smaller still and does not change sign, so the graph touches the axis and turns, like a double root (2.12).
- Heights ±1 go to 1, and 1 is the dividing line. Where |f(x)| > 1 the square is bigger than |f(x)|; where |f(x)| < 1 it is smaller.
- Turning points stay at the same x, with the height squared. But their type can change: a minimum of f below the axis, such as (1, −4), becomes a maximum of [f]² at (1, 16), because moving away from x = 1 brings f closer to 0.
Figure 5 shows [f(x)]² = (x² − 2x − 3)² for our parabola: touching at −1 and 3, a hump to (1, 16) in between, y-intercept (0, 9), and steep rises outside, where the parabola was already above 1.
Do not confuse [f(x)]² with f(x²) or with |f(x)|. [f(x)]² and |f(x)| have the same zeros and are both non-negative, but at the zeros |f(x)| usually has a corner and [f(x)]² is smooth, and away from them the two differ by the rule "above 1 bigger, below 1 smaller".
7Modulus equations
Three shapes cover almost every question. In each, remember the definition: |A| = B means A = B or A = −B, and B must not be negative.
|f(x)| = k, with k a positive number. Split: f(x) = k or f(x) = −k. For |x² − 5| = 4: x² = 9 or x² = 1, so x = ±3 or x = ±1.
|f(x)| = g(x), with g a function. Split into f(x) = g(x) and f(x) = −g(x), solve each, and then check every root in the original equation, since a root that makes g(x) negative is false.
Worked example 3 (Paper 1). Solve |x² − 4| = 3x.
Four candidates, two survivors. A sketch of y = |x² − 4| and y = 3x confirms it: the line only meets the W-shaped graph where the line is above the axis, at x = 1 and x = 4.
|f(x)| = |g(x)|. Either split into f = g or f = −g (both sides are non-negative automatically, so no checking is needed), or square both sides, which is safe here because |A|² = A².
Graphically. Every modulus equation is also an intersection question (2.4). Figure 6 shows |2x − 3| = x + 1: the line meets the V twice, once on each arm. The left arm is y = −(2x − 3) = 3 − 2x, giving 3 − 2x = x + 1, so x = ⅔; the right arm gives 2x − 3 = x + 1, so x = 4. The picture tells you which arm each solution is on, and so which case is real.
8Modulus inequalities
The distance rule. Since |x − a| is the distance from x to a:
|x − a| < b means a − b < x < a + b. |x − a| > b means x < a − b or x > a + b.
"Within b of a" is one interval; "further than b from a" is two. For |3x − 2| ≥ 4: either 3x − 2 ≥ 4, giving x ≥ 2, or 3x − 2 ≤ −4, giving x ≤ −⅔.
|f(x)| compared with g(x). Solve the equation first, as in section 7, and then read the inequality off the graph. In Figure 6 the V is below the line between the two meeting points, so |2x − 3| < x + 1 exactly when ⅔ < x < 4, with strict signs because the inequality is strict.
|f(x)| compared with |g(x)|. Both sides are non-negative, so squaring keeps the direction of the inequality:
Squaring is only safe when both sides are known to be non-negative. For |x + 2| < 2x − 1 the right-hand side can be negative, so use the case method or the graph instead.
With technology. The guide's own example is |3x arccos(x)| > 1. No algebra solves 3x arccos x = 1, so on Paper 2:
- Note the domain: arccos x is defined only for −1 ≤ x ≤ 1.
- Graph y = |3x arccos(x)| and y = 1 on that domain (Figure 7).
- Intersect: x = −0.189, 0.254 and 0.937 (3 s.f.).
- Read where the curve is above the line. On the left, the curve starts at (−1, 3π) and falls to 1 at x = −0.189. On the right, it rises above 1 at 0.254 and falls back at 0.937.
- Answer: −1 ≤ x < −0.189 or 0.254 < x < 0.937. The end point −1 is included because it is in the domain and the curve is above 1 there.
The dashed grey piece in Figure 7 is 3x arccos x before the modulus, negative for x < 0; the modulus reflected it up. Without the modulus, the left-hand piece of the answer would have been missed.
9Where marks are lost
Confusing |f(x)| with f(|x|). Bars around the function flip what is below the x-axis. Bars around x mirror the right half into the left. Read where the bars are.
Keeping the left half in f(|x|). The original left half is thrown away, not reflected. The new graph is always symmetric in the y-axis.
Not rejecting false roots. In |f(x)| = g(x), a solution that makes g(x) negative is not a solution. Check every candidate.
Losing the invariant points in 1/f(x) and [f(x)]². Where f = ±1 the graphs meet; in [f(x)]² both go to y = 1. Examiners look for these.
Drawing 1/f(x) with a turning point in the wrong place. The maximum of 1/f is directly above or below the minimum of f, at the same x, with height 1/b.
Stretching before translating in f(ax + b) with the wrong numbers. Translate by −b and then stretch by 1/a, or stretch by 1/a and then translate by −b/a. Mixing the two orders mixes up the numbers.
Squaring an inequality whose sides may be negative. Square only when both sides are moduli, or otherwise known to be non-negative.
Missing a piece of a GDC answer. Check the domain and every meeting point; the modulus often creates a second region where the original function was negative.
10Work it right
- Before drawing, list the key features of f: zeros, turning points, intercepts, asymptotes, and where f = ±1.
- |f(x)|: reflect any part below the x-axis. f(|x|): delete the left half and mirror the right half.
- 1/f(x): zeros become vertical asymptotes, large values tend to 0, maxima and minima swap at the same x, signs are kept, f = ±1 is invariant.
- f(ax + b): translate by −b, then stretch horizontally by 1/a; or move each point to ((p − b)/a, q).
- [f(x)]²: all non-negative, zeros touch, turning points square their height, 1 is the dividing line.
- Modulus equations: split into cases and check each root, or square two moduli, or intersect graphs.
- Modulus inequalities: solve the equation, then read the graph; use the distance rule for |x − a| compared with a number.
11Try it
Marks in brackets. Q1 to Q5 are Paper 1 style, no calculator. Q6 is Paper 2 style, with a GDC.
Q1. Solve the inequality |3x − 2| ≥ 4. 3 marks
Q2. Solve the equation |x² − 5| = 4. 4 marks
Q3. Solve the inequality |x + 1| ≤ |x − 3|. 4 marks
Q4. Let f(x) = x² − x − 2.
(a) Write down the equations of the asymptotes of the graph of y = 1/f(x). 3 marks
(b) Find the coordinates of the local maximum point of y = 1/f(x). 2 marks
(c) Write down the coordinates of the local maximum point of y = |f(x)|. 1 mark
Q5. Let f(x) = x² − 4x. The graph of y = f(2x − 3) is obtained from the graph of y = f(x) by two transformations.
(a) Describe the two transformations, in a correct order. 2 marks
(b) Find the coordinates of the vertex of y = f(2x − 3). 2 marks
Q6. Solve the inequality |ln x| < 2 − x. 4 marks
12In one breath
The modulus |x| is the size of x, the distance from 0, so |x − a| < b means within b of a. y = |f(x)| reflects the part of the graph below the x-axis upwards; y = f(|x|) deletes the left half and mirrors the right half into it, making an even function. y = 1/f(x) turns zeros into vertical asymptotes and large values into values near 0, keeps signs, swaps maxima and minima at the same x, and leaves points where f = ±1 fixed. y = f(ax + b) is a translation by −b followed by a horizontal stretch of 1/a, sending (p, q) to ((p − b)/a, q). y = [f(x)]² is never negative, touches the axis at every zero, keeps turning points at the same x with squared heights, and stays at 1 where f = ±1. To solve |f(x)| = g(x), split into f = g and f = −g and reject any root where g < 0; to compare two moduli, square both sides. For inequalities, solve the equation, then read the graph, and use technology, with its domain, when nothing else will do.
Answers
Q1. 3x − 2 ≥ 4 gives x ≥ 2; 3x − 2 ≤ −4 gives x ≤ −⅔. So x ≤ −⅔ or x ≥ 2. M1 for splitting into the two cases with the inequality reversed in the second, A1 for each part.
Q2. x² − 5 = 4 gives x² = 9, x = ±3. x² − 5 = −4 gives x² = 1, x = ±1. x = −3, −1, 1, 3. M1 for both cases, A1 for ±3, A1 for ±1, A1 for all four stated with none extra.
Q3. Both sides are non-negative, so square: (x + 1)² ≤ (x − 3)², so x² + 2x + 1 ≤ x² − 6x + 9, so 8x ≤ 8, and x ≤ 1. As a check, x = 1 is the point equidistant from −1 and 3, and every point to its left is nearer to −1. M1 for squaring (or a valid case method), A1 for the linear inequality, A1 for x ≤ 1, R1 for justifying the squaring or checking a value. An answer from a sketch with the meeting point found algebraically also scores full marks.
Q4. (a) f(x) = (x − 2)(x + 1), so x = 2, x = −1 and y = 0. A1 for each vertical asymptote, A1 for y = 0.
(b) The vertex of f is at x = ½, with f(½) = ¼ − ½ − 2 = −9/4. So 1/f has a local maximum at (½, −4/9). M1 for using the vertex of f, A1 for (½, −4/9).
(c) (½, 9/4). A1.
Q5. (a) A translation by the vector (3, 0), that is 3 units right, followed by a horizontal stretch with scale factor ½. (Equivalently, a horizontal stretch with scale factor ½ followed by a translation by (1.5, 0).) A1 for each transformation with its detail in an order consistent with the numbers.
(b) The vertex of f is (2, −4). It moves to ((2 + 3)/2, −4) = (2.5, −4). Check: 2x − 3 = 2 when x = 2.5. M1 for applying both transformations to the vertex, A1.
Q6. The domain needs x > 0. Using the GDC, y = |ln x| and y = 2 − x meet at x = 0.159 and x = 1.56 (3 s.f.); the modulus graph is below the line between them. 0.159 < x < 1.56. M1 for graphing both sides (or splitting into ln x < 2 − x and −ln x < 2 − x), A1 for 0.159, A1 for 1.56, A1 for the set with strict inequalities. The equation −ln x = 2 − x also has a root near 3.15, but there 2 − x < 0, so it is not a meeting point with |ln x|; including it scores A0 for the set.
Educerie · written from the published IB Diploma Programme Mathematics: analysis and approaches guide, first assessment 2021, section 2.16 The graphs of |f(x)|, f(|x|), 1/f(x), f(ax + b) and [f(x)]², and modulus equations and inequalities. Original text, examples and questions. Diagrams drawn by Educerie. Last reviewed 25 September 2026.