A tutor-style walk through solving linear equations, including multi-step equations, fractions, decimals, and the special cases with no solution or every solution.

What is a linear equation?

A linear equation is an equation where the variable only appears to the first power, so there’s no x², no √x, and no x in a denominator. Solving linear equations means finding the value of x that makes both sides equal.

Equations like 3x + 5 = 20, 4(x − 2) = 2x + 10, and x/4 + 2 = x/2 − 1 are all linear. They look different, but once you tidy them up, each one has the shape ax + b = c. That’s why one method handles all of them.

If you graph the two sides as lines, the solution is the x value where they cross. Two lines with different slopes cross once, which is why most linear equations have exactly one answer.

How do you solve linear equations step by step?

To solve a linear equation, simplify each side, move the x terms to one side and the numbers to the other, then divide by the coefficient of x. Whatever you do to one side, you do to the other.

Think of the equals sign as a balance scale. Subtracting 5 from only one side tips it. Subtracting 5 from both sides keeps it level, so the new equation has the same solution as the old one. Every step below is just a way of keeping the scale level while you strip things away from x.

  1. Clear brackets by distributing, and clear fractions if there are any.
  2. Combine like terms on each side separately.
  3. Add or subtract to get all x terms on one side.
  4. Add or subtract to get all constant numbers on the other side.
  5. Divide both sides by the number in front of x.
  6. Substitute your answer into the original equation to check it.

What does a simple worked example look like?

Take 3x + 5 = 20. Subtract 5 from both sides to get 3x = 15, then divide both sides by 3 to get x = 5.

The order matters. You undo addition before multiplication because you’re working backwards through what was done to x. Someone took x, multiplied by 3, then added 5. To get back to x, you remove the 5 first and the 3 second.

Check it: 3(5) + 5 = 15 + 5 = 20. The left side matches the right, so x = 5 is correct. If you want more practice at this size, the guide on how to solve two-step equations covers them in detail.

3x + 5 = 20
3x = 15
x = 5

How do you solve equations with variables on both sides?

When x appears on both sides, subtract the smaller x term from both sides so x ends up on one side only. Then finish it like a two-step equation.

Try 5x + 4 = 2x − 11. Subtract 2x from both sides to get 3x + 4 = −11. Subtract 4 to get 3x = −15. Divide by 3 and x = −5.

You could subtract 5x instead. You’d get 4 = −3x − 11, then 15 = −3x, then x = −5. Same answer, but you carry a negative coefficient around. Moving the smaller x term keeps the coefficient positive and gives you fewer chances to drop a sign.

5x + 4 = 2x − 11
3x + 4 = −11
3x = −15
x = −5

How do you solve multi-step equations with brackets?

For multi step equations, distribute first, combine like terms on each side, and only then start moving terms across the equals sign. Most errors happen when people skip the tidy-up and start moving pieces too early.

Here’s a longer one: 3(2x − 1) − 4 = 2(x + 3) + 3. Distribute on the left to get 6x − 3 − 4, which combines to 6x − 7. On the right, 2x + 6 + 3 becomes 2x + 9. Now the equation is 6x − 7 = 2x + 9, which looks a lot friendlier.

Subtract 2x from both sides to get 4x − 7 = 9. Add 7 to get 4x = 16. Divide by 4, so x = 4. Check: the left side is 3(8 − 1) − 4 = 21 − 4 = 17, and the right side is 2(7) + 3 = 17. Both match.

3(2x − 1) − 4 = 2(x + 3) + 3
6x − 7 = 2x + 9
4x − 7 = 9
4x = 16
x = 4

How do you solve linear equations with fractions or decimals?

Multiply every term on both sides by the least common denominator. The fractions disappear and you’re left with an ordinary equation.

For x/4 + 2 = x/2 − 1, the denominators are 4 and 2, so the LCD is 4. Multiplying every term by 4 gives x + 8 = 2x − 4. Subtract x from both sides to get 8 = x − 4, then add 4 and x = 12. Check: 12/4 + 2 = 5 and 12/2 − 1 = 5.

Decimals work the same way with a power of 10. In 0.4x + 1.2 = 3, multiply everything by 10 to get 4x + 12 = 30. Then 4x = 18 and x = 9/2, which is 4.5. Keep the answer as a fraction or exact decimal; rounding in the middle of the working is how small errors creep in.

x/4 + 2 = x/2 − 1
x + 8 = 2x − 4
x = 12

When does a linear equation have no solution or infinitely many?

If the x terms cancel and you’re left with something false, like 6 = 9, there’s no solution. If you’re left with something always true, like 6 = 6, every real number is a solution.

Compare 2(x + 3) = 2x + 9 with 2(x + 3) = 2x + 6. In the first, distributing gives 2x + 6 = 2x + 9. Subtract 2x and you get 6 = 9, which is never true. The two sides are parallel lines that never meet.

In the second, you get 2x + 6 = 2x + 6. Both sides are the same expression, so any x works. Write the answer as “all real numbers” rather than x = 0, which is a common slip.

What are the most common mistakes in solving linear equations?

Most wrong answers come from three habits: distributing to only the first term in a bracket, losing a negative sign, and doing an operation to one side only.

In 4(x − 2), the 4 multiplies both x and −2, giving 4x − 8, not 4x − 2. With a minus in front of a bracket, such as −(x − 5), every sign inside flips, so it becomes −x + 5. When you divide −3x = 12 by −3, the answer is x = −4, and that negative is easy to drop if you rush.

Write each new line in full before you simplify it. It feels slower, but it makes the step where something went wrong easy to spot later.

How do you check the answer to a linear equation?

Substitute your value for x into the original equation and work out each side separately. If the two sides give the same number, your answer is right.

Use the first line of the problem, not one you wrote later. If you made a mistake while distributing, a later line already contains it, and your check will agree with the wrong answer. The article on checking algebra answers by substitution shows this in more detail.

The linear equation solver on this site shows each step and a final substitution check. Compare your working with it line by line to find where yours split off.

Frequently asked questions

What is the first step in solving a linear equation?

Simplify each side on its own. That means distributing any brackets and combining like terms before you move anything across the equals sign. Starting there keeps the later steps short.

Can a linear equation have two solutions?

No. After simplifying, a linear equation has exactly one solution, no solution, or infinitely many. Two separate answers is a sign the equation is quadratic or that a mistake crept in.

How do you solve a linear equation when x is negative, like −x = 7?

Divide both sides by −1, or multiply both sides by −1. Either way you get x = −7. A negative coefficient is still a coefficient, so you divide by it like any other number.

What is the difference between a two-step equation and a multi-step equation?

A two-step equation needs one addition or subtraction and one multiplication or division, like 3x + 5 = 20. Multi-step equations add brackets, fractions, or x on both sides, so you tidy up first before the final two steps.

Do I have to move x to the left side?

No. x = 12 and 12 = x mean the same thing. Put x on whichever side keeps its coefficient positive, then flip the equation at the end if you like.

References and further reading