MathsAlgebra

Absolute Value Equation
solver.

Absolute value equations split into two cases, and each answer gets checked.

How it's worked out

The bars measure distance from 0 on the number line. A distance of c can run in two directions, so |u|=c|u| = c says the same thing as u=cu = c or u=−cu = -c. With a line inside the bars, you get two plain equations and solve each one.

|ax+b|\displaystyle |ax + b|=c\displaystyle {}= c
ax+b\displaystyle ax + b=c\displaystyle {}= cor\displaystyle \text{or}ax+b\displaystyle ax + b=−c\displaystyle {}= -c

Here a is the number in front of x, b is the number added inside the bars, and c is the right side. Solving each case gives the two answers below. OpenStax states the rule by the sign of c: no solution when c is negative, one when c is 0, and two when c is positive.

x\displaystyle x=c−ba\displaystyle {}= \frac{c - b}{a}
x\displaystyle x=−c−ba\displaystyle {}= \frac{-c - b}{a}

With bars on both sides, two absolute values match when the insides are equal or when they are opposite. A case can lose its x altogether. Then it is either true for every x or never true, and the steps say which.

|ax+b|\displaystyle |ax + b|=|cx+d|\displaystyle {}= |cx + d|
ax+b\displaystyle ax + b=cx+d\displaystyle {}= cx + d
ax+b\displaystyle ax + b=−(cx+d)\displaystyle {}= -(cx + d)
How many answers to expect
EquationSolutionWhy
|x − 4| = 3x = 1, x = 7c above 0: two points 3 from 4
|x − 4| = 0x = 4c is 0: the inside must be 0
|x − 4| = −3No solutionc below 0: nothing can equal it
|−3| = 3All real numbersa is 0 and |b| = c: always true
|x + 2| = |x − 6|x = 2Same slope: only one case gives an x
|2x + 1| = |−2x − 1|All real numbersOpposite insides: always true

Worked examples

Marta checks a homework answer

Marta has |2x−3|=7|2x - 3| = 7 on a worksheet. She wrote x = 5 and stopped. The right side is above 0, so a second answer must exist. Setting the inside to 7 gives 5, and setting it to −7 gives −2.

Putting them back gives |−7|=7|-7| = 7 for the first and |7|=7|7| = 7 for the second, so both hold. The tip of the V sits at 1.5, and each answer is 3.5 away from it. That even spacing is a quick test for any answer pair of this kind.

Open this example in the tool

Dev turns a shaft tolerance into two limits

A drawing calls for a shaft of 50 mm with a tolerance of 0.1 mm either way. A size x is on the limit when its distance from 50 is exactly 0.1, which is |x−50|=0.1|x - 50| = 0.1. The two answers are 49.9 mm and 50.1 mm, the smallest and largest sizes Dev can accept.

Sizes between the limits pass, and that is an inequality rather than an equation. The inequality solver gives the whole range.

Open this example in the tool

Priya looks for the point halfway between two mile markers

Two rest stops sit at marker 2 and marker −4 on a straight road. Priya wants the spot equally far from both, so she writes |x−2|=|x+4||x - 2| = |x + 4|. The first case, x−2=x+4x - 2 = x + 4, loses its x and is never true. The second case gives x = −1.

At that spot each stop is 3 miles away. The two V shapes have the same slope, so they cross just once, midway between their tips. With different slopes you usually get two crossings, as |2x−1|=|x+3||2x - 1| = |x + 3| does: x = −23-\frac{2}{3} or x = 4.

Open this example in the tool

Reading your result

Look at the graph first. The V is the left side, with its tip where the inside is 0. Each crossing with the other side is one solution. A line below the x-axis never reaches the V, which is the picture behind the rule that c cannot be negative. A line at height 0 touches only the tip.

Fractions stay exact when the numbers are whole. The check for |2x−1|=|x+3||2x - 1| = |x + 3| at the lower answer gives 73\frac{7}{3} on both sides. With decimal coefficients the answer is shown to the places you pick, so a long decimal can leave a tiny rounding gap in the check.

Only a line can go inside the bars here. For |x2−4|=5|x^2 - 4| = 5 the same two cases apply, but each one is a quadratic, so finish them with the quadratic solver. Coefficients can reach 101210^{12} in size.

Common mistakes

  • Splitting before the bars stand alone. In |x+3|+10=4|x + 3| + 10 = 4, subtract 10 first. That leaves |x+3|=−6|x + 3| = -6, and the answer is no solution, with no need to split at all.
  • Dropping the second case. Solving only 2x−3=72x - 3 = 7 feels finished, since it does give a true answer. The other answer comes from the negative side.
  • Missing a sign in the opposite case. The right side becomes −(cx+d)-(cx + d), so both terms change sign. Writing −cx+d-cx + d moves the answer.
  • Pulling the bars apart. |x−3||x - 3| is not |x|−3|x| - 3. At x = 1 the first is 2, while the second is below 0.

Questions people ask

The bars stop the result being negative, and they put no limit on what goes inside. In |x| = 3, both 3 and −3 are 3 away from 0, so both work. The rule limits the right side, never the answer.

Sources