If equations make your stomach drop, take a breath—you are about to learn a method that turns almost any linear equation into a short, predictable checklist. Once you understand the single rule that drives every step, solving for x stops feeling like guessing and starts feeling like following a recipe. That is the goal of this guide.
In this lesson you will learn exactly how to solve linear equations from the simplest one-step problems all the way to equations with parentheses, fractions, and variables on both sides. You will see at least four fully worked examples with every single step shown, the most common mistakes students make (and how to dodge them), and a few practice problems with answers so you can test yourself. If you ever get stuck, you can paste any problem into our free equation solver to see the worked steps instantly.
This page is written for students from middle school through early college, and for parents helping at the kitchen table. No prior algebra experience is assumed—just bring a pencil and a willingness to check your work.
What Is a Linear Equation?
A linear equation is an equation in which the variable appears only to the first power. There are no exponents like \(x^2\), no square roots of the variable, and no variables in a denominator. The graph of a linear equation in two variables is a straight line—which is exactly where the word “linear” comes from.
A linear equation in one variable can always be rearranged into this standard form:
$$ax + b = 0, \quad \text{where } a \neq 0$$Here \(a\) and \(b\) are just numbers, and \(x\) is the unknown we want to find. Equations like \(3x + 5 = 20\), \(\frac{x}{3} + \frac{1}{2} = \frac{5}{6}\), and \(5x - 3 = 2x + 12\) are all linear. By contrast, \(x^2 = 9\) is not linear because of the exponent—that is a quadratic, and you can learn its methods in our guide on How to Solve Quadratic Equations (4 Methods).
Key Vocabulary You Should Know
Before we solve anything, let’s lock down the words. Knowing this language makes every instruction below crystal clear.
| Term | What it means | Example (from \(3x + 5\)) |
|---|---|---|
| Variable | A letter that stands for an unknown number | \(x\) |
| Coefficient | The number multiplying the variable | \(3\) |
| Constant | A fixed number with no variable attached | \(5\) |
| Term | A single number, variable, or product of the two | \(3x\) and \(5\) |
| Like terms | Terms with the exact same variable part | \(3x\) and \(2x\) |
The Golden Rule: Keep the Equation Balanced
Every technique in algebra grows from one idea. An equation is like a balanced scale: the left side equals the right side. Whatever you do to one side, you must do to the other side—otherwise the scale tips and the two sides are no longer equal.
The one rule that powers everything
You may add, subtract, multiply, or divide both sides of an equation by the same number (never multiply or divide by zero) and the solution will not change. Your job is to use these moves to get the variable alone on one side.
Getting the variable by itself is called isolating the variable. We do this by undoing operations in reverse. If a number was added to \(x\), we subtract it. If \(x\) was multiplied by a number, we divide. These pairs—addition/subtraction and multiplication/division—are inverse operations, and they are the tools we use on every problem.
How to Solve Linear Equations Step by Step
Here is the complete method. Not every problem needs every step, but if you follow this order you will never be lost. This is the exact routine to remember for how to solve linear equations of any difficulty.
- Simplify each side separately. Distribute through any parentheses and combine like terms on the left and the right.
- Clear fractions or decimals (optional). Multiply every term by the least common denominator to make the numbers friendlier.
- Collect the variable terms on one side. Add or subtract a variable term from both sides so all the \(x\)’s land together.
- Collect the constants on the other side. Add or subtract numbers from both sides so the variable term is alone.
- Divide by the coefficient. Divide both sides by the number in front of the variable to get \(x\) by itself.
- Check your answer. Substitute your solution back into the original equation and confirm both sides match.
Study tip
Write the operation you are doing in the margin of each line, like “−5 from both sides.” Naming the move out loud (or on paper) cuts careless errors dramatically and makes your work easy to recheck.
Worked Example 1: A Two-Step Equation
Let’s start with a classic two-step equation. The name comes from the two inverse operations we need.
Solve: \( 3x + 5 = 20 \)
Step 1 — Identify what is happening to \(x\). The variable is multiplied by 3, and then 5 is added. We undo these in reverse: first deal with the \(+5\), then the \(\times 3\).
Step 2 — Subtract 5 from both sides to move the constant away from the variable term.
$$3x + 5 - 5 = 20 - 5$$ $$3x = 15$$Step 3 — Divide both sides by 3 to undo the multiplication and isolate \(x\).
$$\frac{3x}{3} = \frac{15}{3}$$ $$x = 5$$Step 4 — Check. Replace \(x\) with 5 in the original equation:
$$3(5) + 5 = 15 + 5 = 20 \checkmark$$Both sides equal 20, so our answer is confirmed.
Worked Example 2: Variables on Both Sides (with Parentheses)
This is where most students start to worry, but the method does not change—we just have a little more cleanup to do first.
Solve: \( 3(2x - 4) = 2(x + 6) \)
Step 1 — Distribute on both sides. Multiply the number outside each set of parentheses by every term inside.
$$3 \cdot 2x - 3 \cdot 4 = 2 \cdot x + 2 \cdot 6$$ $$6x - 12 = 2x + 12$$Step 2 — Collect the variable terms on one side. Subtract \(2x\) from both sides so all the \(x\)’s are on the left.
$$6x - 2x - 12 = 2x - 2x + 12$$ $$4x - 12 = 12$$Step 3 — Collect the constants on the other side. Add 12 to both sides.
$$4x - 12 + 12 = 12 + 12$$ $$4x = 24$$Step 4 — Divide by the coefficient. Divide both sides by 4.
$$\frac{4x}{4} = \frac{24}{4}$$ $$x = 6$$Step 5 — Check. Substitute \(x = 6\) into the original equation:
$$3(2 \cdot 6 - 4) = 3(12 - 4) = 3(8) = 24$$ $$2(6 + 6) = 2(12) = 24 \checkmark$$Both sides equal 24. The solution holds.
Common mistake
When distributing, do not forget the sign. In an expression like \(-2(x - 5)\), the result is \(-2x + 10\), not \(-2x - 10\). A negative times a negative is positive. Sign slips are the number one cause of wrong answers in these problems.
Worked Example 3: Equations with Fractions
Fractions look intimidating, but there is a clean trick: multiply every term by the least common denominator (LCD) to clear the fractions entirely. After that, the equation behaves like any other.
Solve: \( \dfrac{x}{3} + \dfrac{1}{2} = \dfrac{5}{6} \)
Step 1 — Find the LCD. The denominators are 3, 2, and 6. The least common denominator is \(6\), because 6 is the smallest number all three divide into evenly.
Step 2 — Multiply every term by 6. Be sure to multiply the whole equation, including each term on the left and right.
$$6 \cdot \frac{x}{3} + 6 \cdot \frac{1}{2} = 6 \cdot \frac{5}{6}$$Now simplify each product. \(6 \div 3 = 2\), so the first term becomes \(2x\). \(6 \div 2 = 3\), so the second becomes \(3\). And \(6 \div 6 = 1\), so the right side becomes \(5\).
$$2x + 3 = 5$$Step 3 — Subtract 3 from both sides.
$$2x + 3 - 3 = 5 - 3$$ $$2x = 2$$Step 4 — Divide both sides by 2.
$$\frac{2x}{2} = \frac{2}{2}$$ $$x = 1$$Step 5 — Check. Substitute \(x = 1\) back into the original equation and use a common denominator of 6:
$$\frac{1}{3} + \frac{1}{2} = \frac{2}{6} + \frac{3}{6} = \frac{5}{6} \checkmark$$The left side equals the right side exactly.
Want to skip the arithmetic and confirm your steps in seconds? Drop any equation into our step-by-step equation solver and compare its work line by line with your own. It is a fast way to find exactly where a mistake crept in.
Worked Example 4: A Real-World Word Problem
Linear equations are not just classroom exercises—they model real situations involving rates, fees, and totals. The skill here is translating words into an equation, then solving as usual.
Problem: A taxi charges a flat fee of 4 dollars plus 2 dollars for every mile driven. If your ride cost 20 dollars in total, how many miles did you travel?
Step 1 — Define the variable. Let \(m\) be the number of miles driven.
Step 2 — Translate into an equation. The flat fee (4) plus 2 dollars per mile (\(2m\)) equals the total (20).
$$4 + 2m = 20$$Step 3 — Subtract 4 from both sides to isolate the variable term.
$$4 - 4 + 2m = 20 - 4$$ $$2m = 16$$Step 4 — Divide both sides by 2.
$$\frac{2m}{2} = \frac{16}{2}$$ $$m = 8$$Step 5 — Check and interpret. A ride of 8 miles costs \(4 + 2(8) = 4 + 16 = 20\) dollars, which matches the problem. Because \(m\) represents miles, the answer makes sense in context.
Special Cases: No Solution and Infinitely Many Solutions
Sometimes the variable disappears entirely while you are solving. Do not panic—this is meaningful, not a mistake.
No Solution
Consider \( 2x + 3 = 2x + 7 \). Subtract \(2x\) from both sides:
$$2x - 2x + 3 = 2x - 2x + 7$$ $$3 = 7$$This statement is false—3 never equals 7. Because we reached a contradiction, the equation has no solution. No value of \(x\) can make it true.
Infinitely Many Solutions
Now consider \( 2(x + 1) = 2x + 2 \). Distribute on the left:
$$2x + 2 = 2x + 2$$The two sides are identical. This is always true, no matter what \(x\) is, so the equation has infinitely many solutions—every real number works.
Quick rule of thumb: if the variables cancel and you are left with a true statement (like \(5 = 5\)), there are infinitely many solutions. If you are left with a false statement (like \(3 = 7\)), there is no solution.
Common Mistakes to Avoid
Most wrong answers come from a small set of repeat offenders. Watch for these:
- Forgetting to do the operation to both sides. If you subtract 5 from the left, you must subtract 5 from the right too, or the scale tips.
- Sign errors when distributing or moving terms. Moving \(+8\) to the other side makes it \(-8\). Track signs carefully.
- Combining unlike terms. You cannot add \(3x\) and \(5\); they are different kinds of terms. Only combine \(3x\) with another \(x\)-term.
- Dividing only part of a side. When you divide by the coefficient, divide the entire side, not just one term.
- Skipping the check. Substituting your answer back in takes ten seconds and catches the majority of errors.
Watch the negative coefficient
If you end up with \(-x = 7\), you are not done. Divide both sides by \(-1\) to get \(x = -7\). A leading negative sign is easy to leave behind.
Practice Problems (with Answers)
Try these on your own using the six-step method. Cover the answers until you finish, then check yourself.
- \( 4x - 7 = 9 \)
- \( 2(x + 3) = 16 \)
- \( 7x + 2 = 3x + 18 \)
- \( \dfrac{x}{2} - 1 = 4 \)
Answers:
- Problem 1: Add 7, then divide by 4. \( x = 4 \).
- Problem 2: Distribute to get \(2x + 6 = 16\), subtract 6, divide by 2. \( x = 5 \).
- Problem 3: Subtract \(3x\) to get \(4x + 2 = 18\), subtract 2, divide by 4. \( x = 4 \).
- Problem 4: Add 1 to get \(\frac{x}{2} = 5\), multiply by 2. \( x = 10 \).
Related Equation-Solving Guides
Once you are comfortable with linear equations, these next steps build naturally on the same balancing skill:
- How to Solve Quadratic Equations (4 Methods) — what to do when the variable is squared.
- How to Solve Systems of Equations (Substitution, Elimination & Graphing) — solving two equations at once.
- How to Solve Inequalities Step by Step — almost identical to this method, with one twist about flipping the sign.
Conclusion
Solving linear equations comes down to one promise—keep the equation balanced—and one routine: simplify, gather the variables, gather the constants, divide, and check. Work through the four examples above a second time without looking, and the steps will start to feel automatic. Algebra rewards practice more than talent, so give yourself plenty of reps.
When you want to confirm an answer, learn from a fully worked solution, or just save time on homework, our free equation solver shows every step the way a patient tutor would. Explore it now, and browse more clear, example-rich lessons on the Math Solver AI blog to keep building your skills.
