Linear equation
Solve a linear equation step by step.
Enter coefficients a and b – the solution appears instantly.
How to solve a linear equation
A linear equation has the form ax + b = 0, where a and b are numbers and x is the unknown. The goal is to isolate x on one side. Subtract b and divide by a:
ax + b = 0 ⟹ ax = −b ⟹ x = −b / a
Example: 2x − 6 = 0 → 2x = 6 → x = 3.
Special cases (when a = 0)
When a = 0, the equation is no longer "linear in the usual sense" and two special cases can occur:
- a = 0, b = 0 the equation 0 = 0 always holds → the solution is every real number (x ∈ ℝ)
- a = 0, b ≠ 0 the equation, e.g. 5 = 0, never holds → the equation has no solution (x ∈ ∅)
These are exactly the cases people most often overlook. The calculator recognises them and clearly states whether there is one solution, none, or infinitely many.
Tip: coefficients can be decimal or negative. The result is only rounded for display.