Jugami › Algebra › Solving Linear Equations
Solving Linear Equations
Keep it balanced. Get x alone.
A gym costs $25 to join and $15 a month. You have $115. How many months can you pay for? You could guess and check, or you could write one short equation and solve it in two moves.
This page shows you how, from one-step equations to ones with fractions and x on both sides. Every idea has a worked example, problems with answers you can reveal, and a practice machine at the end.
What is an equation?
An expression is a math phrase, like 3x + 5. It doesn’t say anything is true. It’s just a quantity.
An equation is a full sentence: two expressions joined by an equals sign, like 3x + 5 = 20. It claims that the left side and the right side are the same number.
The letter x is a variable, a stand-in for a number we don’t know yet. A solution is a value of the variable that makes the equation true. Here the solution is x = 5, because 3 · 5 + 5 = 15 + 5 = 20.
To solve an equation means to find every solution. Usually there is exactly one, but you’ll see two surprising exceptions later.
What makes it “linear”?
In a linear equation the variable only appears to the first power: you see x, 4x or x/3, but never x², √x or 1/x. The name comes from graphs: each side of a linear equation graphs as a straight line.
7x − 2 = 3x + 10 is linear. x² + 1 = 10 is not; that one is a quadratic, a later unit.
The balance idea
Picture an equation as a balance scale. The equals sign is the pivot in the middle. Whatever is on the left weighs exactly as much as whatever is on the right, so the scale is level.
You can change an equation any way you like, as long as you keep the scale level. That gives the one rule behind everything on this page:
Do the same thing to both sides.
Add the same amount to both sides, subtract the same amount, multiply or divide both sides by the same number (anything but zero), and the scale stays balanced. Your goal is to end with x alone on one side. Then the other side tells you what x weighs.
The balance picture is great for whole numbers. Algebra lets us go further: negative numbers, fractions and decimals all follow the same rule, even though they’re hard to put on a scale.
Inverse operations: the undo buttons
To get x alone, you undo whatever has been done to it. Each operation has an inverse, an operation that cancels it out.
| If x has been… | Undo it by… | Example |
|---|---|---|
| added to (x + 4) | subtracting | x + 4 − 4 = x |
| subtracted from (x − 4) | adding | x − 4 + 4 = x |
| multiplied (4x) | dividing | 4x ÷ 4 = x |
| divided (x/4) | multiplying | (x/4) · 4 = x |
Remember that you must apply the inverse to both sides, not just the side with x.
One-step equations
When only one thing has been done to x, one inverse operation solves it. Write each step under the last, and say what you did.
Worked examples
Watch the sign. −x = 6 is not solved yet. It says “the opposite of x is 6.” Divide both sides by −1 (or multiply by −1) to get x = −6.
Your turn
Solve each one on paper first, then open it to check.
x − 11 = −4
−3x = 21
x/4 = −2
Two-step equations
In 3x + 5 = 20, two things happened to x: it was multiplied by 3, then 5 was added. To undo them, work backwards, like taking off your shoes before your socks. Undo the last thing first.
Worked examples
Your turn
5x − 8 = 17
4 + x/3 = 10
−4x + 1 = 13
Variables on both sides
Sometimes x shows up on both sides, like 5x − 4 = 2x + 11. The plan: first gather all the x-terms on one side, then it’s a two-step equation.
Tip: move the smaller x-term. That way the x-term you keep has a positive coefficient (the number in front of x), which means fewer negative signs to trip over.
Worked examples
Ending with 4 = x is fine. It means exactly the same as x = 4.
Your turn
7x + 2 = 4x + 14
x − 5 = 3x + 7
Distributing and combining like terms
Before you start moving things across the equals sign, tidy up each side.
- Distribute: multiply the number outside the parentheses by every term inside. 3(x − 4) = 3x − 12.
- Combine like terms: add up the x-terms with each other and the plain numbers (constants) with each other. 4x + 3 − x = 3x + 3.
Worked examples
A minus sign in front of parentheses is the trickiest case. Treat it as multiplying by a negative number, and the sign of every term inside flips.
Your turn
5(x + 2) = 3x + 18
6 − (x − 4) = 2x + 1
Equations with fractions (and decimals)
Fractions are allowed, but they’re annoying. The fastest trick is to clear the fractions right away: multiply every term on both sides by the least common denominator (LCD), the smallest number all the denominators divide into.
Worked examples
Answers can be fractions too. Not every equation comes out to a whole number, and that’s fine:
Decimals work the same way. Multiply by 10, 100 or 1000 to make them whole numbers:
Your turn
x/2 + 3 = x/5 + 6
(3x − 1)/4 = 5
Special cases: no solution, or infinitely many
Most linear equations have exactly one solution. But sometimes the x-terms cancel out completely, and you’re left with a statement that has no x in it at all. What it says tells you the answer.
No solution
The two sides can never be equal. The set of solutions is empty, sometimes written ∅.
Infinitely many solutions
An equation that is true for every value of the variable is called an identity. Try any number: if x = 10, both sides are 34.
Don’t write “x = −6” when you get −6 = −6. The variable disappeared. The answer is “all real numbers,” not one number.
Checking your answer
You never have to wonder whether your answer is right. Substitute it, meaning put it in place of x in the original equation, and work out each side separately. If the two sides match, you’re right.
Say a classmate solves 5x − 4 = 2x + 11 and gets x = 8.
| Try | Left: 5x − 4 | Right: 2x + 11 | Result |
|---|---|---|---|
| x = 8 | 40 − 4 = 36 | 16 + 11 = 27 | 36 ≠ 27, wrong |
| x = 5 | 25 − 4 = 21 | 10 + 11 = 21 | 21 = 21, correct |
Two habits make checking work. Always check in the original equation, because a mistake in your middle steps would be copied into a check that starts there. And work out each side on its own, without moving anything across the equals sign.
Word problems
Real problems don’t arrive as equations. You have to write the equation yourself. A plan that works almost every time:
- Name the unknown. “Let m = the number of months.” Any letter is fine; pick one that reminds you what it means.
- Translate the sentence into an equation. “Is,” “costs” and “equals” usually become =.
- Solve it.
- Check the answer against the words, not just the equation.
- Answer the question in a sentence, with units.
Example 1: The gym
A gym charges a $25 sign-up fee plus $15 per month. You have $115. How many months can you pay for?
Check: $25 + 6 × $15 = $25 + $90 = $115. ✓ You can pay for 6 months.
Example 2: Which taxi?
Taxi A charges $3 plus $2 per mile. Taxi B charges $6 plus $1.50 per mile. For what trip length do they cost the same?
Check: A costs 3 + 12 = $15 and B costs 6 + 9 = $15. ✓ At 6 miles they cost the same. For shorter trips Taxi A is cheaper; for longer ones, Taxi B.
Example 3: Consecutive integers
Three consecutive integers (whole numbers in a row) add up to 78. What are they?
The numbers are 25, 26 and 27. Check: 25 + 26 + 27 = 78. ✓
Your turn
A rectangle’s length is 3 more than twice its width. Its perimeter is 54 cm. Find its width and length.
Width 8 cm, length 2(8) + 3 = 19 cm. Check: 2(8) + 2(19) = 16 + 38 = 54 ✓
Maya has $40 saved and adds $12 a week. Jon has $88 and adds $4 a week. After how many weeks will they have the same amount?
After 6 weeks. Check: Maya has 40 + 72 = $112 and Jon has 88 + 24 = $112 ✓
Common mistakes
Practice problems with answers
Fourteen problems, from easy to tricky. Solve each on paper, then open it to compare your steps. Your steps don’t have to match ours exactly; any order that keeps the balance works.
- x + 13 = 4
Show answer
x = 4 − 13Subtract 13x = −9Check: −9 + 13 = 4 ✓ - 6x = −42
Show answer
x = −42 ÷ 6Divide by 6x = −7Check: 6(−7) = −42 ✓ - 2x − 7 = 9
Show answer
2x = 16Add 7x = 8Divide by 2. Check: 16 − 7 = 9 ✓ - x/3 + 5 = 1
Show answer
x/3 = −4Subtract 5x = −12Multiply by 3. Check: −4 + 5 = 1 ✓ - 9 − x = 14
Show answer
−x = 5Subtract 9x = −5Divide by −1. Check: 9 − (−5) = 14 ✓ - 8x − 3 = 5x + 12
Show answer
3x − 3 = 12Subtract 5x3x = 15Add 3x = 5Divide by 3. Check: 37 = 37 ✓ - 4(x − 1) = 2x + 6
Show answer
4x − 4 = 2x + 6Distribute2x = 10Subtract 2x, add 4x = 5Divide by 2. Check: 16 = 16 ✓ - 3(2x + 1) − 4x = 11
Show answer
6x + 3 − 4x = 11Distribute2x + 3 = 11Combine like termsx = 4Subtract 3, divide by 2. Check: 27 − 16 = 11 ✓ - x/4 − x/6 = 2
Show answer
3x − 2x = 24Multiply every term by 12x = 24Combine. Check: 6 − 4 = 2 ✓ - 6x − 4 = 2x + 5
Show answer
4x = 9Subtract 2x, add 4x = 9/4Divide by 4 (that’s 2.25). Check: 9.5 = 9.5 ✓ - 5x + 2 = 5(x − 1)
Show answer
5x + 2 = 5x − 5Distribute2 = −5Subtract 5x: falseNo solution - 2(3x − 4) = 6x − 8
Show answer
6x − 8 = 6x − 8Distribute: both sides identical−8 = −8Subtract 6x: always trueAll real numbers - Twice a number, plus 7, is 3 less than four times the number. Find the number.
Show answer
2n + 7 = 4n − 3Let n = the number10 = 2nSubtract 2n, add 3n = 5Divide by 2. Check: 17 = 17 ✓ - Streaming plan A costs $30 for the device plus $9 a month. Plan B has no device fee but costs $14 a month. After how many months do they cost the same?
Show answer
30 + 9m = 14mLet m = months30 = 5mSubtract 9mm = 6Divide by 5. Both cost $84 ✓
A short history: where “algebra” comes from
The word algebra comes from a book written in Baghdad about 1,200 years ago.
Its author, Muhammad ibn Musa al-Khwarizmi (born around 780, died around 850), was a scholar at the House of Wisdom, a center of learning and translation supported by the caliph al-Ma’mun. Around the 820s he wrote al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr wa’l-muqābala, usually translated as The Compendious Book on Calculation by Completion and Balancing.
The book was meant to be practical. Al-Khwarizmi said it would teach the arithmetic people need for inheritances, lawsuits, trade, and measuring land. It solves linear and quadratic equations step by step, and backs up the methods with geometric drawings.
Two operations in the title should sound familiar:
- al-jabr (“restoring” or “completing”): getting rid of a subtracted term by adding it to both sides. In modern symbols, 5x − 3 = 12 becomes 5x = 15.
- al-muqābala (“balancing”): taking away equal amounts from both sides so each kind of term appears only once. 7x + 4 = 2x + 19 becomes 5x = 15.
Those are exactly the balance moves on this page. But al-Khwarizmi wrote them in a different way. His algebra used no symbols at all. Everything, even the numbers, was written out in words: “squares,” “roots” (our x) and plain “numbers.” The examples above are our modern translation.
In 1145, Robert of Chester translated the book into Latin, and the word al-jabr became algebra. Another of al-Khwarizmi’s books, on calculating with Hindu-Arabic numerals, survives only in Latin as Algoritmi de numero Indorum. His Latinized name, Algoritmi, gave us the word algorithm.
And the equals sign?
It’s much younger than algebra. The Welsh mathematician Robert Recorde introduced “=” in his 1557 book The Whetstone of Witte, choosing two parallel lines “bicause noe 2 thynges can be moare equalle.” Before that, writers spelled out “is equal to” in words.
How do we know?
Al-Khwarizmi’s own Arabic text survives in later manuscript copies, and historians compare it with the medieval Latin translations. We know little about his life, and historians still disagree about details, such as where his family came from. Dates like “about 780” are estimates.
Practice: Solve It
A new equation every time, with hints and a full step-by-step solution. Choose a level, or mix them all. Type your answer as a number (like 7, −3, 5/2 or 2.5), or use the buttons for the special cases.
Sources
- J. J. O’Connor and E. F. Robertson, MacTutor History of Mathematics, University of St Andrews: Al-Khwarizmi biography (life, the House of Wisdom, al-jabr and al-muqabala, the purpose of the book) and Robert Recorde biography (the equals sign, 1557).
- Encyclopaedia Britannica: al-Khwārizmī (dates, the book’s title, the Latin Algoritmi de numero Indorum and the word “algorithm”).
- The Compendious Book on Calculation by Completion and Balancing (Wikipedia), for the date of composition, the words-only style, and Robert of Chester’s 1145 Latin translation.
- Frederic Rosen, trans., The Algebra of Mohammed ben Musa (London: Oriental Translation Fund, 1831), the first English translation of al-Khwarizmi’s algebra.
- Common Core State Standards for Mathematics, High School Algebra: Reasoning with Equations and Inequalities (A-REI.A.1, A-REI.B.3), which this lesson supports.
Credits: all illustrations and diagrams on this page are original SVG drawings made for Jugami. Every worked example and answer was checked by substituting it back into the original equation.