On the number line, ∣x∣ is the distance from x to 0, counted as a positive length no
matter which side of zero the number sits on. Since 5 is five units to the right of zero,
∣5∣=5. Since −5 is five units to the left, ∣−5∣=5 as well. And 0 is
no distance from itself, so ∣0∣=0.
Distance is a geometric idea, but you need an algebraic rule to compute with. For a number that is
already zero or positive, its distance from zero is just the number itself. For a negative number, its
distance is the number with the sign stripped off, which you get by negating it. Two different rules for
two different kinds of input, packaged as one function: that is a piecewise definition, a pattern the
last lesson of this chapter names and studies on its own, and here it is
∣x∣={x−xif x≥0,if x<0.
The second line trips people up, because −x looks negative. It is not. When x is negative, −x is
the opposite of a negative number, which is positive. For example, with x=−5 the rule gives
∣−5∣=−(−5)=5, exactly the distance you expect.
Both branches of the rule always output zero or a positive number, so
∣x∣≥0for every real x,
with equality only at x=0. This fact matters twice: it is why the graph never dips below the
x-axis, and why some of the equations later in this lesson turn out to have no solution at all.
The graph of the absolute value function
Packaging the rule as a function gives the absolute value function
f(x)=∣x∣.
To see its shape, make a short table, choosing inputs on both sides of zero:
x
−3
−1
0
2
4
y=∣x∣
3
1
0
2
4
Plot these and a pattern jumps out. To the right of zero every output equals the input, so those points
lie on the line y=x. To the left of zero every output is the input negated, so those points lie on
the line y=−x. The graph is therefore two straight rays, the right half of y=x and the left half
of y=−x, joined where they meet at the origin. Two lines with slopes +1 and −1 meeting at a point
make a sharp corner, and that is the V shape the absolute value function is known for.
The corner, called the vertex, sits at (0,0). The vertex is the lowest point of the graph because
every other output is a positive distance and so lies above it. The function accepts every real number,
since every number has a distance from zero, so the domain is all real numbers. The outputs are
exactly the nonnegative numbers. Each positive height is reached by two inputs, one on each branch, and
the single lowest point is reached only at the vertex, so the range is y≥0.
The graph of y equal to the absolute value of x is a V. To the right of zero the rule is simply y equals x, a line of slope 1, and to the left it is y equals negative x, a line of slope negative 1. The two lines meet at the vertex (0, 0), the lowest point, so the domain is every real number and the range is y greater than or equal to 0.
Reading transformations off the equation
Every absolute value graph in this course is a shifted, stretched copy of the basic V. Look at one
concrete shift before naming the general pattern. Replace x by x−2 and add 1 outside the bars,
turning y=∣x∣ into y=∣x−2∣+1:
Shifting the vertex. The dashed V is y equal to the absolute value of x, with vertex (0, 0). Replacing x by x minus 2 and adding 1 outside the bars gives y equal to the absolute value of (x minus 2), plus 1, which slides the whole V right 2 and up 1, so the solid vertex sits at (2, 1). The branch slopes and the shape do not change, only the position of the vertex.
The dashed V is the original, with vertex (0,0). The solid V is the same shape, just relocated: the
bars ∣x−2∣ are smallest, equal to zero, exactly when x=2, and there the +1 makes the
output 1. So the new vertex sits at (2,1), two units right and one unit up from where it started.
The branches keep their shape; only the corner moved.
That pattern generalizes to any shift and any stretch. The general form is
y=a∣x−h∣+k,a=0.
The coefficient a must be nonzero: at a=0 the bars vanish from the output entirely and the V
flattens into the horizontal line y=k, which is not a V at all. Read the three constants one at a
time:
The x−h inside the bars shifts the graph right by h, carrying the vertex sideways, exactly as
the x−2 above carried it right by 2.
The +k outside shifts the graph up by k, carrying the vertex vertically, exactly as the +1 above
carried it up by 1.
The a in front scales the branches. Its size ∣a∣ makes the V narrower when
∣a∣>1 and wider when ∣a∣<1, since the branch slopes become +a and
−a. When a is negative it also flips the graph across the horizontal line through the vertex, so
the V opens downward instead of upward.
Putting the shifts together, the vertex moves from (0,0) to (h,k), exactly as it just moved to
(2,1) above. The domain stays all real numbers. The range is y≥k when a>0 (the V opens up
from its lowest point) or y≤k when a<0 (it opens down from its highest point).
Worked example 1Graph y=∣x−2∣+1 and state its domain and range
Match y=∣x−2∣+1 to the form y=a∣x−h∣+k. Here a=1, h=2, and
k=1, so nothing is stretched or flipped, and the V is only shifted.
The inside x−2 moves the graph right by 2 and the +1 moves it up by 1, so the vertex travels
from (0,0) to
(h,k)=(2,1).
From the vertex the branches keep the ordinary slopes +1 and −1. To pin down one more point, step
right by 3: at x=5, the height is ∣5−2∣+1=3+1=4, giving the point
(5,4). The domain is all real numbers, and since a=1>0 the graph opens upward from its lowest
point, so the range is y≥1.
Worked example 2Describe the graph of y=−2∣x∣
Read y=−2∣x∣ as y=a∣x∣ with a=−2, one coefficient doing two jobs at
once.
Its size, ∣a∣=2, is a vertical stretch, so each branch is twice as steep as the basic V.
Its sign, negative, reflects the graph across the x-axis, turning the V upside down so it opens
downward. Tracking the anchor points of y=∣x∣ through the rule makes both effects
concrete:
(1,1)⟶(1,−2),(−1,1)⟶(−1,−2).
The vertex (0,0) stays fixed, since −2×0=0. The domain is unchanged at all real numbers,
because the input is untouched. But the outputs are now zero or negative, so the range flips to
y≤0: the V hangs below the x-axis instead of rising above it.
Check your understanding
The graph of y=∣x+3∣−5 is the graph of y=∣x∣ shifted how, and where is its vertex?
Match y=∣x+3∣−5 to y=a∣x−h∣+k. Writing x+3 as x−(−3) gives h=−3, and the constant is k=−5.
(h,k)=(−3,−5)
A negative h shifts the graph left by 3 and a negative k shifts it down by 5, so the vertex lands at (−3,−5).
Here is the same V with the three constants on controls.
First, rebuild the checkpoint: step the inside shift to −3 and the outside shift to −5. Watch the
vertex land at (−3,−5) while the expression above it reads x+3: that sign flip, between the shift
you set and the expression you see, is easy to miss until you try it yourself.
Then, reset the inside shift to 0 and the coefficient to 1, and set the outside shift to −4.
Watching the x-axis, the V crosses it at two points, x=−4 and x=4. Raise the outside shift one
step at a time: the two crossings slide together, meeting at the vertex exactly when k=0. Raise it
further and the V clears the axis, meeting it nowhere. Two crossings, one crossing, or none: that is the
whole pattern, and it is why the next section has exactly three cases.
Finally, set the outside shift back to −2 and switch the coefficient to −1. With k=−2 the
vertex sits below the axis, but the V now opens downward, so its highest point is below the axis too and
it never touches the axis at all. Raise the outside shift to k=2: the downward-opening V’s peak rises
above the axis, and now it crosses the axis at two points instead. The same three outcomes, two
crossings, one, or none, still occur; only which side of the axis produces each one has swapped.
How often does y=a∣x−h∣+k meet the x-axis?
Stretch a1Inside h0Outside k-3
y = |x| - 3.Its corner sits at (0, -3), shifted 3 down.Its two arms point upward, rising one unit for every unit across.
A V-shaped graph on a coordinate plane, with its vertex placed by the inside and outside shifts and its branches set by the coefficient. For a positive coefficient, raising the vertex through the horizontal axis takes the graph from two crossings to one to none; a negative coefficient flips the V and reverses that order.
Solving absolute value equations
An absolute value equation has the variable inside the bars, as in ∣2x−3∣=7. To
solve one, read the bars as distance again. The equation ∣X∣=c says the quantity X
sits exactly c units from zero. How many numbers are that far from zero depends entirely on the sign of
c. So the first thing to check is whether the right side is positive, zero, or negative.
Everything follows from the meaning of distance, together with the fact that an absolute value is never
negative.
Suppose c>0. Take c=7 as a concrete case first: the only numbers seven units from zero are 7
and −7, one on each side.
The only two numbers seven units from zero: -7 and 7.
The same reasoning holds for any positive c: exactly two numbers sit that far from zero, c itself
and its opposite −c, so
X=corX=−c.
Suppose c=0. The only number at distance zero from zero is zero itself, so ∣X∣=0
forces X=0, a single solution.
Suppose c<0. Since ∣X∣≥0 for every X, a nonnegative quantity can never equal a
negative number, so ∣X∣=c has no solution at all. This is why you check the sign of the
right side before splitting into cases: a negative right side means stop, there is nothing to find.
∎
Worked example 3Solve ∣2x−3∣=7
The right side 7 is positive, so the two-case rule applies. Set the inside equal to 7 and to −7:
2x−3=7or2x−3=−7.
Solve each as an ordinary linear equation. The first gives 2x=10, so x=5. The second gives
2x=−4, so x=−2.
x=5orx=−2.
Both check: ∣2(5)−3∣=∣7∣=7 and
∣2(−2)−3∣=∣−7∣=7.
Worked example 4Solve 2∣x+1∣−3=5
The bars are not alone yet, so isolate them before splitting into cases. Add 3 to both sides, then
divide by 2:
2∣x+1∣=8⟹∣x+1∣=4.
Now the right side is the positive number 4, so use the two-case rule on the inside:
x+1=4orx+1=−4,
giving x=3 or x=−5. Splitting before isolating is the classic error: had you written
x+1=5 and x+1=−5 straight from the original equation, you would have solved the wrong
equation. You would have gone wrong because the 2 and the −3 were still attached to the bars.
Worked example 5Solve ∣3x−6∣=0 and ∣x+4∣=−2
These two short equations show the other two cases. First, solve ∣3x−6∣=0. Only zero
has absolute value zero, so the inside must be zero:
3x−6=0⟹x=2,
a single solution. Next, solve ∣x+4∣=−2. The right side is negative, and an absolute
value is never negative, so no number can satisfy it:
∣x+4∣≥0>−2⟹no solution.
Reaching for the two-case rule here would have manufactured the false answers x=−6 and x=−2.
Checking the sign of the right side first is what saves you from reporting them.
Check your understanding
Solve ∣2x−1∣=9.
The right side 9 is positive, so use the two-case rule on the inside.
2x−1=9or2x−1=−9
The first gives 2x=10, so x=5; the second gives 2x=−8, so x=−4. Both check, so x=5 or x=−4.
Absolute value inequalities
The distance picture pays off one more time, now for inequalities. Reading ∣X∣ as the
distance from X to zero turns each inequality into a statement about how near or far X is. The
two directions behave very differently.
Take ∣X∣<c with c>0. It says X is less than c units from zero, so X is
trapped in the band between −c and c. With c=5, that band looks like this:
The numbers less than 5 units from zero: everything strictly between -5 and 5, not including -5 or 5 themselves.
In general,
∣X∣<c⟺−c<X<c.
Now take ∣X∣>c with c>0. It says X is more than c units from zero, so X
lies beyond c on the right or beyond −c on the left, with nothing in between. With c=5 again, the
picture looks completely different from the band above:
The numbers more than 5 units from zero: two separate pieces, everything less than -5 and everything greater than 5, with nothing between them.
In general,
∣X∣>c⟺X<−c or X>c.
The reminders some people memorize, “less than gives one band” and “greater than gives two rays,” are
just these two distance pictures in words. The non-strict versions with ≤ and ≥ work the same
way, now including the endpoints.
Worked example 6Solve ∣2x−1∣<5 and ∣x+3∣≥4
Start with ∣2x−1∣<5. Because the inequality is “less than,” the inside is trapped
between −5 and 5:
−5<2x−1<5.
Add 1 to all three parts, then divide by 2:
−4<2x<6⟹−2<x<3.
The solution is the single interval −2<x<3.
Now solve ∣x+3∣≥4. Because the inequality is “greater than or equal to,” the inside
lies beyond 4 or beyond −4:
x+3≥4orx+3≤−4.
Solving each gives x≥1 or x≤−7. The solution is two rays, everything at least 1 together
with everything at most −7.
Check your understanding
Solve ∣x−1∣≤3.
A 'less than or equal to' absolute value traps the inside in a band between −3 and 3.
−3≤x−1≤3
Adding 1 to every part gives −2≤x≤4.
Common mistakes
Practice
Multiple Choice Questions (MCQ)
Progressively harder sets of questions. Each opens on its own page.
Practice problems at the level of the course, to be worked out on paper. Hints one at a
time, then the answer or the full worked solution, with your progress kept in this browser.
Pick any point on a smooth curve. The curve has a direction there, the way a road has a heading. A
corner is the exception, a place where the direction changes without warning. The V in this lesson has
exactly one, at its vertex.
For most of the nineteenth century, corners were treated as rare accidents. Any curve you could draw
without lifting the pencil was expected to be smooth almost everywhere. Nobody had proved that. It
simply looked obvious.
Then, in Berlin in 1872, the German mathematician Karl Weierstrass showed a curve with no direction
anywhere. You can trace the whole of it without lifting the pencil. Yet not one point on it has a
heading, and it is worse than a corner, which at least has a slope on each side. Magnify any stretch
and the roughness never settles down. Zoom in as far as you like and there is only more roughness.
Later mathematicians called such curves monsters, and some of them refused to look.
Weierstrass is also the man who first fenced a number between two vertical bars, in 1841, giving
absolute value the notation you have used all lesson. Both moves came from one instinct. He distrusted
what a picture seemed to promise, and asked what the words underneath really said.
The V is the gentlest version of his monster. It is unbroken, and it has a direction everywhere except
at a single point, where the slope jumps from −1 to +1. That point is the vertex (h,k), and the
whole lesson is built around it.