The doubt
Take \(f(x) = x^2 - 2x - 3\) and \(x = -2\). Then \(|f(-2)| = |5| = 5\), but \(f(|-2|) = f(2) = -3\). The same two steps in the other order give another answer. The modulus outside acts on the height: the part of the graph below the \(x\)-axis turns up. The modulus inside acts on \(x\): the left part is thrown away and the right part is copied to the left.
Outside, \(|f(x)|\): first find \(f(x)\), then take its modulus. A height of \(5\) stays \(5\), and a height of \(-3\) becomes \(3\). So \(|f(x)|\) is never below the \(x\)-axis.
Inside, \(f(|x|)\): first take \(|x|\), then put it into \(f\). At \(x = -2\) and at \(x = 2\) you put in the same number, \(2\). So \(f(|x|)\) has the same height at \(x\) and \(-x\).

The modulus outside: turn up what is below
The graph of \(f(x) = x^2 - 2x - 3 = (x + 1)(x - 3)\) crosses the \(x\)-axis at \(-1\) and \(3\), and it is below the axis between them. Its lowest point is \((1, -4)\).
\(|f(x)|\) keeps every height that is \(0\) or more and turns every negative height into the same positive height. So the dip between \(-1\) and \(3\) turns over the \(x\)-axis like a page, and the lowest point \((1, -4)\) goes up to \((1, 4)\).

To draw \(y = |f(x)|\)
Keep the part of \(y = f(x)\) on or above the \(x\)-axis. Turn the part below the \(x\)-axis up, over the \(x\)-axis.
The modulus inside: keep the right part, copy it to the left
For \(x \ge 0\), \(|x| = x\), so \(f(|x|) = f(x)\): the right part of the graph stays.
For \(x < 0\), \(f(|x|) = f(-x)\): at \(-2\) the height is \(f(2) = -3\), the height at \(+2\). So every point on the left copies its height from the matching point on the right. The old left part of \(f\) is thrown away, and the right part turns over the \(y\)-axis.
\(f(-1) = 0\), but \(f(|-1|) = f(1) = -4\): the root \(-1\) is lost. The roots of \(f(|x|)\) are \(-3\) and \(3\).

To draw \(y = f(|x|)\)
Keep the part of \(y = f(x)\) for \(x \ge 0\). Throw away the part for \(x < 0\), and copy the right part over the \(y\)-axis.
From the video
Find the number of real solutions of \(\big|x^2 - 4|x| + 3\big| = 1\).
Spot \(f(|x|)\). \(x^2 = |x|^2\), so \(x^2 - 4|x| + 3 = g(|x|)\) with \(g(x) = x^2 - 4x + 3 = (x - 1)(x - 3)\).
Both moves. Draw \(g\), copy its right part to the left for \(g(|x|)\), then turn up the parts below the \(x\)-axis for \(\big|g(|x|)\big|\).
Count. The line \(y = 1\) meets the graph at six points. The two humps reach exactly \(1\).
Check. \(g(|x|) = 1\) gives \(|x| = 2 \pm \sqrt{2}\): four values of \(x\). \(g(|x|) = -1\) gives \(|x| = 2\): two values.
\(6\) real solutions

Careful
Do not keep the old left part of \(f(x)\) in \(f(|x|)\). The graph of \(f(|x|)\) is always the same on both sides of the \(y\)-axis; the left part of \(f\) plays no part in it. And \(|f(x)|\) moves no point that is on or above the \(x\)-axis: it only turns up what is below.
Outside: turn up the part below the \(x\)-axis. Inside: keep the right part and copy it over the \(y\)-axis.
Key formulas
- Outside: \(|f(x)| = f(x)\) where \(f(x) \ge 0\), and \(-f(x)\) where \(f(x) < 0\). It is never below the \(x\)-axis.
- Inside: \(f(|x|) = f(x)\) for \(x \ge 0\), and \(f(-x)\) for \(x < 0\). It is the same on both sides of the \(y\)-axis.
- \(x^2 = |x|^2\), so \(x^2 + b|x| + c\) is \(f(|x|)\) with \(f(x) = x^2 + bx + c\).
- The number of solutions of \(h(x) = k\) is the number of points where the line \(y = k\) meets the graph of \(y = h(x)\).
Practice set
Easy to hard. Draw the graph first, with each modulus in its own step. In Questions 2 to 6, \(f(x) = x^2 - 2x - 3\). Question 1 is the quiz at the end of the video. Try each one before you open its answer.
How many real roots does \(x^2 - 5|x| + 6 = 0\) have? (A) \(2\) (B) \(3\) (C) \(4\)
Show answer
(C) \(4\). \(x^2 = |x|^2\), so \(|x|^2 - 5|x| + 6 = 0\): \(|x| = 2\) or \(3\), and \(x = \pm 2, \pm 3\). (A) counts only the roots of \(x^2 - 5x + 6 = 0\).
Find \(|f(2)|\) and \(f(|-3|)\).
Show answer
\(3\) and \(0\). \(f(2) = 4 - 4 - 3 = -3\), so \(|f(2)| = 3\). \(|-3| = 3\) and \(f(3) = 9 - 6 - 3 = 0\).
For which \(x\) is \(|f(x)|\) different from \(f(x)\)?
Show answer
\(-1 < x < 3\). They differ only where \(f(x)\) is negative: between the roots \(-1\) and \(3\). Elsewhere the modulus changes nothing.
For which \(x\) is \(f(|x|)\) different from \(f(x)\)?
Show answer
\(x < 0\). For \(x < 0\), \(f(|x|) - f(x) = f(-x) - f(x) = 4x\), which is not \(0\). For \(x \ge 0\) they are equal.
How many solutions does \(|x^2 - 2x - 3| = 2\) have?
Show answer
\(4\). \(f(x) = 2\): \(x = 1 \pm \sqrt{6}\). \(f(x) = -2\): \(x = 1 \pm \sqrt{2}\). The hump reaches \(4\), so the line \(y = 2\) cuts it twice.
How many solutions does \(|x^2 - 2x - 3| = 4\) have?
Show answer
\(3\). \(f(x) = 4\): \(x = 1 \pm 2\sqrt{2}\). \(f(x) = -4\): only \(x = 1\), where the top of the hump just touches the line \(y = 4\).
How many real roots does \(x^2 - 2|x| - 3 = 0\) have?
Show answer
\(2\). It is \(f(|x|) = 0\): \(|x| = 3\) or \(|x| = -1\). Only \(|x| = 3\) is possible, so \(x = \pm 3\). The root \(-1\) of \(f\) is lost.
How many real solutions does \(\big|x^2 - 4|x| + 3\big| = \dfrac{1}{2}\) have?
Show answer
\(8\). \(g(|x|) = \dfrac{1}{2}\): \(|x| = 2 \pm \sqrt{\dfrac{3}{2}}\). \(g(|x|) = -\dfrac{1}{2}\): \(|x| = 2 \pm \sqrt{\dfrac{1}{2}}\). All four are positive: eight values of \(x\).