Linear equation

Check the coefficient before dividing

Enter a and b for a·x+b=0, including an explicit 0 for a missing term. The coefficients must be dimensionless real values. If a is nonzero, the candidate is x=−b/a.

If a=0 and b=0, every value in the selected domain satisfies the equation. If a=0 and b is nonzero, there is no solution. Neither case involves division by zero.

The solver substitutes each candidate into the original coefficients. An exact candidate must give zero; an approximate candidate must pass the relative residual check. A failed check gives an indeterminate status without a reusable root.

Worked example: 2x−4=0

With a=2 and b=−4, move the constant to obtain 2x=4, then divide by 2: x=2. Substitution gives 2×2−4=0.

Changing a to 0 leaves 0x−4=0, which has no solution. With both coefficients zero, the equation becomes 0=0 and every value in the selected domain is a solution.

Load example fills the form without calculating. Choose its primary action to work it out.

Sources and related calculators

The method and worked example here are original. Sources describe the underlying mathematics or notation; calculation choices and limits are in the precision and syntax guide.