2. Linear Equations in One Variable
Before you start
- Apply PEMDAS and distribute negative coefficients without sign errors
- Combine like terms across an expression of up to six terms
- State what 'isolate the variable' means in your own words
- Substitute a numerical value back into an expression to verify equality
By the end you'll be able to
- Solve any single-variable linear equation in 4-6 mechanical steps with a written verification line
- Distribute negative coefficients across grouped terms before combining like terms
- Identify equations with no solution (contradiction) versus infinitely many (identity)
- Translate a one-sentence word problem into a linear equation and solve it
- Decide when to clear fractions by multiplying through by an LCD before isolating x
Solving Multi-Step Linear Equations
A multi-step linear equation has variables on both sides, parentheses to distribute, and like terms to combine. Mastering this is the prerequisite to every algorithm in machine learning that involves “isolating a parameter” — which is most of them.
The procedure
There’s a single, mechanical procedure that solves every multi-step linear equation. Follow it in order; do not skip steps mentally.
- Distribute every coefficient across its parentheses. Watch the sign on the coefficient carefully — a negative outside the parentheses changes the sign of every term inside.
- Combine like terms on each side of the equation independently.
- Move all variable terms to one side by adding or subtracting.
- Move all constant terms to the other side by adding or subtracting.
- Divide by the coefficient on the variable.
Worked example
Solve for
Step 1 — distribute. The two coefficients on the left are
← the negative carries to both terms ← same: the negative flips both signs
After distribution:
Step 2 — combine like terms.
Step 3 — variable to one side. Subtract
Step 4 — constant to the other side. Add
The classic trap
The single most common error in this kind of problem is failing to distribute a negative sign. There are two specific places it bites:
is , not . is , not .
If you wrote the wrong distribution and proceeded, you might land at
Why this matters for ML
- Algebraic structure learned. Distribute, combine, isolate — a deterministic procedure for solving any linear equation, with sign discipline as the non-negotiable habit.
- ML object with the same structure. Backpropagation cascades the chain rule across layers; each step distributes partial derivatives across sums and products — the same algebra, scaled to thousands of terms per layer.
- Computational payoff. A single dropped negative sign flips a gradient and pushes weights away from the optimum: training diverges silently. The sign-discipline muscle you train here is what keeps a from-scratch two-layer network actually learning instead of drifting.
Common mistakes
These are the traps learners hit most often on this topic. Knowing them in advance is half the fix.
Skipping the verification step
Even on simple equations, substitute your answer back into the original equation. A wrong sign halfway through becomes invisible until you check.
Combining unlike terms
You can combine
3xand5xinto8x, but not3xand5x²— the powers differ. Pay attention to the exponent before merging.Dividing the wrong side first
Always undo addition/subtraction before division.
2x + 6 = 14becomes2x = 8, thenx = 4. Dividing first turns it intox + 3 = 7, which works but adds an unnecessary step.
Practice problems
Try each on paper first. Click Show solution only after you've made a real attempt.
- Problem 1Solve for
: . Show solution
- Add 3 to both sides:
. - Divide by 5:
. - Verify:
.
Answer:
. - Add 3 to both sides:
- Problem 2Solve:
. Show solution
- Distribute:
. - Add 2:
. - Divide by 3:
.
Answer:
. - Distribute:
- Problem 3Solve:
. Show solution
- Subtract
from both sides: . - Subtract 3:
. - Divide by 3:
.
Answer:
. - Subtract
- Problem 4Solve:
. Show solution
- Distribute:
. - Subtract
from both sides: .
That is a contradiction. No solution — the lines are parallel.
- Distribute:
- Problem 5Solve:
. Show solution
- Subtract 1:
. - Multiply by 4:
.
Answer:
. - Subtract 1:
- Problem 6Solve:
. Show solution
- LCD = 6. Multiply both sides:
. - Distribute:
. - Subtract
, add 2: .
Answer:
. - LCD = 6. Multiply both sides:
- Problem 7A number tripled, less 7, equals 14. Find the number.
Show solution
Set up:
. Add 7: . Divide: . Answer:
.
Practice quiz
- Question 1Solve: 2x - 7 = 11
- Question 2Solve: 3(x - 2) = 12
- Question 3Solve: 5x = 2x + 9
- Question 4Which equation has no solution?
- Question 5Solve: 4(x + 1) - 2x = 14
- Question 6Solve: -3(x - 4) = 6
- Question 7Solve: x/3 - 1 = 4
- Question 8Which describes 0 = 0 after simplification?
- Question 9Solve: 2(3x - 1) - 5(x + 2) = -3
- Reflection 10How does isolating x relate to gradient descent?
Week 2 recap
You used inverse operations to isolate variables in single-variable linear equations, worked through distribution with negative coefficients, combined like terms safely, and recognized the two diagnostic shapes that signal special cases: a contradiction like 2 = 5 marks no solution, and an identity like 0 = 0 marks infinitely many. You also rehearsed clearing fractions via the least common denominator before isolating, a habit that saves steps when denominators repeat. You neutralized three trap families: the half-step trap (stopping before the final inverse), the skip-distribution trap (forgetting to multiply through), and the identity-vs-contradiction confusion (mistaking infinitely many for none). Each outcome supports later coursework: isolation extends to systems next week, distribution underwrites polynomial expansion, and verification by substitution becomes essential when squaring or multiplying through by variable expressions can introduce false roots.
Coming next: Week 3 — Linear Inequalities & Interval Notation
Next week swaps the equality sign for inequality symbols. You will solve linear inequalities, learn the single rule unique to inequalities — multiplying or dividing by a negative reverses the direction — and translate fluently between inequality notation, interval notation, and number-line graphs. Compound inequalities (AND for intersection, OR for union) introduce the union and intersection language used later in probability and feasible-region analysis for optimization problems.
Saved in your browser only — no account, no server.