Just need the answer?
Type the equation into the math solver to get the exact answer with numbered steps you can compare with your own working. The rest of this guide shows how to solve linear equations by hand, with five worked examples and practice problems.
What is a linear equation?
A linear equation in one variable is an equation that can be rearranged to the form , where a and b are numbers and . The variable appears only to the first power: no , no , no x in a denominator and no x multiplied by itself. Its graph is a straight line, and it has exactly one solution, , unless the x terms cancel, in which case it has no solution or every number is a solution.
- Linear: , , and .
- Not linear: (a quadratic), (an equation with no formula) and (x in a denominator).
How to solve linear equations step by step
Every linear equation in one variable can be solved with the same general strategy. Skip any step that does not apply: has no fractions, brackets or like terms, so it starts at step 5.
Clear fractions or decimals
If any term has a denominator, multiply every term on both sides by the lowest common denominator. For decimals, multiply every term by 10, 100 or 1000 so all coefficients become whole numbers.
Expand brackets
Multiply out each bracket with the distributive property. Watch the sign: .
Combine like terms
On each side separately, add the x terms together and the plain numbers together.
Collect x on one side
Add or subtract an x term on both sides so x appears on one side only.
Collect numbers on the other side
Add or subtract the same number on both sides.
Divide by the coefficient
Divide both sides by the number in front of x. Leave the answer as a fraction if it does not divide exactly.
Check
Substitute the answer into the original equation, not a rewritten line. Both sides must be equal.
Each step uses a property of equality: adding, subtracting, multiplying or dividing both sides by the same number (other than dividing by zero) keeps the equation balanced, so the solution does not change.
Example 1: a two-step equation
Solve . Undo the subtraction first, then the multiplication:
Check: . Correct.
Example 2: brackets and variables on both sides
Solve .
| Working | What was done |
|---|---|
| Expanded both brackets | |
| Combined 8 + 3 | |
| Subtracted 2x from both sides | |
| Added 5 to both sides | |
| Divided both sides by 3 |
The answer is , about 5.3333. Keep it as a fraction for the check: the left side is , and the right side is . Both sides agree.
Example 3: a linear equation with fractions
Solve . The denominators are 3 and 4, so the lowest common denominator is 12. Multiply every term, including the 1 on the right, by 12:
Check: . Correct.
Example 4: a linear equation with decimals
Solve . The longest decimal has two places, so multiply every term by 100 to work with whole numbers:
Here x was collected on the right, where its coefficient is larger, so the coefficient stays positive. Check: and . Both sides agree.
Example 5: a word problem
A candle is 30 cm tall and burns down 1.5 cm every hour. After how many hours is it 12 cm tall? Let h be the number of hours. The height is the starting height minus 1.5 cm for each hour, so:
The candle is 12 cm tall after 12 hours. Check: . To set up a word problem, name the unknown with a letter, write each quantity in terms of it, and set the two expressions that must be equal on either side of the equals sign.
When there is no solution, or every number works
Sometimes the x terms cancel completely. What is left tells you the answer. becomes , then , which is false, so the equation has no solution (a contradiction). becomes , then , which is always true, so every real number is a solution (an identity). On a graph, the two sides are parallel lines that never meet in the first case and the same line in the second.
Linear inequalities
Solve an inequality such as with the same steps, with one extra rule: when you multiply or divide both sides by a negative number, reverse the inequality sign.
Dividing by −2 turned into . Check with a value in the answer, such as x = −4: , which is at least 11. A value outside it, such as x = 0, gives 5, which is not. In interval notation the answer is . Check it with the inequality calculator.
Practice problems with answers
Solve each linear equation on paper first. The answers are below the list, and each one links to the math solver with the equation already entered, so you can compare its steps with yours.
Answers
| Problem | Answer | Check it |
|---|---|---|
| 1 | Open in solver | |
| 2 | Open in solver | |
| 3 | Open in solver | |
| 4 | Open in solver | |
| 5 | Open in solver | |
| 6 | Open in solver | |
| 7 | No solution () | Open in solver |
Check your answer with ScientifiCalc
- Math solver: type
5(x-1)=2(x+4)+3and choose Solve. It returns x = 16/3 ≈ 5.333333333 with numbered steps and a substitution check. - Inequality calculator: enter
5 - 2x >= 11to get in interval notation, worked out with a sign chart. - Graphing calculator: plot each side as its own line,
y = 5(x-1)andy = 2(x+4)+3. They intersect at x ≈ 5.3333, listed in the Key points panel.
Type any linear equation, with brackets, fractions, decimals or x on both sides, and get the exact answer with every step.
Common mistakes
- Multiplying only some terms by the denominator. In Example 3, the 1 on the right must also be multiplied by 12.
- Dropping a sign when expanding. is . The minus sign multiplies both terms in the bracket.
- Moving a term without changing its sign. Taking from the right side means subtracting from both sides, so it appears as on the left.
- Rounding before the end. Write , not 5.33, then round only if the question asks for a decimal.
- Checking against a rewritten line. Substitute into the original equation; a copying slip in an early line will not show up otherwise.
- Forgetting to flip the inequality after multiplying or dividing by a negative number.