MathPicBot owl mascot MathPicBot
ALGEBRA · 5 MIN READ

How to solve linear equations, step by step

Every linear equation comes down to one habit: get the variable alone. Here is the reliable order of moves, with worked examples for the tricky cases.

By the MathPicBot team · Updated July 2026

A linear equation has the variable to the first power only, with no x2x^2 or higher. Solving it means undoing whatever is done to xx, one operation at a time, until xx stands alone. Whatever you do to one side you must do to the other.

Start with the basic moves

Undo addition and subtraction first, then multiplication and division. Take 3x+5=203x + 5 = 20.

WORKED EXAMPLE
3x+5=203x + 5 = 20
1. Subtract 55 from both sides: 3x=153x = 15.
2. Divide both sides by 33: x=5x = 5.
ANSWER
x=5x = 5

Variables on both sides

When xx appears on both sides, gather the variable terms on one side and the numbers on the other. Take 5x3=2x+95x - 3 = 2x + 9.

WORKED EXAMPLE
5x3=2x+95x - 3 = 2x + 9
1. Subtract 2x2x from both sides: 3x3=93x - 3 = 9.
2. Add 33 to both sides: 3x=123x = 12.
3. Divide by 33: x=4x = 4.
ANSWER
x=4x = 4
MathPicBot owl
Want to check your steps?
Send MathPicBot a photo and compare against its step-by-step solution.
Solve it now →

Clearing fractions and parentheses

Fractions and brackets are easier once you remove them. Expand parentheses, and multiply through by a common denominator to clear fractions. Take x2+1=x3+3\tfrac{x}{2} + 1 = \tfrac{x}{3} + 3.

WORKED EXAMPLE
x2+1=x3+3\frac{x}{2} + 1 = \frac{x}{3} + 3
1. Multiply every term by 66: 3x+6=2x+183x + 6 = 2x + 18.
2. Subtract 2x2x: x+6=18x + 6 = 18.
3. Subtract 66: x=12x = 12.
ANSWER
x=12x = 12

Always check your answer

Put your value back into the original equation. For x=12x = 12 above, the left side is 122+1=7\tfrac{12}{2} + 1 = 7 and the right side is 123+3=7\tfrac{12}{3} + 3 = 7. They match, so the answer holds.

The pattern never changes: simplify each side, move the variable to one side, then isolate it.