The idea: |x| is two rules

The absolute value |x| is the distance from x to 0, so it is never negative: |3| = 3 and |−3| = 3. Written out, it is a piecewise rule, one formula for each part of the x-axis:

|x| =  x    if x ≥ 0
|x| = −x    if x < 0

On the right half the graph of |x| is the line y = x. On the left half y = x is below the x-axis, and −x turns each of those points upside down. The left half of the line folds up about the x-axis, and the graph becomes a V with its corner at (0, 0). (Demo 1)

Left: the line y = x, with the part left of 0 (below the x-axis) in red. Right: y = |x|, the red half folded up to the orange line y = −x above the axis, a V with its corner at (0, 0); the old red half is shown in grey
|x| keeps the half of y = x above the axis and folds the half below it up: a V with a corner at 0.

Folding any graph: |f(x)|

The same works for any function f. Where f(x) ≥ 0, |f(x)| = f(x) and the graph stays put. Where f(x) < 0, |f(x)| = −f(x): each point (x, y) goes to (x, −y). So y = |f(x)| is f with everything below the x-axis mirrored above it. The rules of |f| are

|f(x)| =  f(x)    where f(x) ≥ 0
|f(x)| = −f(x)    where f(x) < 0

The two rules meet where f(x) = 0, at the roots of f, and the fold makes a sharp corner there. A graph that is never below the axis does not change at all, and folding twice changes nothing, because |f| is already ≥ 0. (Demo 5: nothing to fold)

f(x)below the axisy = |f(x)|
x − 2x < 2a V, corner at (2, 0)
2x + 3x < −1.5a steeper V, corner at (−1.5, 0), slopes ±2
x² − 4−2 < x < 2the dip flips into a bump with top (0, 4), corners at ±2
x² + 1neverthe same parabola

(Demo 2, Demo 3, Demo 4)

The V: a|x − h| + k

Every V-shaped graph can be written y = a|x − h| + k. The corner, called the vertex, is at (h, k): |x − h| is 0 at x = h, so y = k there. The two sides are lines with slopes −a and a. A bigger a makes a narrower V, and a negative a turns it upside down. This is |x| moved h to the right, stretched by a, and moved k up, as on Function Transformations.

Folding a line gives this form with k = 0: |mx + c| = |m|·|x + c/m|, so a = |m| and h = −c/m. For |2x + 3| that is 2|x + 1.5|, a V with vertex (−1.5, 0) and slopes ±2. The rule 2|x − 1| − 3 has vertex (1, −3). (Demo 6)

Three V graphs on one grid: y = |x| with vertex (0, 0), y = |x − 2| with vertex (2, 0), and y = 2|x + 1| − 3, narrower, with vertex (−1, −3)
In y = a|x − h| + k the vertex is (h, k) and a sets how steep the two sides are.

Piecewise functions: pick the rule, then compute

A piecewise function has several rules, each with a condition on x. The conditions split the x-axis into intervals with no gaps and no overlaps, so every x is in exactly one. To find f(x):

  1. Check the conditions and find the one that is true for this x.
  2. Put x into that rule only. The other rules do not matter for this x.

For 2|x − 1| − 3 written as rules, −2x − 1 if x < 1 and 2x − 5 if x ≥ 1: f(−1) uses the first rule, −2·(−1) − 1 = 1, and f(3) uses the second, 2·3 − 5 = 1. Real prices often work like this: a parking fee, a tax bracket or a shipping charge that changes at a weight limit.

Open and closed dots, jumps and joins

At a boundary the condition says which rule owns the boundary point. A ≤ or ≥ includes it: the graph gets a closed dot (•). A < or > leaves it out: an open dot (○). If the two rules give different values at the boundary, the graph jumps; if they give the same value, the pieces join and there is no gap, often with a corner. (Demo 7: jumps)

A piecewise graph: x + 1 for x less than −1 ends in an open dot at (−1, 0); the flat rule 2 for −1 ≤ x ≤ 2 starts with a closed dot at (−1, 2) and ends with a closed dot at (2, 2); the rule −x + 5 for x greater than 2 starts with an open dot at (2, 3)
At a jump the closed dot is the value; the open dot is a point the graph comes close to but does not reach.
at the boundary x = bthe graph
both rules give the same yjoins, no gap (|x| at 0, the ramp at 0 and 3)
the rules give different yjumps: one closed dot, one open dot
x = b in both conditions, different ynot a function: one x would have two y

Solving |x − h| = d

|x − h| is the distance from x to h, so |x − h| = d asks for the points at distance d from h. For d > 0 there are two: x = h − d and x = h + d. For d = 0 there is one, x = h, and for d < 0 there are none, since a distance is never negative. On the graph these are where the V crosses the line y = d: |x − 2| = 3 gives x = −1 and x = 5. In the same way |x − h| < d is the interval h − d < x < h + d.

The lines that get folded are on Linear Functions and the parabolas on Quadratics. |f(x)| is the composition of f with |·|: see Function Composition.

What the page leaves out

Absolute value inequalities in detail, |f(x)| for functions other than lines and parabolas, f(|x|) (which mirrors the right half onto the left instead), the step functions floor and ceiling, limits and continuity at a boundary, and the absolute value of complex numbers.

On the mind map

Open the Algebra & Functions mind mapAlgebra &FunctionsPolynomials and graphs: shift, stretch, factor, solvePolynomials and graphsRational functions: a ratio of polynomialsRational functionsExponentials and logs: equal steps multiplyExponentials and logsWaves and envelopes: a sine inside a bandWaves and envelopesOscillators: period set by the systemOscillatorsCollisions: momentum is always keptCollisionsMotion under forces: split forces into componentsMotion under forcesEquations and inequalities: solve for the unknownsEquations and inequalitiesFunction transformationsFunction transformationsinside changes x (reversed), outside yQuadratic equationsQuadratic equationscomplete the square; b² − 4ac counts rootsQuadratic coefficientsQuadratic coefficientsc: y-intercept, a: width, b: slope at x = 0Cubic coefficientsCubic coefficientsa sets the ends, inflection at x = −b/3aPolynomial divisionPolynomial divisionremainder of p(x) ÷ (x − c) is p(c)Composition and inversesComposition and inversesf⁻¹ is f mirrored in y = xLinear functions and slopeLinear functions and slopem = rise/run, b = where it crosses yAbsolute value, piecewise|x| folds the negative half upOpen the Algebra & Functions mind mapAlgebra & Functionsshift, stretch, factor, solvePolynomials and graphsFunction transformationsFunction transformationsinside changes x (reversed), outside yQuadratic equationsQuadratic equationscomplete the square; b² − 4ac counts rootsQuadratic coefficientsQuadratic coefficientsc: y-intercept, a: width, b: slope at x = 0Cubic coefficientsCubic coefficientsa sets the ends, inflection at x = −b/3aPolynomial divisionPolynomial divisionremainder of p(x) ÷ (x − c) is p(c)Composition and inversesComposition and inversesf⁻¹ is f mirrored in y = xLinear functions and slopeLinear functions and slopem = rise/run, b = where it crosses yAbsolute value, piecewise|x| folds the negative half up
This page on the Algebra & Functions mind map · 30 pages in 8 branches · open it to see the whole map and test yourself in recall mode.