Solving Linear Equations
An equation says that two expressions are equal, for example ${3x+5=20}$. The letter $x$ stands for an unknown number, and solving the equation means finding the number that makes it true. Equations in which the unknown appears only to the first power, such as ${3x+5=20}$ or ${2(x-1)=\frac{x}{3}+4}$, are called linear equations (older books call them simple equations). They are the first equations you learn to solve, and almost every word problem in algebra leads to one.
On this page: What is an equation · The balance rule · One-step equations · Moving terms across · Multiplying and dividing · Step by step · Fractions · Proportions · No solution or every number · Solving for a letter · Solved problems · Practice
What Is an Equation?
The two expressions in an equation are its sides: in ${3x+5=20}$ the left side is ${3x+5}$ and the right side is $20$. A number that makes both sides equal is a solution, or root, of the equation.
Example. Is ${x=5}$ a solution of ${3x+5=20}$? Put 5 in place of $x$:
${3\cdot 5+5}={15+5}={20}$ ✓
Both sides are equal, so ${x=5}$ is a solution. The number 4 is not: ${3\cdot 4+5=17}$, not 20.
Putting the answer back into the equation like this is called checking the solution. It takes a few seconds and catches most mistakes.
The Balance Rule
Think of an equation as a balanced scale. Both sides weigh the same, and the scale stays balanced as long as you do the same thing to both sides.
Taking 3 weights from both pans keeps the scale balanced: ${x+3=7}$ becomes ${x=4}$.
You get an equation with the same solutions, an equivalent equation, if you
- add the same number to both sides,
- subtract the same number from both sides,
- multiply both sides by the same number, not zero,
- divide both sides by the same number, not zero.
You may also simplify either side, for example multiply out brackets or collect like terms.
To solve an equation, use these moves to get $x$ alone on one side. The other side is then the solution.
Never multiply both sides by 0. ${x=3}$ is true for only one number, but ${0\cdot x=0\cdot 3}$ is true for every number, so the solution is lost.
One-Step Equations
If only one operation is done to $x$, undo it with the opposite operation: subtraction undoes addition, division undoes multiplication, and the other way round.
| Equation | Do this to both sides | Solution |
|---|---|---|
| ${x+7=12}$ | subtract 7 | ${x=5}$ |
| ${x-7=9}$ | add 7 | ${x=16}$ |
| ${5x=35}$ | divide by 5 | ${x=7}$ |
| ${\frac{x}{4}=3}$ | multiply by 4 | ${x=12}$ |
Example. Solve ${x-7=9}$. Add 7 to both sides:
${{x-7+7}={9+7}}$, so ${x=16}$
Check: ${16-7=9}$ ✓
Moving Terms Across the Equals Sign
Look at what happened in the last example: $-7$ disappeared from the left side, and $+7$ appeared on the right. Adding or subtracting the same number on both sides always works like this, so you can take a shortcut.
A term can move to the other side of the equation if it changes its sign: plus becomes minus, and minus becomes plus. This is called transposition.
Example 1. Solve ${5x-4=3x+10}$. Move ${3x}$ to the left and ${-4}$ to the right, changing their signs:
${{5x-3x}={10+4}}$
${{2x}={14}}$, so ${x=7}$
Check: ${5\cdot 7-4=31}$ and ${3\cdot 7+10=31}$ ✓
It doesn't matter which side ends up with $x$: if ${7=x}$, then ${x=7}$. It is usually easiest to collect the $x$-terms on the side where they stay positive.
Example 2. The same term on both sides can simply be crossed out, because that is subtracting it from both sides:
${{x+3+2x}={7+2x}}$, so ${x+3=7}$ and ${x=4}$
Example 3. You can change the signs of all the terms on both sides, because that is multiplying both sides by $-1$:
${-x+5=-3}$ is the same as ${x-5=3}$, so ${x=8}$
Multiplying and Dividing Both Sides
When $x$ is multiplied by a number, divide both sides by that number. When $x$ is divided by a number, multiply both sides by it.
Example 1. In ${-4x=-5}$, divide both sides by $-4$: ${x=\frac{5}{4}}$.
Example 2. In ${\frac{x}{6}=-2}$, multiply both sides by 6: ${x=-12}$.
Example 3. In ${\frac{2}{3}x=8}$, multiply both sides by the reciprocal of $\frac{2}{3}$:
${x}={8\cdot\frac{3}{2}}={12}$
Example 4. If $x$ is in several terms, collect them first, then divide by the whole coefficient:
${{7x-2x+x}={42}}$, so ${6x=42}$ and ${x=7}$
Divide every term. In ${2x+6=10}$ you can't divide only $2x$ by 2. Either subtract 6 first, which gives ${2x=4}$ and ${x=2}$, or divide every term by 2, which gives ${x+3=5}$ and ${x=2}$.
Solving Step by Step
Most equations need several moves. This order works for every linear equation:
- Remove brackets by multiplying out.
- Clear fractions by multiplying both sides by the least common denominator.
- Move the terms: the $x$-terms to one side and the numbers to the other.
- Collect like terms on each side.
- Divide both sides by the coefficient of $x$.
- Check the answer in the original equation.
Example 1. Solve ${16x+10-32=35-10x-5}$. First collect the numbers on each side:
${{16x-22}={30-10x}}$
${{16x+10x}={30+22}}$
${{26x}={52}}$, so ${x=2}$
Example 2. Solve ${7(3x-6)}+{5(x-3)}-{2(x-7)}={5}$.
${21x-42+5x-15-2x+14}={5}$
${{24x-43}={5}}$
${{24x}={48}}$, so ${x=2}$
Check: ${7\cdot 0+5\cdot(-1)-2\cdot(-5)}={0-5+10}={5}$ ✓
Example 3. Squares can cancel out. Solve ${(x-3)(x+4)}-{2(3x-2)}={(x-4)^2}$.
${x^2+x-12-6x+4}={x^2-8x+16}$
${x^2-5x-8}={x^2-8x+16}$
The $x^2$ terms cancel, so the equation is linear after all:
${{-5x+8x}={16+8}}$, so ${3x=24}$ and ${x=8}$
Equations with Fractions
Multiply every term on both sides by the least common denominator. The fractions disappear, and you are left with an equation without fractions.
Example 1. Solve ${\frac{3x}{4}+6=\frac{5x}{8}+7}$. The least common denominator is 8:
${{6x+48}={5x+56}}$, so ${x=8}$
Example 2. Solve ${x+\frac{x}{2}+\frac{x}{3}=11}$. Multiply by 6:
${{6x+3x+2x}={66}}$, so ${11x=66}$ and ${x=6}$
Example 3. When a numerator has several terms, put it in brackets before you multiply. Solve ${\frac{x-5}{4}+6x=\frac{284-x}{5}}$. Multiply by 20:
${5(x-5)+120x}={4(284-x)}$
${5x-25+120x}={1136-4x}$
${{129x}={1161}}$, so ${x=9}$
A minus sign in front of a fraction changes the sign of the whole numerator. In ${3x-\frac{x-4}{4}-4=\frac{5x+14}{3}-\frac{1}{12}}$, multiplying by 12 gives ${36x-3(x-4)-48}={4(5x+14)-1}$, and ${-3(x-4)}$ is ${-3x+12}$, not ${-3x-12}$. The solution is ${x=7}$.
The Unknown in a Denominator
If $x$ is in a denominator, multiply by that denominator too. A value of $x$ that makes a denominator zero can't be a solution, so always check the answer.
Example 4. Solve ${\frac{6}{10-x}+7=8}$. Multiply by ${10-x}$:
${6+7(10-x)}={8(10-x)}$
${{6+70-7x}={80-8x}}$, so ${x=4}$
Check: ${\frac{6}{6}+7=8}$ ✓, and the denominator ${10-4}$ is not zero.
Decimals
Decimals can be cleared the same way, by multiplying by 10, 100, …
Example 5. Solve ${0.5x+1.2=0.3x+2}$. Multiply by 10:
${{5x+12}={3x+20}}$, so ${2x=8}$ and ${x=4}$
Equations Written as Proportions
An equation of the form ${\frac{a}{b}=\frac{c}{d}}$ is a proportion. The quickest way to solve it is to cross-multiply: ${ad=bc}$.
Example. Solve ${\frac{x+2}{5}=\frac{x-1}{2}}$.
${{2(x+2)}={5(x-1)}}$
${{2x+4}={5x-5}}$, so ${9=3x}$ and ${x=3}$
Check: ${\frac{3+2}{5}=1}$ and ${\frac{3-1}{2}=1}$ ✓
No Solution or Every Number
Every linear equation can be brought to the form ${ax=b}$. Usually $a$ is not zero, and there is exactly one solution, ${x=\frac{b}{a}}$. But sometimes $x$ cancels out completely:
| After simplifying | Solutions |
|---|---|
| ${ax=b}$ with $a\ne 0$ | exactly one, ${x=\frac{b}{a}}$ |
| a true statement, such as ${0=0}$ or ${3=3}$ | every number is a solution |
| a false statement, such as ${0=5}$ | no solution |
Example 1. In ${5-3x=7-3x}$, moving the terms gives ${0=2}$, which is false whatever $x$ is. The equation has no solution.
Example 2. In ${3(x+1)^2-(3x+5)x=x+3}$, the left side simplifies to ${3x^2+6x+3-3x^2-5x}$, which is ${x+3}$. The equation says ${x+3=x+3}$, which is true for every number.
${0=0}$ does not mean ${x=0}$: it means that every number is a solution. And ${4x=0}$ is not "no solution": its solution is ${x=0}$.
Solving for a Letter
An equation can contain other letters besides the unknown, for example a formula. To solve for one letter, treat the others as numbers and use the same moves.
Example 1. Solve ${\frac{x}{c}+a=b}$ for $x$. Subtract $a$, then multiply by $c$:
${{\frac{x}{c}}={b-a}}$, so ${x=c(b-a)}$
Example 2. The area of a triangle is ${A=\frac{1}{2}bh}$. Solve for $h$: multiply by 2, then divide by $b$:
${{2A}={bh}}$, so ${h=\frac{2A}{b}}$
Example 3. Solve ${ax+x=h-4}$ for $x$. Factor out $x$, then divide:
${{(a+1)x}={h-4}}$, so ${x=\frac{h-4}{a+1}}$
The last step divides by ${a+1}$, which is only allowed if ${a\ne -1}$. When the coefficient of $x$ is a letter, check what happens when it is zero. The page on equations with a parameter has many examples of this.
Common Mistakes
| Wrong | Right |
|---|---|
| ✗ ${x+5=12}$, so ${x=12+5}$ | ✓ A term that moves changes its sign: $x=12-5=7$ |
| ✗ ${\frac{x}{2}+3=5}$, so ${x+3=10}$ | ✓ Multiply every term: ${x+6=10}$, so ${x=4}$ |
| ✗ ${2x+6=10}$, so ${x+6=5}$ | ✓ Divide every term: ${x+3=5}$, so ${x=2}$ |
| ✗ ${-3x=12}$, so ${x=4}$ | ✓ Divide by $-3$: ${x=-4}$ |
| ✗ $1-\frac{x-3}{5}$ becomes $5-x-3$ | ✓ The minus applies to the whole numerator: ${5-(x-3)=5-x+3}$ |
| ✗ ${4x=0}$ has no solution | ✓ Its solution is ${x=0}$ |
| ✗ ${0=0}$, so ${x=0}$ | ✓ Every number is a solution |
Solved Problems
Problem 1. Solve ${7u-9-3u+5=11u-6-4u}$.
Solution: Collect like terms on each side:
${{4u-4}={7u-6}}$
${{6-4}={7u-4u}}$, so ${2=3u}$ and ${u=\frac{2}{3}}$
Problem 2. Solve ${(x+1)^3}-{(x-1)^3}={6(x^2+x+1)}$.
Solution: Multiply out the cubes:
${x^3+3x^2+3x+1}-{(x^3-3x^2+3x-1)}={6x^2+6x+6}$
${{6x^2+2}={6x^2+6x+6}}$
${{2}={6x+6}}$, so ${6x=-4}$ and ${x=-\frac{2}{3}}$
Problem 3. Solve ${\frac{x+1}{3}-\frac{2x+5}{2}=-3}$.
Solution: Multiply by 6:
${2(x+1)-3(2x+5)}={-18}$
${{2x+2-6x-15}={-18}}$
${{-4x-13}={-18}}$, so ${-4x=-5}$ and ${x=\frac{5}{4}}$
Problem 4. Solve ${\frac{6x-1}{5}-\frac{1-2x}{2}=\frac{12x+49}{10}}$.
Solution: Multiply by 10:
${2(6x-1)-5(1-2x)}={12x+49}$
${12x-2-5+10x}={12x+49}$
${{10x}={56}}$, so ${x=5.6}$
Problem 5. Solve ${(2x-1)^2}-{x(10x+1)}={x(1-x)(1+x)}-{(2-x)^3}$.
Solution: Simplify each side separately:
${4x^2-4x+1-10x^2-x}={-6x^2-5x+1}$
${x-x^3-(8-12x+6x^2-x^3)}={-6x^2+13x-8}$
The equation becomes
${-6x^2-5x+1}={-6x^2+13x-8}$, so ${9=18x}$ and ${x=\frac{1}{2}}$
Problem 6. Solve ${\frac{6x+7}{9}+\frac{7x-13}{6x+3}=\frac{2x+4}{3}}$.
Solution: Multiply both sides by ${9(6x+3)}$:
${(6x+7)(6x+3)+9(7x-13)}={3(2x+4)(6x+3)}$
${36x^2+60x+21+63x-117}={36x^2+90x+36}$
${{123x-96}={90x+36}}$, so ${33x=132}$ and ${x=4}$
The denominator ${6\cdot 4+3=27}$ is not zero, so ${x=4}$ is the solution.
Problem 7. The function ${f(x)=x+4}$ is given. Solve ${\frac{3f(x-2)}{f(0)}+4=f(2x+1)}$.
Solution: Here ${f(0)=4}$, ${f(x-2)=x+2}$ and ${f(2x+1)=2x+5}$, so the equation is
${{\frac{3(x+2)}{4}+4}={2x+5}}$
${{3x+6+16}={8x+20}}$, so ${2=5x}$ and ${x=\frac{2}{5}}$
Problem 8. A man was asked how much he paid for his watch. He answered: "If you multiply the price by 4, add 70 and then subtract 50, you get 220 dollars." What was the price?
Solution: Let the price be $x$ dollars:
${{4x+70-50}={220}}$, so ${4x=200}$ and ${x=50}$
The watch cost 50 dollars. For more problems like this one, see equation word problems.
Practice
Try each problem, then open it to check your answer.
1. Solve ${x+9=4}$.
${x=4-9=-5}$
2. Solve ${-7x=42}$.
Divide by $-7$: ${x=-6}$
3. Solve ${\frac{x}{5}=-3}$.
Multiply by 5: ${x=-15}$
4. Solve ${3x-7=2x+5}$.
${{3x-2x}={5+7}}$, so ${x=12}$
5. Solve ${5(x-2)=3(x+4)}$.
${{5x-10}={3x+12}}$, so ${2x=22}$ and ${x=11}$
6. Solve ${40-6x-16=120-14x}$.
${{24-6x}={120-14x}}$, so ${8x=96}$ and ${x=12}$
7. Solve ${\frac{x}{3}+\frac{x}{4}=7}$.
Multiply by 12: ${4x+3x=84}$, so ${7x=84}$ and ${x=12}$
8. Solve ${3x+\frac{2x+6}{5}=5+\frac{11x-37}{2}}$.
Multiply by 10: ${30x+2(2x+6)}={50+5(11x-37)}$, so ${{34x+12}={55x-135}}$, ${147=21x}$ and ${x=7}$
9. Solve ${\frac{6x-4}{3}-2=\frac{18-4x}{3}+x}$.
Multiply by 3: ${{6x-4-6}={18-4x+3x}}$, so ${{6x-10}={18-x}}$, ${7x=28}$ and ${x=4}$
10. Solve ${2(3x-1)-3(2x+1)=6}$.
${{6x-2-6x-3}={6}}$ gives ${-5=6}$, which is false: the equation has no solution.
11. Solve ${\frac{x+2}{3}=\frac{2x-1}{5}}$.
Cross-multiply: ${{5(x+2)}={3(2x-1)}}$, so ${{5x+10}={6x-3}}$ and ${x=13}$
12. The perimeter of a rectangle is ${P=2(l+w)}$. Solve for $w$.
Divide by 2: ${\frac{P}{2}=l+w}$, so ${w=\frac{P}{2}-l}$
More practice, with new equations every time:

MENU
Linear(Simple) Equations