Algebra

Linear Equation Solver

A linear equation in one variable has the form mx + b = c. The solver isolates x by subtracting b from both sides and dividing by m, showing each operation. It also handles the special cases where m = 0, which give either no solution or infinitely many.

Linear Equation Solver

Solve mx + b = c for x with each algebra step shown.

Try:
Answerx = 2
  1. Equation2x + 3 = 7
  2. Subtract b2x = 7 − (3) = 4
  3. Divide by mx = 4 / 2 = 2

Formula and method

mx + b = c → x = (c − b) / m

Subtract b from both sides to get mx = c − b, then divide both sides by m to isolate x. Two degenerate cases are handled: when m = 0 and b = c the equation has infinitely many solutions; when m = 0 and b ≠ c there is no solution.

Worked examples

Key terms

Frequently asked questions

What form of equation does this accept?

It solves mx + b = c. Rearrange other linear equations into this shape, collecting the variable on the left.

What happens when m is 0?

The variable disappears: the equation has infinitely many solutions when b = c, and no solution otherwise.

Can the answer be a fraction?

Yes. The result is shown as an exact decimal, rounded only to remove floating-point noise.