Math Solver Free

Math Guides

How to Solve Linear Equations Step by Step (With Examples)

Math Solver Free Team

A teenage girl solving math equations on a classroom chalkboard

Learning how to solve linear equations is the most useful skill in algebra. A linear equation is one where the unknown — usually x — appears only to the first power: no x², no square roots, no x in a denominator. Solving it means finding the value of x that makes it true, and the method never changes: isolate x on one side of the equals sign.

Below: one-step and two-step equations, x on both sides, parentheses, fractions, the no-solution and identity cases, and word problems — every example worked and checked, because the check is part of the method.

What makes an equation "linear"?

An equation is linear when the variable is raised only to the power 1 and it can be rearranged into the form ax + b = c (a, b, c numbers; a ≠ 0). 3x + 2 = 11, x/4 = 5 and 5(x − 3) = 2x + 6 are all linear. But x² − 9 = 0 is not (x is squared), and neither is 1/x = 4 (x in a denominator). The name comes from the graph: plotted, a linear equation is a straight line.

The golden rule: keep the equation balanced

Treat the equals sign as a balance scale: whatever you add, subtract, multiply or divide on the left, do exactly the same on the right. Every legal move is an inverse operation on both sides — addition undoes subtraction, multiplication undoes division. Most linear equations then fall to four steps:

  1. Simplify each side — expand parentheses, combine like terms.
  2. Collect the x-terms on one side by adding or subtracting terms on both sides.
  3. Collect the numbers on the other side the same way.
  4. Divide by the coefficient of x — then check by substituting into the original equation.

One-step equations: undo a single operation

Look at what has been done to x, then undo it on both sides.

Example A: x + 7 = 12. Seven was added, so subtract 7 from both sides: x = 5. Check: 5 + 7 = 12 ✓

Multiplication and division undo the same way: 4x = 28 gives x = 7 (divide both sides by 4), and x/5 = 9 gives x = 45 (multiply both sides by 5). Always apply the opposite operation — everything after this section is the same idea repeated.

Two-step equations: undo in reverse order

Undo the added or subtracted number first, then the multiplier — the reverse of the order of operations.

Worked example: 3x − 4 = 11. Add 4 to both sides: 3x = 15. Divide by 3: x = 5. Check: 3(5) − 4 = 11 ✓

The mirror image works identically: 2x + 5 = 13 → subtract 5, divide by 2 → x = 4.

Watch the signs: 14 − 2x = 6. Subtract 14: −2x = −8. Divide by −2: x = 4. Check: 14 − 2(4) = 6 ✓. Remember −8 ÷ −2 is +4, not −4 — most two-step errors are sign errors.

How do you solve a linear equation with x on both sides?

Add one move at the start: subtract the smaller x-term on both sides so all x-terms gather on one side. Then it is an ordinary two-step equation.

Worked example: 5x − 3 = 2x + 9. Subtract 2x: 3x − 3 = 9. Add 3: 3x = 12. Divide by 3: x = 4. Check both sides: 5(4) − 3 = 17 and 2(4) + 9 = 17 ✓

The same three moves solve 6x − 5 = 3x + 13: subtract 3x, add 5, divide by 3 → x = 6 (check: 31 = 31 ✓).

Habit worth copying: collect x where its coefficient stays positive — collecting rightwards here gives −3x = −12, correct but easier to slip a sign on.

Equations with parentheses: expand first — or divide first

Either expand the parentheses with the distributive law, or — when the outside number divides the other side neatly — divide both sides by it first.

Worked example (divide first): 4(x − 3) = 20. Divide by 4: x − 3 = 5. Add 3: x = 8. Check: 4(8 − 3) = 20 ✓ (expanding first gives 4x − 12 = 20, same answer).

Worked example (expand, then both sides): 5(x − 2) = 3x + 4. Expand: 5x − 10 = 3x + 4. Subtract 3x: 2x − 10 = 4. Add 10: 2x = 14. Divide by 2: x = 7. Check: 5(7 − 2) = 25 and 3(7) + 4 = 25 ✓

The classic error: 5(x − 2) is 5x − 10, not 5x − 2 — the outside number multiplies every term inside.

How do you solve linear equations with fractions?

The golden rule is unchanged — but first clear the denominators: multiply every term on both sides by the lowest common multiple (LCM) of the denominators.

