Linear Equation Solver

Solve a linear equation written as ax + b = c for x, with each inverse operation shown and the answer checked by substitution.

StepsExact resultDecimal resultVerifiedLocal only

Calculator

  • Isolates x by inverse operations
  • One / none / infinite solutions
  • Exact fraction form
  • Substitution check

Result & calculation receipt

Result5
Calculation receipt
Method
Isolate x by inverse operations
Formula
ax + b = c ⟹ x = (c − b) / a
Substitution
x = (22 − 7) / 3 = 15 / 3 = 5
Steps
  1. Subtract b: 3·x = 22 − 7 = 15.
  2. Divide by a: x = 15 ÷ 3 = 5.
Verification
Substitute back: 3·(5) + 7 = 22 = 22. ✓
Exact result
5
Decimal result
5
Engine
math-solvers v1.4.0

How this calculator works

The calculator isolates x by undoing the operations around it: subtract the constant b from both sides, then divide both sides by the coefficient a. It also handles the special cases where a is zero — the equation has no solution if the constants disagree, or infinitely many if they match — and gives the exact fractional answer when x is not a whole number.

Worked example

For 3x + 7 = 22, subtracting 7 gives 3x = 15, and dividing by 3 gives x = 5. Substituting back, 3 × 5 + 7 = 22, which matches. If the equation were 0x + 5 = 9, no value of x can make 5 equal 9, so there is no solution; if it were 0x + 5 = 5, every x works.

Key insight

Every linear equation in one variable rearranges to ax + b = c, so once you can solve that form you can solve them all. The three outcomes — one solution, none, or infinitely many — depend entirely on whether a (and then b versus c) is zero.

Frequently asked questions

How do I solve ax + b = c for x?

Undo the operations around x: subtract b from both sides to get ax = c − b, then divide both sides by a to get x = (c − b)/a. The calculator shows both steps.

When does a linear equation have no solution?

When the coefficient a is zero and the remaining constants disagree, such as 0x + 5 = 9. There is no x that makes a false numerical statement true, so no solution exists.

When does it have infinitely many solutions?

When a is zero and the constants agree, such as 0x + 5 = 5. The equation is true for every value of x, so any number is a solution.

Can the answer be a fraction?

Yes. When (c − b) is not divisible by a, the calculator gives the exact fraction as well as the decimal, for example x = 7/3.

How is the solution verified?

By substitution: the calculator puts x back into ax + b and confirms the result equals c, and shows that check in the receipt.

Methodology & verification

A linear equation is normalized to ax + b = c and solved by inverse operations: x = (c − b)/a. When a = 0 the calculator distinguishes no solution (b ≠ c) from infinitely many (b = c) rather than dividing by zero. The answer is given as an exact fraction (when non-integer) and a decimal, and is verified by substituting x back into the left-hand side and confirming it equals c.

Engine: math-solvers v1.4.0 · Last reviewed: · Every result is computed client-side and never sent to a server. See the verification methodology and the scientific calculator validation.