How to Solve a Linear Equation Step by Step

·96% (159 Rated)
To solve a linear equation, isolate the variable using inverse operations. Simplify each side, move the variable terms to one side and the constants to the other, then divide by the number in front of the variable. For example, to solve 2x + 3 = 11, subtract 3 from both sides to get 2x = 8, then divide both sides by 2 to get x = 4.
A linear equation is one of the first things you learn in algebra, and almost everything that comes later builds on it. The good news is that every linear equation, no matter how messy it looks, is solved with the same short set of steps. Once you know the pattern, you can solve any of them.
This guide walks through the method, then works through six examples that cover the cases you'll actually see: one-step equations, two-step equations, variables on both sides, parentheses, fractions, and answers that come out negative or fractional. It finishes with how to check your answer, the mistakes to watch for, and the two special cases that trip students up.

What Is a Linear Equation?

A linear equation is an equation where the variable is only raised to the first power. That means no exponents, no square roots on the variable, and no variables multiplied together. Its graph is always a straight line, which is where the name comes from.
These are linear equations:
  • x + 5 = 12
  • 2x + 3 = 11
  • 5x - 4 = 2x + 11
These are not linear equations:
  • x squared + 3 = 7 (the variable is squared)
  • 1/x = 4 (the variable is in the denominator)
For this guide we're solving linear equations in one variable, which means the goal is always the same: find the single value of the variable that makes the equation true.

The Basic Method: Isolate the Variable

Solving a linear equation means getting the variable by itself on one side of the equals sign. You do that with inverse operations, the operation that undoes another: subtraction undoes addition, division undoes multiplication, and so on.
The one rule that makes it all work: whatever you do to one side of the equation, you must do to the other. An equation is like a balanced scale, and keeping both sides equal is what keeps your answer correct.
Here is the method that works for every linear equation:
  1. Simplify each side. Distribute across any parentheses and combine like terms.
  1. Collect the variable terms on one side. Add or subtract to move all the variable terms together.
  1. Collect the constants on the other side. Add or subtract to move the plain numbers to the opposite side.
  1. Isolate the variable. Divide (or multiply) both sides by the number in front of the variable.
  1. Check your solution. Substitute your answer back into the original equation.
The examples below apply these same steps every time.

Step-by-Step Examples

Example 1: A One-Step Equation

Solve: x + 5 = 12
The variable is almost alone already. To undo the "+ 5," subtract 5 from both sides:
x + 5 - 5 = 12 - 5 x = 7
Check: 7 + 5 = 12. Correct.

Example 2: A Two-Step Equation

Solve: 2x + 3 = 11
First move the constant. Subtract 3 from both sides:
2x = 8
Now isolate x by dividing both sides by 2:
x = 4
Check: 2(4) + 3 = 8 + 3 = 11. Correct.

Example 3: Variables on Both Sides

Solve: 5x - 4 = 2x + 11
When the variable appears on both sides, first get all the variable terms together. Subtract 2x from both sides:
3x - 4 = 11
Now move the constant. Add 4 to both sides:
3x = 15
Divide both sides by 3:
x = 5
Check: 5(5) - 4 = 21 and 2(5) + 11 = 21. Both sides match, so it is correct.

Example 4: Equations with Parentheses

Solve: 3(x + 2) = 21
Start by distributing the 3 across the parentheses:
3x + 6 = 21
Subtract 6 from both sides:
3x = 15
Divide both sides by 3:
x = 5
Check: 3(5 + 2) = 3(7) = 21. Correct.

Example 5: Equations with Fractions

Solve: x/4 + 2 = 5
The easiest way to handle fractions is to clear them first. Multiply every term on both sides by the denominator, 4:
4 times (x/4) + 4 times 2 = 4 times 5 x + 8 = 20
Now it is an ordinary two-step equation. Subtract 8 from both sides:
x = 12
Check: 12/4 + 2 = 3 + 2 = 5. Correct.

Example 6: A Negative or Fractional Answer

Solve: 3x + 5 = x - 2
Answers are not always tidy whole numbers. They can be negative, a fraction, or both, and the method is exactly the same. Start by moving the variable terms together. Subtract x from both sides:
2x + 5 = -2
Subtract 5 from both sides:
2x = -7
Divide both sides by 2:
x = -7/2
Check: on the left, 3(-7/2) + 5 = -21/2 + 10/2 = -11/2. On the right, -7/2 - 2 = -7/2 - 4/2 = -11/2. Both sides equal -11/2, so it is correct.

How to Check Your Answer

Checking takes a few seconds and catches almost every error. Substitute your answer back into the original equation and confirm both sides come out equal. If they don't, you have a mistake to find, usually a sign error somewhere in the steps.
If you want to see the full worked steps for your own equation, a step-by-step solver like Gauth lets you scan or type the equation and shows each step, which is a quick way to spot exactly where a mistake happened.

Common Mistakes to Avoid

  • Only doing the operation to one side. Whatever you subtract, add, multiply, or divide has to happen on both sides.
  • Sign errors. Moving a term across the equals sign flips its sign. Losing a negative is the most common reason an answer comes out wrong.
  • Distributing incorrectly. With something like 3(x + 2), multiply the 3 by both terms inside: 3x + 6, not 3x + 2.
  • Dividing only part of a side. When you divide by the coefficient, every term on that side gets divided.
  • Skipping the check. The substitution step is the fastest way to know your answer is right.

Special Cases: No Solution and Infinite Solutions

Not every linear equation has one clean answer. Two special cases come up:
No solution. If the variables cancel out and you're left with a false statement, there is no solution. For example, 2x + 5 = 2x + 3. Subtract 2x from both sides and you get 5 = 3, which is never true, so no value of x works.
Infinitely many solutions. If the variables cancel and you're left with a true statement, every number is a solution. For example, 2(x + 2) = 2x + 4 simplifies to 2x + 4 = 2x + 4. Subtract 2x and you get 4 = 4, which is always true, so any value of x works.

Frequently Asked Questions

What is a linear equation? A linear equation is an equation in which the variable is only raised to the first power, with no exponents, roots, or variables multiplied together. Its graph is a straight line. Examples include x + 5 = 12 and 2x + 3 = 11.
What are the steps to solve a linear equation? Simplify each side, move the variable terms to one side, move the constants to the other side, divide both sides by the number in front of the variable, and then check your answer by substituting it back into the original equation.
How do you solve a linear equation with variables on both sides? First add or subtract to get all the variable terms on one side and all the constants on the other, then divide by the coefficient. For 5x - 4 = 2x + 11, subtract 2x to get 3x - 4 = 11, add 4 to get 3x = 15, then divide by 3 to get x = 5.
How do you solve a linear equation with fractions? Multiply every term on both sides by the denominator to clear the fractions, then solve the equation normally. For x/4 + 2 = 5, multiply through by 4 to get x + 8 = 20, then subtract 8 to get x = 12.
What does it mean when a linear equation has no solution? It means the variable cancels out and you're left with a false statement, such as 5 = 3. No value of the variable can make the equation true, so there is no solution.
Can a linear equation have a negative or fractional answer? Yes. The solution can be a negative number, a fraction, or both, and it is solved with the same steps. For example, 3x + 5 = x - 2 solves to x = -7/2.

Related