Solving Systems of Equations Algebraically

Algebra 2Module 2: Linear Equations, Inequalities and SystemsAlgebra

Learn solving systems of equations algebraically step by step with worked examples you can follow. Then practise with 37 instant-feedback questions. Free Algebra 2 lesson from Mr Ahmed Hamouda.

By the end of this page you will be able to solve a linear system by substitution or by elimination, choose the quicker method on sight, and recognise from your own algebra when a system has no solution or infinitely many.

Core Concepts

1. What you are actually looking for

A system of two linear equations asks one question: is there a pair of numbers (x, y) that makes both equations true at the same time?

Each equation on its own is a whole line of solutions. Asking for both at once means asking where those two lines meet. That is why the answer is written as an ordered pair, not as a single number — and it is why there are only three possible outcomes, shown in Figure 1.

Solving graphically is unreliable, which is why we do it algebraically. If the intersection lands on (−171.43, 128.57) you will never read that off a grid. Substitution and elimination give exact answers, and they work just as well when the numbers are ugly.

2. Substitution

Substitution
Solve one equation for one variable, then replace that variable in the other equation. You are left with one equation in one variable.
1
Isolate. Solve either equation for whichever variable is easiest to get alone.
2
Substitute that expression into the other equation — never back into the one you just rearranged.
3
Solve the resulting single-variable equation.
4
Back-substitute to find the second variable, and write the answer as an ordered pair.
Substituting back into the same equation gives you nothing. You will get something like −12 = −12, which is true but useless. The whole point is to carry information from one equation into the other.

Reach for substitution when one equation is already solved for a variable (y = 2x − 11), or when some variable has a coefficient of 1 so isolating it costs no fractions.

3. Elimination

Elimination
Multiply one or both equations so that one variable has opposite coefficients, then add the equations so that variable disappears.
1
Line up the equations with matching variables in matching columns.
2
Multiply one or both equations so that one variable's coefficients are opposites, such as +9y and −9y.
3
Add the equations. That variable cancels; solve for the one that survives.
4
Back-substitute into either original equation and write the ordered pair.
Multiply every term, both sides. Multiplying 6x + 7y = 2 by −3 gives −18x − 21y = −6. Forgetting the right-hand side is the classic elimination error, and it produces a confident wrong answer rather than an obvious mess.

Reach for elimination when both equations are in the form Ax + By = C, and especially when one variable already has matching or opposite coefficients.

4. Which method should I use?

Both methods always work. Picking the right one is about how much arithmetic you are willing to do — see the flowchart in Figure 3.

What the system looks likeUseWhy
One equation reads y = … or x = …SubstitutionThe work is already half done
Some variable has coefficient 1 or −1SubstitutionIsolating it creates no fractions
Both in Ax + By = C, one variable matchingEliminationAdd or subtract straight away
Both in Ax + By = C, nothing matchesEliminationMultiply both equations to build a match
Every coefficient is awkwardEitherPick one and be careful — then check

5. The two special cases — and what they look like in your working

Sometimes both variables vanish. Do not assume you have made a mistake: the equation you are left with is telling you the answer.

You get a false statement

e.g. 0 = 8, or −27.5 = −15

No solution
∅

The lines are parallel: same slope, different y-intercept. They never meet.

You get a true statement

e.g. 0 = 0, or 5 = 5

Infinitely many solutions

The two equations describe the same line. Every point on it satisfies both.
★
The test is the truth of what is left, not the fact that variables cancelled. Variables cancelling is normal in elimination — that is the goal. What matters is whether the leftover statement is true (infinitely many) or false (none). If one variable survives, you have the ordinary one-solution case.

You can also spot these before doing any work. Put both equations in y = mx + b: same m and different b means parallel and no solution; same m and same b means one line and infinitely many solutions.

6. Vocabulary

