Absolute Value Equation Solver

Enter a, b and c to solve |ax + b| = c.

How it is calculated

The tool solves |ax + b| = c for x, where a, b and c are the numbers you enter. It uses three cases. If c is negative there is no solution, because an absolute value is never negative. If c is 0, the only solution is x = −b ÷ a. If c is positive, it solves the two linear equations ax + b = c and ax + b = −c, giving x = (c − b) ÷ a and x = (−c − b) ÷ a, and lists the smaller solution first. Values are shown to four decimals, and a count of 1 or 2 solutions (0 for none) is reported. The tool shows the results only, not the two-case working. If a is 0 the equation has no x in it and the tool returns nothing.

Worked example

Solve |2x − 3| = 7, so a = 2, b = −3, c = 7. Since c is positive there are two cases. Case 1: 2x − 3 = 7, so 2x = 10 and x = 5. Case 2: 2x − 3 = −7, so 2x = −4 and x = −2. The tool lists the smaller one first: x = -2.0000, x = 5.0000, with a count of 2. Check x = 5: |10 − 3| = 7. Check x = −2: |−4 − 3| = 7. Both are correct.

Try this example →

Common mistakes

  • Typing b with the wrong sign. For |2x − 3| = 7 the number to enter is b = −3, because the form is ax + b; entering 3 solves |2x + 3| = 7 instead, with solutions −5 and 2.
  • Expecting a rearranged equation such as |2x| − 3 = 7 to work. The tool needs the absolute value isolated on one side first; here you would add 3 and solve |2x| = 10 with a = 2, b = 0, c = 10.
  • Entering a = 0. With no x in the bars there is nothing to solve, so no result is shown.
  • Assuming a negative c has a solution. |ax + b| = −4 has none, and the tool correctly returns No solution with a count of 0.
  • Forgetting that c = 0 gives only one solution, not two, because +0 and −0 are the same.

About this calculator

An absolute value equation of the form |ax + b| = c is solved by splitting it into two linear cases, since the expression inside the bars can be either positive or negative and still produce the same absolute value: ax + b = c, or ax + b = −c. Each case is solved independently for x, giving up to two real solutions — unless c is negative, in which case there's no solution, since an absolute value can never equal a negative number.

This solver takes a, b, and c and returns every real solution to |ax + b| = c, together with the number of solutions. It lists the solutions only, not the two cases they came from, so work out the two cases yourself if you need the steps. Algebra students and math teachers use it to check homework and verify that both solutions were found, since forgetting the negative case is one of the most common errors on this topic.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    You can check the two answers without substituting: they sit on either side of the point where the inside of the bars is zero, which is x = −b ÷ a, at an equal distance of c ÷ |a|. For |3x − 1| = 5 that point is 0.3333 and the distance is 1.6667, giving −1.3333 and 2.0000, which are exactly what the tool lists. Do your textbook problems come with the absolute value already isolated?

Popular calculators

All Calculators