This site is a work in progress. New lessons are added regularly. Contact us

Absolute Value Equations and Graphs

Learning goals

  • Read x\lvert x \rvert as distance, never negative
  • Graph the V, meeting at the vertex
  • Locate the vertex (h,k)(h, k) in y=axh+ky = a\lvert x - h \rvert + k
  • Split X=c\lvert X \rvert = c into two cases when c>0c > 0
  • Turn X<c\lvert X \rvert < c into a band and >c> c into two rays

What absolute value measures

On the number line, x\lvert x \rvert is the distance from xx to 00, counted as a positive length no matter which side of zero the number sits on. Since 55 is five units to the right of zero, 5=5\lvert 5 \rvert = 5. Since 5-5 is five units to the left, 5=5\lvert -5 \rvert = 5 as well. And 00 is no distance from itself, so 0=0\lvert 0 \rvert = 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. That gives the piecewise definition

x={xif x0,xif x<0.\lvert x \rvert = \begin{cases} x & \text{if } x \ge 0, \\ -x & \text{if } x < 0. \end{cases}

The second line trips people up, because x-x looks negative. It is not. When xx is negative, x-x is the opposite of a negative number, which is positive. For example, with x=5x = -5 the rule gives 5=(5)=5\lvert -5 \rvert = -(-5) = 5, exactly the distance you expect.

Why the absolute value is never negative#

The claim is that x0\lvert x \rvert \ge 0 for every real number xx, with no exceptions. The definition splits the numbers into two cases, so check each one.

When x0x \ge 0, the rule sets x=x\lvert x \rvert = x, and xx is itself zero or positive, so x0\lvert x \rvert \ge 0 at once.

When x<0x < 0, the rule sets x=x\lvert x \rvert = -x. Here xx is negative, and negating a negative number produces a positive one: if x<0x < 0 then x>0-x > 0. So in this case x>0\lvert x \rvert > 0. Putting the two branches together,

x0for every real x.\lvert x \rvert \ge 0 \quad \text{for every real } x.

Every input lands on an output that is zero or greater, and the two branches cover all real numbers, so the absolute value is never negative. Equality holds in exactly one place, at x=0x = 0, which matches the picture perfectly, since the only number at distance zero from zero is zero itself. This single fact, that an absolute value cannot be negative, is the hinge for the graph and for solving equations later.

The graph of the absolute value function

Packaging the rule as a function gives the absolute value function

f(x)=x.f(x) = \lvert x \rvert.

To see its shape, make a short table, choosing inputs on both sides of zero:

xx3-31-1002244
y=xy = \lvert x \rvert3311002244

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=xy = x. To the left of zero every output is the input negated, so those points lie on the line y=xy = -x. The graph is therefore two straight rays, the right half of y=xy = x and the left half of y=xy = -x, joined where they meet at the origin. Two lines with slopes +1+1 and 1-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)(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 y0y \ge 0.

The graph of y equals the absolute value of xA V with vertex at the origin, its right branch on the line y equals x and its left branch on the line y equals negative x, opening upward so every output is zero or greater.xy-4-3-2-112341234(0, 0)y = xy = -xy = |x|
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, built with the same moves you used on other graphs. The general form is

y=axh+k.y = a\lvert x - h \rvert + k.

Read the three constants one at a time:

Putting the shifts together, the vertex moves from (0,0)(0, 0) to (h,k)(h, k). You can see why without drawing anything: the bars xh\lvert x - h \rvert are smallest, equal to zero, exactly when x=hx = h, and there the output is y=a0+k=ky = a \cdot 0 + k = k. So the corner sits at (h,k)(h, k). The domain stays all real numbers. The range is yky \ge k when a>0a > 0 (the V opens up from its lowest point) or yky \le k when a<0a < 0 (it opens down from its highest point).

Shifting y equals the absolute value of x to y equals the absolute value of x minus 2, plus 1The base V, dashed, with vertex at the origin, and the shifted V, solid, with vertex at 2 comma 1, the same shape moved right 2 and up 1.xy-3-2-112345612345(0, 0)(2, 1)y = |x|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.

Worked example 1 Graph y=x2+1y = \lvert x - 2 \rvert + 1 and state its domain and range

Match y=x2+1y = \lvert x - 2 \rvert + 1 to the form y=axh+ky = a\lvert x - h \rvert + k. Here a=1a = 1, h=2h = 2, and k=1k = 1, so nothing is stretched or flipped, and the V is only shifted.

The inside x2x - 2 moves the graph right by 22 and the +1+1 moves it up by 11, so the vertex travels from (0,0)(0, 0) to

(h,k)=(2,1).(h, k) = (2, 1).

From the vertex the branches keep the ordinary slopes +1+1 and 1-1. To pin down one more point, step right by 33: at x=5x = 5, the height is 52+1=3+1=4\lvert 5 - 2 \rvert + 1 = 3 + 1 = 4, giving the point (5,4)(5, 4). The domain is all real numbers, and since a=1>0a = 1 > 0 the graph opens upward from its lowest point, so the range is y1y \ge 1.

Worked example 2 Describe the graph of y=2xy = -2\lvert x \rvert

Read y=2xy = -2\lvert x \rvert as y=axy = a\lvert x \rvert with a=2a = -2, one coefficient doing two jobs at once.

Its size, a=2\lvert a \rvert = 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=xy = \lvert x \rvert through the rule makes both effects concrete:

(1,1)(1,2),(1,1)(1,2).(1, 1) \longrightarrow (1, -2), \qquad (-1, 1) \longrightarrow (-1, -2).

The vertex (0,0)(0, 0) stays fixed, since 2×0=0-2 \times 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 y0y \le 0: the V hangs below the x-axis instead of rising above it.

Check your understanding

The graph of y=x+35y = \lvert x + 3 \rvert - 5 is the graph of y=xy = \lvert x \rvert shifted how, and where is its vertex?

Answer choices

Here is the same V with the three constants on controls. Start by rebuilding the checkpoint: step the inside shift down to 3-3 and the outside shift down to 5-5. The vertex arrives at (3,5)(-3, -5) while the expression above it reads x+3x + 3, which is the sign disagreement worth meeting once with your own hands.

Then leave the inside shift alone and walk the outside shift slowly upward with the coefficient at 11, watching only the x-axis. Low down, the V cuts the axis at two separate points. Raise it and the two crossings slide toward each other; at k=0k = 0 they arrive together at the vertex. Above that the V clears the axis entirely and never meets it again. That is the next section’s three cases, and you have just seen why there are exactly three. Turning the coefficient negative flips the whole story upside down without changing the count. Setting the coefficient to 00 leaves no V at all, only the flat line the readout names, which is why the form requires a nonzero aa.

How often does y=axh+ky = a\lvert x - h\rvert + k meet the x-axis?

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 coordinate plane with the graph of |x| drawn on it, with its corner marked. Use the controls below the figure to stretch it, or to shift it across or up and down. -4 -2 2 4 -6 -4 -2 2 4
Stretch a Inside h Outside k

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. Raising the vertex through the horizontal axis takes the graph from two crossings to one to none.

Solving absolute value equations

An absolute value equation has the variable inside the bars, as in 2x3=7\lvert 2x - 3 \rvert = 7. To solve one, read the bars as distance again. The equation X=c\lvert X \rvert = c says the quantity XX sits exactly cc units from zero. How many numbers are that far from zero depends entirely on the sign of cc. So the first thing to check is whether the right side is positive, zero, or negative.

Why X=c\lvert X \rvert = c splits into cases#

Everything follows from the meaning of distance, together with the fact that an absolute value is never negative.

Suppose c>0c > 0. Two points on the number line sit exactly cc units from zero, one on each side: cc itself and its opposite c-c. No other point is that far away, so the equation holds precisely when

X=corX=c.X = c \quad \text{or} \quad X = -c.

That is the two-case rule, and it is why a positive right side always yields a pair of equations to solve.

Suppose c=0c = 0. The only number at distance zero from zero is zero itself, so X=0\lvert X \rvert = 0 forces X=0X = 0, a single solution.

Suppose c<0c < 0. No point is a negative distance from anything, and you proved above that X0\lvert X \rvert \ge 0 for every XX. A nonnegative quantity cannot equal a negative number, so X=c\lvert X \rvert = 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 3 Solve 2x3=7\lvert 2x - 3 \rvert = 7

The right side 77 is positive, so the two-case rule applies. Set the inside equal to 77 and to 7-7:

2x3=7or2x3=7.2x - 3 = 7 \quad \text{or} \quad 2x - 3 = -7.

Solve each as an ordinary linear equation. The first gives 2x=102x = 10, so x=5x = 5. The second gives 2x=42x = -4, so x=2x = -2.

x=5orx=2.x = 5 \quad \text{or} \quad x = -2.

Both check: 2(5)3=7=7\lvert 2(5) - 3 \rvert = \lvert 7 \rvert = 7 and 2(2)3=7=7\lvert 2(-2) - 3 \rvert = \lvert -7 \rvert = 7.

Worked example 4 Solve 2x+13=52\lvert x + 1 \rvert - 3 = 5

The bars are not alone yet, so isolate them before splitting into cases. Add 33 to both sides, then divide by 22:

2x+1=8x+1=4.2\lvert x + 1 \rvert = 8 \quad \Longrightarrow \quad \lvert x + 1 \rvert = 4.

Now the right side is the positive number 44, so use the two-case rule on the inside:

x+1=4orx+1=4,x + 1 = 4 \quad \text{or} \quad x + 1 = -4,

giving x=3x = 3 or x=5x = -5. Splitting before isolating is the classic error: had you written x+1=5x + 1 = 5 and x+1=5x + 1 = -5 straight from the original equation, you would have solved the wrong equation. You would have gone wrong because the 22 and the 3-3 were still attached to the bars.

Worked example 5 Solve 3x6=0\lvert 3x - 6 \rvert = 0 and x+4=2\lvert x + 4 \rvert = -2

These two short equations show the other two cases. First, solve 3x6=0\lvert 3x - 6 \rvert = 0. Only zero has absolute value zero, so the inside must be zero:

3x6=0x=2,3x - 6 = 0 \quad \Longrightarrow \quad x = 2,

a single solution. Next, solve x+4=2\lvert x + 4 \rvert = -2. The right side is negative, and an absolute value is never negative, so no number can satisfy it:

x+40>2no solution.\lvert x + 4 \rvert \ge 0 > -2 \quad \Longrightarrow \quad \text{no solution}.

Reaching for the two-case rule here would have manufactured the false answers x=6x = -6 and x=2x = -2. Checking the sign of the right side first is what saves you from reporting them.

Check your understanding

Solve 2x1=9\lvert 2x - 1 \rvert = 9.

Answer choices

Absolute value inequalities

The distance picture pays off one more time, now for inequalities. Reading X\lvert X \rvert as the distance from XX to zero turns each inequality into a statement about how near or far XX is. The two directions behave very differently.

Take X<c\lvert X \rvert < c with c>0c > 0. It says XX is less than cc units from zero, so XX is trapped in the band between c-c and cc:

X<cc<X<c.\lvert X \rvert < c \quad \Longleftrightarrow \quad -c < X < c.

Now take X>c\lvert X \rvert > c with c>0c > 0. It says XX is more than cc units from zero, so XX lies beyond cc on the right or beyond c-c on the left, with nothing in between:

X>cX<c  or  X>c.\lvert X \rvert > c \quad \Longleftrightarrow \quad X < -c \ \text{ 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 \le and \ge work the same way, now including the endpoints.

Worked example 6 Solve 2x1<5\lvert 2x - 1 \rvert < 5 and x+34\lvert x + 3 \rvert \ge 4

Start with 2x1<5\lvert 2x - 1 \rvert < 5. Because the inequality is “less than,” the inside is trapped between 5-5 and 55:

5<2x1<5.-5 < 2x - 1 < 5.

Add 11 to all three parts, then divide by 22:

4<2x<62<x<3.-4 < 2x < 6 \quad \Longrightarrow \quad -2 < x < 3.

The solution is the single interval 2<x<3-2 < x < 3.

Now solve x+34\lvert x + 3 \rvert \ge 4. Because the inequality is “greater than or equal to,” the inside lies beyond 44 or beyond 4-4:

x+34orx+34.x + 3 \ge 4 \quad \text{or} \quad x + 3 \le -4.

Solving each gives x1x \ge 1 or x7x \le -7. The solution is two rays, everything at least 11 together with everything at most 7-7.

Check your understanding

Solve x13\lvert x - 1 \rvert \le 3.

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

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-1 to +1+1. That point is the vertex (h,k)(h, k), and the whole lesson is built around it.