System of equations — two or more equations considered together.
Substitution — solving for one variable, then replacing it in the other equation.
Elimination — adding or subtracting equations to cancel a variable.
Consistent — the system has at least one solution.
Inconsistent — the system has no solution; the lines are parallel.
Dependent — the two equations describe the same line, so there are infinitely many solutions.

Key Figures

Figure 1 — the only three things a linear system can do
one solutionlines cross once(2, 3) no solutionparallel — same slope,different intercept infinitely manyone line drawn twice —every point works
Two straight lines have no other options. They cross exactly once, they never cross, or they lie on top of each other. Every algebraic outcome you will ever get — an ordered pair, a false statement, or a true statement — is one of these three pictures.
Figure 2 — what Example 1 is really asking
−6 −4 −2 −8 −6 −4 −2 (−2, −5) x + 2y = −12 8x − 3y = −1
The system 8x − 3y = −1 and x + 2y = −12 is solved below by substitution, and the answer is (−2, −5). Here is that same answer as a picture: the one point sitting on both lines at once. Substitution and elimination are just exact ways of finding this crossing without squinting at a grid.
Figure 3 — choosing a method in under five seconds
Look at the two equations Is one already solved for a variable, or does one have a coefficient of 1? YES NO Use SUBSTITUTION Use ELIMINATION Did both variables cancel out? false → ∅ true → infinitely many no → ordered pair
Two questions decide everything. The first picks your method; the second interprets whatever you end up with. Notice that the special cases are found at the end of the work, not the start — you discover them by doing the algebra.

Move the second line and watch the case change

The navy line is fixed at y = 2x − 1. Drag the sliders to move the green line, and watch the system flip between the three cases in Figure 1. Try to make it happen deliberately:

  • Set the slope to 2 with any other intercept. Why does the solution disappear?
  • Now set the intercept to −1 as well. Why are there suddenly infinitely many solutions?
  • Move the slope off 2 by the smallest step. Where does the intersection go, and why so far away?
y = 2x − 1 y = −x + 5

Move It Yourself

Worked Examples

