Absolute Value Equation Calculator

Solve an equation with absolute value bars and see both cases worked.

Type bars with the | key, such as |2x - 3| = 7 or |x + 1| = |2x - 4|.

Try

Result

You entered∣x−4∣=−2\left|x - 4\right| = -2

No solution\displaystyle \text{No solution}
Show the work
  1. Absolute value equals a number

    ∣A∣=B|A| = B means that AA is BB units from zero, so AA is either BB or −B-B. Write one equation for each possibility.

    Using A=B∨A=−BA = B \lor A = -B

    x−4=−2x−4=2\begin{gathered} x - 4 = -2 \\ x - 4 = 2 \end{gathered}
  2. Solve the first case

    Set the expression inside the bars equal to the right-hand side, then collect the xx terms and divide by the coefficient.

    x−4=−2x=2x=2\begin{gathered} x - 4 = -2 \\ x = 2 \\ x = 2 \end{gathered}
  3. Solve the second case

    Set the expression inside the bars equal to the opposite of the right-hand side, then solve in the same way.

    x−4=2x=6x=6\begin{gathered} x - 4 = 2 \\ x = 6 \\ x = 6 \end{gathered}
  4. Check each solution

    Substitute each candidate into the original equation. An absolute value is never negative, so a candidate that makes the right-hand side negative does not work; those that fail are extraneous and are dropped.

    x=2 ⁣: ∣−2∣=2≠−2x=6 ⁣: ∣2∣=2≠−2\begin{gathered} x = 2\colon\ \left|-2\right| = 2 \ne -2 \\ x = 6\colon\ \left|2\right| = 2 \ne -2 \end{gathered}
  5. Result

    No candidate survives the check, so the equation has no solution.

Worked examples