Start with the right-hand half
Take the curve and draw only the part where x is 0 or more. At x = 0, 1, 2, 3 and 4 the values of y are 0, −3, −4, −3 and 0. The curve starts at the origin, dips to its lowest point at (2, −4), and comes back up to the x-axis at x = 4. After that it keeps climbing: at x = 5, y = 25 − 20 = 5.
for : from the origin down to (2, −4), back to the axis at x = 4, and up again.
Put |x| in place of x
Now replace x by |x| in the equation. The term needs no bars, because for every x, so the new equation is . The bars act on x before anything else is worked out.
For , |x| = x, so nothing changes on the right: gives exactly the same values as .
For a negative x the bars make a difference. At x = −3, |−3| = 3, so y = 9 − 4 × 3 = 9 − 12 = −3, which is exactly the value at x = 3. Every negative x is turned into its positive partner before the rest of the calculation, so it gives the same y. Without the bars, at x = −3 would be 9 + 12 = 21.
For the two columns agree. For x < 0 the second column repeats the values at 1, 2 and 3.
Mirror the right half
So the graph of keeps the right-hand half of and throws the left-hand half away. In its place goes the mirror image of the right-hand half, reflected in the y-axis.
The result is symmetric in the y-axis, shaped like a W: it has two lowest points, at (−2, −4) and (2, −4), and it crosses the x-axis at x = −4, 0 and 4. Any graph made by replacing x with |x| is symmetric in the y-axis, because x and −x have the same modulus and so give the same y.
The gold graph is . The white curve is the left-hand half of , which climbs away. The bars throw it away and put the mirror image of the right-hand half in its place.
Two kinds of bars, two pictures
Bars around the whole expression and bars around x alone do different things. reflects the part of the curve below the x-axis up above it, in the x-axis. keeps the right-hand half and mirrors it in the y-axis.
Compare the values. At x = 2, , but . At x = −1, , but .
The gold graph is , made by mirroring in the y-axis. The white graph is , made by reflecting in the x-axis. Both start from , and for they are the same curve.
Where the bars sit
The two operations can both start from the straight line y = x − 2.
Replace x with |x| and you get y = |x| − 2. The right-hand half of the line is kept and mirrored in the y-axis, so the graph is a V with its corner on the y-axis, at (0, −2). At x = 0, |x| is 0, its smallest value, so y is −2.
Put the bars around the whole expression and you get y = |x − 2|. The part of the line below the x-axis is reflected up, so the graph is a V with its corner on the x-axis, at (2, 0), where x − 2 = 0.
For the line is to the right of the y-axis and on or above the x-axis, so neither operation changes it there, and the two graphs share the same ray. Everywhere to the left of 2 they are different.
The gold V is y = |x| − 2, with its corner at (0, −2). The white V is y = |x − 2|, with its corner at (2, 0). From x = 2 onward the two are the same ray, drawn once.
The usual mistakes
Putting the negative number in without the bars. For at x = −3, is wrong. The bars make |−3| = 3 first, so y = 9 − 12 = −3.
Changing the sign of the whole answer. Only the x inside the bars loses its sign. At x = −3, y is −3, the same as at x = 3, and not 3.
Putting the corner of y = |x| − 2 at (2, 0). That is the corner of y = |x − 2|. In y = |x| − 2 the bars hold x alone, so the corner stays at x = 0, and subtracting 2 moves it down to (0, −2), not up to (0, 2).
Worked example: A Pavilion Roof Drawn from Its Right-Hand Slope, and a Collar Beam Across It
Question The cross-section of a pavilion roof is drawn with the x-axis along the level of the eaves and the y-axis through the ridge, with x and y in meters. The architect gives the right-hand slope of the roof as y = (x − 8)216 for 0 ≤ x ≤ 8, and the left-hand slope is its mirror image in the y-axis. (a) Write one equation for the whole roof line, and find the height of the roof above the eaves at x = −4. (b) A horizontal collar beam joins the two slopes at a height of 2.25 m above the eaves. How long is the beam?
1.The height at x = −4 must equal the height at x = 4, and replacing x by |x| does exactly this, since |−4| = |4| = 4. The whole roof line is y = (|x| − 8)216 for −8 ≤ x ≤ 8.
The formula draws the right-hand slope. The left-hand slope is its mirror image, and replacing x by |x| gives both at once: y = (|x| − 8)216 for −8 ≤ x ≤ 8. 2.At the ridge x = 0, so y = (0 − 8)216 = 6416 = 4: the ridge is 4 m above the eaves. At each eave |x| = 8, so y = 0.
At the ridge x = 0 and y = 6416 = 4, so the ridge is 4 m above the eaves. At each eave |x| = 8 and y = 0. 3.At x = −4, |x| = 4, so y = (4 − 8)216 = 1616 = 1. (a) The roof line is y = (|x| − 8)216 for −8 ≤ x ≤ 8, and the roof is 1 m above the eaves at x = −4.
(a) At x = −4, |x| = 4 and y = (4 − 8)216 = 1: the roof is 1 m above the eaves, just as it is at x = 4. 4.The beam meets the right-hand slope where (x − 8)216 = 2.25. Multiply both sides by 16: (x − 8)2 = 36, so x − 8 = 6 or x − 8 = −6, which gives x = 14 or x = 2.
The beam at y = 2.25 meets the right-hand slope where (x − 8)2 = 36, so x = 14 or x = 2. 5.The right-hand slope runs only from x = 0 to x = 8, so x = 14 is rejected: it lies beyond the eaves, where there is no roof. The beam meets the right-hand slope at x = 2, and its mirror image puts the other end on the left-hand slope at x = −2.
The slope ends at the eaves, x = 8, so x = 14 is rejected. The mirror image of the end at x = 2 is the end at x = −2. 6.(b) The beam runs from x = −2 to x = 2, so it is 2 − (−2) = 4 m long. Check: at x = −2, y = (2 − 8)216 = 3616 = 2.25.
(b) The beam runs from x = −2 to x = 2, so it is 4 m long.
Answer: (a) y = (|x| − 8)216 for −8 ≤ x ≤ 8, and 1 m; (b) 4 m
Common mistakes
- Putting x = −4 straight into y = (x − 8)216, which gives 14416 = 9 m. That formula describes only the right-hand slope, and carried on to the left it keeps rising, far above the 4 m ridge. The left-hand slope uses the distance from the ridge, |x| = 4, which gives 1 m.
- Giving the length of the beam as 2 m, from the one end found on the right-hand slope. The beam reaches from one slope to the other, and the mirror image puts its other end at x = −2, so it is 4 m long.