Solve the system 8x − 3y = −1 and x + 2y = −12.
1x = −2y − 12Solve the second equation for x — its coefficient is 1, so no fractions appear
28(−2y − 12) − 3y = −1Substitute into the first equation
3−16y − 96 − 3y = −1Distribute the 8 across both terms
4−19y = 95Combine like terms and add 96 to each side
5y = −5Divide each side by −19
6x + 2(−5) = −12 → x = −2Back-substitute into the simpler equation
(−2, −5)
Check in both equations: 8(−2) − 3(−5) = −16 + 15 = −1 ✓ and (−2) + 2(−5) = −12 ✓. Checking only one equation would not catch a back-substitution slip — the point must sit on both lines. This is the intersection drawn in Figure 2.
Solve −5x + 2.5y = −15 and y = 2x − 11.
1−5x + 2.5(2x − 11) = −15The second equation is already solved for y — substitute it
2−5x + 5x − 27.5 = −15Distribute the 2.5
3−27.5 = −15The x-terms cancel completely
−27.5 = −15 is false, so no value of x can ever satisfy both equations. The system has no solution.
∅ — no solution; the lines are parallel
Confirm it geometrically: divide the first equation by 2.5 to get −2x + y = −6, so y = 2x − 6. The second line is y = 2x − 11. Same slope 2, different intercepts — parallel, exactly the middle panel of Figure 1.
Ms Washington needs 300 mL of a 5% HCl solution. She has a 3.5% solution and a 7% solution. How much of each should she mix?
1let x = mL of 3.5%, y = mL of 7%Name the unknowns before writing anything
2x + y = 300Total volume equation
30.035x + 0.07y = 15Total acid: 5% of 300 mL is 15 mL
4x = 300 − ySolve the volume equation for x
50.035(300 − y) + 0.07y = 15Substitute
610.5 + 0.035y = 15 → 0.035y = 4.5Distribute and simplify
7y ≈ 128.57, so x ≈ 171.43Divide, then back-substitute
About 171.4 mL of the 3.5% solution and 128.6 mL of the 7% solution
Sanity check the answer, not just the algebra: 5% sits closer to 3.5% than to 7%, so we should need more of the weak solution — and we do. The volumes also add to 300 mL ✓. Try reading this intersection off a graph and you will see why algebra wins.
Solve −2x − 9y = −25 and −4x − 9y = −23.
1both have −9yThe y-coefficients already match, so one multiplier is enough
24x + 9y = 23Multiply the second equation by −1 to make the y-terms opposite
3(−2x − 9y) + (4x + 9y) = −25 + 23Add the equations — y cancels
42x = −2 → x = −1Solve for x
5−4(−1) − 9y = −23 → y = 3Back-substitute
(−1, 3)
Check both: −2(−1) − 9(3) = 2 − 27 = −25 ✓ and −4(−1) − 9(3) = 4 − 27 = −23 ✓
Solve 2x + 5y = 1 and 3x − 4y = −10.
1nothing matchesNeither variable has matching coefficients, so multiply both equations
26x + 15y = 3Equation 1 × 3 — targeting the LCM of 2 and 3
36x − 8y = −20Equation 2 × 2 — now both x-terms are 6x
423y = 23 → y = 1Subtract the second from the first; x cancels
52x + 5(1) = 1 → x = −2Back-substitute
(−2, 1)
Check both: 2(−2) + 5(1) = −4 + 5 = 1 ✓ and 3(−2) − 4(1) = −6 − 4 = −10 ✓
Matching then subtracting, or opposing then adding? Either is fine. Making the coefficients equal and subtracting, or opposite and adding, do the same job. Most people make fewer sign errors adding, so aim for opposites if you get a choice.
Solve 18x + 21y = 14 and 6x + 7y = 2.
1−18x − 21y = −6Equation 2 × (−3) — note the right side changes too
2(18x + 21y) + (−18x − 21y) = 14 + (−6)Add the equations
30 = 8Both variables cancel
0 = 8 is false, so nothing can satisfy both equations at once. The left sides are proportional (18:21 = 6:7) but the right sides are not, which is the algebraic fingerprint of parallel lines.
∅ — no solution
Solve 3x − y = 4 and 6x − 2y = 8.
1−6x + 2y = −8Equation 1 × (−2)
2(6x − 2y) + (−6x + 2y) = 8 + (−8)Add the equations
30 = 0Both variables cancel, and what is left is true
Infinitely many solutions — every point on y = 3x − 4
Why: doubling the whole first equation produces the second exactly. They are not two lines, they are one line written two ways — the right-hand panel of Figure 1. Compare with Example 6: there the left sides were proportional but the right sides were not, which gave no solution instead.
How to write this answer. “Infinitely many” on its own is incomplete. Name the line: the solution set is all ordered pairs satisfying y = 3x − 4.

Try It Yourself

Solve each on paper, then reveal. Problems 4 and 5 are the special cases — decide which is which before you check.

Problem 1

Solve by substitution: y = 3x − 2 and 2x + y = 8.
12x + (3x − 2) = 8Substitute y = 3x − 2 into the second equation
25x = 10 → x = 2Combine like terms and add 2
3y = 3(2) − 2 = 4Back-substitute
(2, 4)
Check both: 4 = 3(2) − 2 ✓ and 2(2) + 4 = 8 ✓

Problem 2

Solve by elimination: 4x + 3y = 17 and 4x − 3y = −1.
1the y-terms are already opposites+3y and −3y — no multiplying needed
28x = 16 → x = 2Add the equations
34(2) + 3y = 17 → 3y = 9 → y = 3Back-substitute
(2, 3)
Check both: 8 + 9 = 17 ✓ and 8 − 9 = −1 ✓

Problem 3

Solve: 3x + 4y = 10 and 2x + 5y = 9.
16x + 8y = 20Equation 1 × 2 — aiming for 6x, the LCM of 3 and 2
26x + 15y = 27Equation 2 × 3
37y = 7 → y = 1Subtract the first from the second; x cancels
43x + 4(1) = 10 → x = 2Back-substitute
(2, 1)
Check both: 6 + 4 = 10 ✓ and 4 + 5 = 9 ✓

