Table of Contents
Simultaneous equations are two (or more) equations that share the same unknowns and must all be true at the same time. You meet them in GCSE and IGCSE maths, in Class 9 and 10 in India (as pairs of linear equations in two variables), and in the US as "systems of equations". They are also one of the most useful tools in maths, because many real questions give you two clues about two unknown amounts.
This guide covers the three standard methods, elimination, substitution and graphs, with worked examples, the special cases where there is no answer or infinitely many, and how to turn a word problem into equations. A short Python solver checks every answer, including one with fractions.
What are simultaneous equations?
On its own, the equation x − y = 2 has endless solutions: x = 3 and y = 1, x = 10 and y = 8, and so on. Add a second clue, 3x + 2y = 16, and only one pair of numbers fits both: x = 4 and y = 2. Solving simultaneous equations means finding that pair.
The graph shows why. Each equation is a straight line of all the points that make it true. The solution is the one point on both lines, where they cross. That picture explains everything else in this guide, including why some pairs of equations have no solution at all.
Method 1: elimination
Elimination is the most common method in exams. You add or subtract the equations so that one unknown disappears, leaving an easy equation in the other.
- Line up the equations with x terms, y terms and numbers in columns: 3x + 2y = 16 and x − y = 2.
- Match one unknown. The y terms are +2y and −y. Multiply the whole second equation by 2 to get 2x − 2y = 4. Now the y terms are +2y and −2y.
- Add or subtract to eliminate. Opposite signs, so add: (3x + 2x) + (2y − 2y) = 16 + 4, which gives 5x = 20, so x = 4.
- Substitute back into either original equation: 4 − y = 2, so y = 2.
- Check in the other equation: 3 × 4 + 2 × 2 = 16. Correct.
Add or subtract?
Same signs, subtract. Different signs, add. If +2y and −2y, adding cancels them. If +2y and +2y, subtracting cancels them. When you subtract, subtract every term, including the numbers on the right, and take care with negatives. Our guide to negative numbers covers the sign rules if they cause trouble.
Method 2: substitution
Substitution works best when one equation already says what one unknown equals. Take y = 2x + 1 and 3x + y = 11.
- The first equation tells you y is the same as 2x + 1.
- Replace y in the second equation with 2x + 1: 3x + (2x + 1) = 11.
- Simplify and solve: 5x + 1 = 11, so 5x = 10, so x = 2.
- Substitute back: y = 2 × 2 + 1 = 5.
- Check: 3 × 2 + 5 = 11. Correct.
Substitution is also the method you need later, when one equation is not a straight line, for example a line and a curve such as y = x². Elimination cannot handle those, so it is worth being comfortable with both.
Substituting a line into a curve such as y = x² produces a quadratic equation, which may have two solutions, one or none. Our guide to how to solve quadratic equations covers the three methods for finishing the job.
Method 3: graphs
Draw both lines accurately and read off where they cross, as in the first figure. The graphical method is great for understanding, and it is quick when the answer is a pair of whole numbers. But it is only as accurate as your drawing, so when the answers are fractions it gives an estimate rather than an exact answer. That is when algebra wins.
Checking with code, including fractions
Here is a small solver that uses Python's Fraction type, so answers come out as exact fractions rather than rounded decimals. It also spots the two special cases:
from fractions import Fraction
def solve(a1, b1, c1, a2, b2, c2):
"""Solve a1*x + b1*y = c1 and a2*x + b2*y = c2 exactly."""
det = a1 * b2 - a2 * b1
if det == 0:
# parallel lines: either the same line, or they never meet
same = a1 * c2 == a2 * c1 and b1 * c2 == b2 * c1
return "infinitely many solutions" if same else "no solution"
x = Fraction(c1 * b2 - c2 * b1, det)
y = Fraction(a1 * c2 - a2 * c1, det)
return f"x = {x}, y = {y}"
print(solve(3, 2, 16, 1, -1, 2)) # 3x + 2y = 16 and x - y = 2
print(solve(2, 3, 7, 4, -3, 3)) # 2x + 3y = 7 and 4x - 3y = 3
print(solve(1, 1, 5, 2, 2, 12)) # x + y = 5 and 2x + 2y = 12
print(solve(1, 1, 5, 2, 2, 10)) # x + y = 5 and 2x + 2y = 10
x = 4, y = 2
x = 5/3, y = 11/9
no solution
infinitely many solutions
The first line confirms our worked example. The second pair, 2x + 3y = 7 and 4x − 3y = 3, has the answer x = 5/3, y = 11/9. Add the equations and the y terms cancel, giving 6x = 10, so x = 5/3. You can check it: 2 × 5/3 + 3 × 11/9 = 10/3 + 11/3 = 21/3 = 7. A graph could never give you 11/9 exactly.
When there is no solution, or infinitely many
- No solution: x + y = 5 and 2x + 2y = 12. Halve the second and you get x + y = 6. Two numbers cannot add up to both 5 and 6, so the lines are parallel and never meet. In elimination, everything cancels and you are left with something false, such as 0 = 2.
- Infinitely many solutions: x + y = 5 and 2x + 2y = 10. The second is just the first doubled, so it is the same line, and every point on it works. In elimination, you are left with something always true, such as 0 = 0.
Word problems: turning clues into equations
Most simultaneous equation questions in real life, and in exams, come as words. The skill is translating each clue into one equation. A classic puzzle: a farmyard has chickens and cows, with 30 heads and 74 legs altogether. How many of each?
Each animal has one head, so c + w = 30. Chickens have 2 legs and cows 4, so 2c + 4w = 74. Double the first equation to get 2c + 2w = 60, then subtract it from the second: 2w = 14, so w = 7 and c = 23. A quick brute-force check in code agrees, trying every possible number of chickens:
# 30 heads and 74 legs. How many chickens (2 legs) and cows (4 legs)?
for chickens in range(31):
cows = 30 - chickens
if 2 * chickens + 4 * cows == 74:
print(f"{chickens} chickens and {cows} cows")
23 chickens and 7 cows
For more help turning words into maths, our guide to solving maths word problems has a step-by-step method that works for simultaneous equations too.
Common mistakes to avoid
- Multiplying only part of an equation. When you multiply by 2, multiply every term, including the number on the right.
- Sign errors when subtracting. Subtracting −2y means adding 2y. Write each step out rather than doing it in your head.
- Stopping after one unknown. Finding x is only half the answer. Substitute back to find y.
- Not checking. Put both values into the equation you did not use to substitute back. It takes ten seconds and catches most mistakes.
Two unknowns need two clues. Each equation is a clue, and the answer is the only pair that satisfies both.
How we teach it
Simultaneous equations are a good fit for two principles on our how we teach page. We show the same problem three ways until the aha lands, and here that means elimination, substitution and a graph of the same pair of equations. And students derive the rule themselves before they ever see it written down, such as when to add and when to subtract. Our GCSE maths tuition runs one to one or in small groups of 5 to 10.
Frequently asked questions
Use elimination, substitution or a graph. In elimination, multiply the equations so one unknown has matching coefficients, then add or subtract to remove it. In substitution, rearrange one equation for one unknown and substitute it into the other. Always check your answer in both equations.
Elimination is usually quickest when both equations are in the form ax + by = c. Substitution is best when one equation already gives y = or x =, and it is the only method that works for a line and a curve. Graphs are best for understanding and estimates.
If the matching terms have different signs, add the equations. If they have the same sign, subtract. The aim is always to make one unknown cancel out completely.
Yes. If the two equations describe parallel lines, such as x + y = 5 and x + y = 6, the lines never meet and there is no solution. If they describe the same line, there are infinitely many solutions.
Draw the straight line for each equation on the same axes. The solution is the coordinates of the point where the lines cross. It works well for whole-number answers but is less precise for fractions.
Yes. In the UK and India they are usually called simultaneous equations or pairs of linear equations, and in the US they are called systems of equations. The methods are the same.
Linear simultaneous equations are taught at GCSE and IGCSE, in Class 10 in CBSE, and in Algebra 1 in the US. Harder versions with one linear and one quadratic equation appear at higher GCSE and beyond.