InfyCalculator
➗

Linear Equation Solver with Steps

Solve one-variable linear equations such as 5(x − 2) + 4 = 2x + 9 step by step: expand, collect terms, isolate x and check, with exact fractions.

Equation
Loading calculator…

How it works

Expand both sides → collect the variable on one side and numbers on the other (do the same to both sides) → ax = b → x = b ÷ a

A linear equation has the variable only to the first power, so it can always be reduced to ax = b. The solver first expands parentheses and combines like terms on each side, then moves the variable terms to the left and the constants to the right by adding or subtracting the same quantity on both sides, and finally divides by the coefficient. If the variable cancels out, the equation is either an identity (true for every x) or a contradiction (no solution). Answers are kept as exact fractions and checked by substituting back.

Worked example

Solve 5(x − 2) + 4 = 2x + 9. Expanding gives 5x − 6 = 2x + 9. Subtract 2x from both sides: 3x − 6 = 9. Add 6 to both sides: 3x = 15. Divide both sides by 3: x = 5. Check: 5(5 − 2) + 4 = 19 and 2(5) + 9 = 19.

Sources: Linear equation — Wikipedia · Solving equations — Math is Fun

Frequently asked questions

Can I enter fractions and decimals?

Yes. Type 3/4 or 0.75; the solver works with exact fractions, so x = 7/3 is shown exactly along with its decimal 2.333333.

What does "All real numbers" mean?

Both sides simplified to the same expression (for example 2x + 4 = 2(x + 2)), so every value of x works — the equation is an identity.

What does "No solution" mean?

The variable cancelled and left a false statement such as 0 = 5, as in 3x + 1 = 3x + 6. No value of x can make it true.

Why can’t it solve x² = 9 or 1/x = 2?

Those are not linear: the variable is squared or in a denominator. Use the quadratic equation solver for x², or clear the denominator first if you can.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.