Problem 4

Solve: 2x − 6y = 10 and x − 3y = 5. What kind of system is this?
1−2x + 6y = −10Equation 2 × (−2)
2(2x − 6y) + (−2x + 6y) = 10 − 10Add
30 = 0 — a true statementBoth variables cancelled
Infinitely many solutions — every point on y = (x − 5)/3, i.e. x − 3y = 5
Spot it early: the first equation is exactly twice the second, so they were always the same line. Dividing the first by 2 gives x − 3y = 5 — identical.

Problem 5

Solve: y = 4x + 1 and 8x − 2y = 6. What kind of system is this?
18x − 2(4x + 1) = 6Substitute y = 4x + 1
28x − 8x − 2 = 6Distribute the −2 across both terms
3−2 = 6 — a false statementBoth x-terms cancelled
∅ — no solution; the lines are parallel
Confirm: 8x − 2y = 6 rearranges to y = 4x − 3. Same slope 4 as y = 4x + 1, different intercept — parallel. Compare with Problem 4: identical algebra right up to the last line, and only the truth of that line separates the two answers.

Problem 6

A school sells 210 tickets and takes $1,970. Adult tickets cost $12 and student tickets cost $7. How many of each were sold?
1let a = adult tickets, s = student ticketsName the unknowns first
2a + s = 210Ticket count
312a + 7s = 1970Money taken
4s = 210 − aSubstitution is easy here — both coefficients are 1
512a + 7(210 − a) = 1970Substitute
65a + 1470 = 1970 → a = 100Distribute, combine, then divide by 5
7s = 210 − 100 = 110Back-substitute
100 adult tickets and 110 student tickets
Check both: 100 + 110 = 210 ✓ and 12(100) + 7(110) = 1200 + 770 = 1970 ✓. Both answers are whole tickets, which a correct answer to this kind of question should be.

Summary

When you see …Do thisResult
y = … or x = … in one equationSubstitute it into the otherOne equation, one variable
A variable with coefficient 1Isolate it, then substituteNo fractions to carry
Matching coefficients (both 9y)Subtract the equationsThat variable cancels
Opposite coefficients (9y and −9y)Add the equationsThat variable cancels
No match anywhereMultiply both to reach the LCMNow they match — eliminate
One variable left after cancellingSolve, then back-substituteOne ordered pair
All variables gone, statement falseStop∅, parallel lines
All variables gone, statement trueStop and name the lineInfinitely many solutions
Same slope, different interceptRecognise it before workingNo solution
One equation is a multiple of the otherRecognise it before workingInfinitely many solutions

Every idea from this lesson

solution = ordered pair solution = intersection point substitute into the OTHER equation multiply every term, both sides false statement → ∅ true statement → infinitely many same m, different b → parallel always check in both equations
Common mistakes to avoid
  • Substituting back into the equation you just rearranged, which collapses to something like 0 = 0 and tells you nothing.
  • Multiplying the left side of an equation but forgetting the right side.
  • Stopping after finding x, and never producing the ordered pair.
  • Assuming you made a mistake when both variables cancel — that leftover statement is the answer.
  • Reporting “no solution” for 0 = 0, or “infinitely many” for 0 = 8. Check whether the statement is true or false.
  • Distributing a negative to only the first term: −2(4x + 1) = −8x − 2, not −8x + 1.
  • Checking in only one equation, which cannot detect a back-substitution error.
  • Answering “infinitely many” without naming the line the solutions lie on.
★
One idea to hold on to: substitution and elimination are two roads to the same destination — getting from two equations in two unknowns down to one equation in one unknown. Every step you take should reduce the number of variables in front of you. If a step does not do that, it is not helping.

Practice Quiz

15 questions · click an answer to check it instantly

0/15

๐Ÿ“ Test your understanding