Leave lesson

Pure · Algebra & functions

1 / 12

The modulus function

What |x| means, how to sketch y = |f(x)|, and how to solve modulus equations and inequalities — including why some "solutions" must be thrown out.

Pure · Algebra & functions

The modulus function

What |x| means, how to sketch y = |f(x)|, and how to solve modulus equations and inequalities — including why some "solutions" must be thrown out.

Why it works

The modulus x|x| is the size of a number — its distance from 00, always 0\ge 0: x={xx0xx<0|x| = \begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases} So 5=5|5| = 5 and 5=5|-5| = 5. (The "x-x" isn't negative — when xx is negative, x-x is positive.) Its graph is a V: y=xy = |x| is y=xy = x with the part below the axis flipped up.

Sketching y=f(x)y = |f(x)|. Draw y=f(x)y = f(x), then reflect every part that is below the xx-axis up above it (the modulus can't be negative). The parts already above stay put. So y=2x4y = |2x - 4| is the line y=2x4y = 2x - 4 with its negative part flipped, giving a V with its vertex on the xx-axis at x=2x = 2.-112345-1123456(2, 0)(0, 4)xySolving equations. A=b|A| = b (with b0b \ge 0) means A=bA = b or A=bA = -b — both, because two values are the same distance from 00. So 2x1=5|2x - 1| = 5 gives 2x1=52x - 1 = 5 or 2x1=52x - 1 = -5. When the modulus is on both sides, f(x)=g(x)|f(x)| = |g(x)|, square both sides (safe, as both are 0\ge 0) — equivalently solve f=gf = g and f=gf = -g.

Solving inequalities. x<a|x| < a means xx is within aa of zero: a<x<a-a < x < a. And x>a|x| > a means xx is further than aa: x<ax < -a or x>ax > a.

The trap — check your answers. When the other side contains xx (e.g. x+1=2x1|x + 1| = 2x - 1), splitting into cases can throw up a value that makes the right-hand side negative — impossible, since a modulus is never negative. Always substitute candidate solutions back and discard any that don't actually work.

Graphs of y=axb+cy = a|x - b| + c and counting roots. This is a V (opening up when a>0a > 0) with its vertex at (b,c)(b, c), so its range is f(x)cf(x) \ge c. Asking how many solutions f(x)=kf(x) = k has is just sliding a horizontal line y=ky = k up the picture: it misses the V (k<ck < c: no roots), touches the vertex (k=ck = c: one root), or cuts both arms (k>ck > c: two roots). A restricted domain (like x0x \ge 0) chops one arm short, so above some value of kk that arm runs out and you drop back to one root — which is what makes "find the values of kk for two distinct roots" a real question rather than just "k>ck > c".