Worked example: x/3 + 2 = 7. Subtract 2: x/3 = 5. Multiply by 3: x = 15. Check: 15/3 + 2 = 7 ✓

Worked example (clearing fractions): x/2 + x/3 = 10. LCM of 2 and 3 is 6; multiply every term by 6: 3x + 2x = 60. So 5x = 60 and x = 12. Check: 12/2 + 12/3 = 6 + 4 = 10 ✓

Worked example: (2x − 1)/3 = 5. Multiply by 3: 2x − 1 = 15, so 2x = 16 and x = 8. Check: (16 − 1)/3 = 5 ✓

Decimals yield to the same trick: multiply 0.5x + 1.5 = 4.5 through by 10 and you get x = 6.

What if an equation has no solution — or every solution?

Sometimes the x-terms cancel, leaving a statement about numbers only — neither outcome means a mistake.

No solution: 2(x + 3) = 2x + 9 expands to 2x + 6 = 2x + 9; subtract 2x and you get 6 = 9 — false. The left side is always exactly 3 less than the right, so no value of x works.

Infinitely many solutions: 3(x − 1) + 2 = 3x − 1. The left expands to 3x − 1 — identical to the right — and reduces to −1 = −1, always true. So every real number is a solution; this is an identity. Test: x disappears, statement true → all numbers; false → no solution.

Word problems: turn the words into an equation

The routine: (1) pick a letter for the unknown, (2) translate the sentences into an equation, (3) solve, (4) answer in words with units, checked against the story.

Worked example: Three identical notebooks and a $4 pen cost $19. Let n be one notebook's price: 3n + 4 = 19. Subtract 4: 3n = 15. Divide by 3: n = 5. One notebook costs $5. Check: 3 × $5 + $4 = $19 ✓

Worked example: Two consecutive integers sum to 27. Let the smaller be n; the other is n + 1. n + (n + 1) = 27 gives 2n = 26, so n = 13. The integers are 13 and 14. Check: 13 + 14 = 27 ✓

Geometry works the same way: length 3 cm more than width, perimeter 26 cm gives 2(w + w + 3) = 26 → width 5 cm, length 8 cm.

Common mistakes to avoid

  • Operating on one side only. Subtract 5 on the left? Subtract 5 on the right too.
  • Sign errors when moving terms. +2x moved across the equals sign becomes −2x.
  • Dividing only part of an expression. (2x + 8) ÷ 2 is x + 4, not x + 8.
  • Expanding parentheses halfway. 5(x − 2) is 5x − 10 — every inside term gets multiplied.
  • Clearing fractions from only some terms. The LCM multiplies every term, lone numbers included.
  • Skipping the check. Thirty seconds of substitution catches most errors.
A person writing mathematical equations in a notebook with a ruler and pencil

Frequently asked questions

What is a linear equation in simple terms?

An equation where the variable appears only to the first power, like 3x + 2 = 11 — no squares, roots, or variable in a denominator. It normally has exactly one solution.

What is the first step in solving a linear equation?

Simplify each side: expand parentheses and combine like terms. Then collect x-terms on one side, numbers on the other, and divide by the coefficient of x.

How do I check my answer?

Substitute your x value into the original equation and evaluate both sides separately. Equal sides mean the answer is right; unequal sides mean the error is in your working.

What if x is on both sides of the equation?

Subtract the smaller x-term from both sides first (in 5x − 3 = 2x + 9, subtract 2x to get 3x − 3 = 9), then solve as a normal two-step equation.

Can a linear equation have no solution?

Yes. If the x-terms cancel and leave a false statement like 6 = 9, no value works. If they leave a true statement like −1 = −1, the equation is an identity and every real number is a solution.

What is the difference between a linear equation and a quadratic equation?

A linear equation has x only to the first power and one solution (special cases aside). A quadratic contains x², is solved by factoring or the quadratic formula, and can have two solutions.

Now practise: redo two examples of each type without looking, then check yourself with the free equation solver. See also Math Is Fun's solving equations page for a gentler explanation. Next step up: solving quadratic equations step by step. Weak on graphs? How to find the slope of a line connects algebra to the picture.

About the MathSolverFree Team

The MathSolverFree Team builds and maintains the calculators and step-by-step solvers on this site. Every tool is checked against worked textbook examples before it is published, and the method behind each solver is written out in full — in the worked examples on the page and in our guides — so you can see exactly how an answer is reached, not just the answer itself.

How we build and test our tools·More about the team