James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AA HL › Topic 1: Number & algebra › Systems of linear equations

Systems of linear equations

Solving up to three linear equations in three unknowns by elimination, recognising when there is one solution, no solution or infinitely many, and writing an infinite family of solutions using a parameter.

AHL 1.16HL onlyPaper 1Paper 2≈ 60 min to work through
Before you start: solving two simultaneous equations. See Straight lines.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Solve systems of up to three linear equations by eliminationAHL 1.16
  • Use the calculator to solve a system with a unique solutionAHL 1.16
  • Recognise systems with no solution (inconsistent)AHL 1.16
  • Recognise systems with infinitely many solutions and give the general solution with a parameterAHL 1.16
  • Find the values of unknown constants that make a system have no unique solutionAHL 1.16

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

Each linear equation in x,y,z is a restriction. Three independent restrictions usually pin down exactly one point. But the equations might contradict each other (no solution), or one might be a combination of the others and add nothing new (infinitely many solutions). This page shows how to tell which, and how to describe the answer in each case.

2.1 Solving by elimination

The aim is to reduce three equations in three unknowns to two equations in two unknowns, then to one equation in one unknown. Use pairs of equations to eliminate the same variable twice.

Worked example 1Paper 1
Solve x+y+z=6,2x−y+z=3,x+2y−z=2.
Eliminate z. (1) + (3): 2x+3y=8. (2) + (3): 3x+y=5.
z has coefficients +1 and −1, so adding removes it.
From 3x+y=5: y=5−3x. Substitute: 2x+3(5−3x)=8⇒−7x=−7⇒x=1.
y=2, and from (1), z=6−1−2=3.
Solution: x=1, y=2, z=3.
Check in all three original equations, not just the one you used last.

On Paper 2 you may solve a system with a unique solution directly on your calculator. Show the equations you entered and the answer.

2.2 One, none or infinitely many

In two dimensions, two lines either cross once, are parallel (no solution), or are the same line (infinitely many). With three unknowns, each equation describes a plane in 3D, and the same three possibilities occur (the Explore it section shows the 2D picture).

OutcomeWhat happens in eliminationGeometry (3 planes)
Unique solutionYou reach one value for each variableThe planes meet at one point
No solutionYou reach a false statement such as 0=3No point lies on all three planes
Infinitely manyOne equation becomes 0=0The planes share a whole line (or are the same plane)
Worked example 2Paper 1
Show that the system x+y+z=2,x−y+z=0,2x+2z=5 has no solution.
(1) + (2): 2x+2z=2.
But (3) says 2x+2z=5. These cannot both be true, so the system is inconsistent: there is no solution.
The left-hand sides match but the right-hand sides do not: a contradiction.

2.3 Infinitely many solutions: the general solution

If one equation is a combination of the others, you effectively have only two equations for three unknowns. One variable can take any value. Call it a parameter, λ, and express the other variables in terms of λ. This is the general solution.

Worked example 3Paper 1
Find the general solution of x+y+z=4,x−y+2z=1,3x+y+4z=9.
2×(1)+(2): 3x+y+4z=9, which is exactly (3). So (3) adds no new information.
Look for a combination of two equations that gives the third.
Let z=λ. (1) − (2): 2y−z=3⇒y=3+λ2.
From (1): x=4−y−z=5−3λ2.
General solution: x=5−3λ2, y=3+λ2, z=λ, λ∈ℝ.
Each value of λ gives one solution. Try λ=1: (1,2,1) satisfies all three equations.
What does the general solution look like?

The general solution has the form (x,y,z)=(52,32,0)+λ(−32,12,1): a fixed point plus any multiple of a direction. That is the vector equation of a line. So "infinitely many solutions" for three planes usually means they share a common line, like the pages of a book meeting at the spine. You will use this when you study planes in the vectors pages.

2.4 Systems with an unknown constant

A common question gives a system with a letter, say k, and asks for which values it has a unique solution, no solution, or infinitely many. Eliminate as usual, keeping k in the algebra. The case where a coefficient becomes zero is where the unique solution breaks down.

Worked example 4Paper 1
Consider x+2y−z=1,2x+y+z=4,x−y+kz=c. (a) Find the value of k for which the system does not have a unique solution. (b) For this k, find the value of c for which there are infinitely many solutions.
Eliminate x. (2) − 2(1): −3y+3z=2. (3) − (1): −3y+(k+1)z=c−1.
Subtract these: (k+1−3)z=c−1−2, i.e. (k−2)z=c−3.
This last equation decides everything.
(a) If k≠2, z=c−3k−2 and the solution is unique. So the system fails to have a unique solution when k=2.
(b) With k=2: 0z=c−3. If c=3 this is 0=0, giving infinitely many solutions; if c≠3 it is a contradiction, giving no solution. So c=3.
State both cases clearly: examiners award marks for each.
Worked example 5 (faded)Paper 1
The system x+y=3, 2x+2y=c has infinitely many solutions. Find c and the general solution.
The second equation must be twice the first, so c= 6  ← you work this out
Let x=λ: y= 3 − λ  ← you work this out
On your TI-Nspire Calculator tricks →

For a unique solution: menu → 3: Algebra → 7: Solve System of Equations → 2: Solve System of Linear Equations, choose 3 equations and variables x,y,z, then type the equations. If there is no unique solution, the calculator will say so or return a parameter (such as c1), but you should still show the algebra that proves it.

3Explore it

Two equations in two unknowns are two lines. Change the coefficients: lines that cross give one solution, parallel lines give none, and identical lines give infinitely many. The same three cases happen for three planes in 3D.

4Common mistakes & exam tips

Common mistakes

  • Eliminating a different variable from each pair of equations, so you are left with three unknowns again.
  • Stopping at 0=0 and saying "no solution": 0=0 means infinitely many solutions.
  • Writing the general solution without stating that the parameter can be any real number.
  • In questions with k, dividing by an expression such as k−2 without considering when it is zero.
  • Relying only on the calculator when a question asks you to show or prove the type of solution.

Exam tips

  • Number your equations (1), (2), (3) and say which you combine at each step.
  • Check a unique solution in all three equations.
  • For a general solution, check it by substituting a value of the parameter, such as λ=0 or 1.
  • For parameter questions, end with a clear sentence for each case: unique, none, infinitely many.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Solve x+y+z=2, 2x+y−z=5, x−y+2z=4.
x=3, y=−1, z=0
FluencyP2
Show that x+2y+z=1, 2x+4y+2z=5, x−y+z=0 has no solution.
Equation (2) is 2×LHS of (1) but 5≠2: contradiction.
FluencyP3
Find the general solution of x+y−z=1, 2x−y+z=5.
x=2, y=λ−1, z=λ
FluencyP4
Use your calculator to solve 2x+y−z=3, x−y+2z=9, 3x+2y+z=10.
x=3.2, y=−1, z=2.4
Problem solvingP5
For which value of k does x+y+z=3, x−y+2z=4, 2x+y+kz=c fail to have a unique solution?
k=52
Problem solvingP6
For the value of k in the previous question, find c so that there are infinitely many solutions, and find the general solution.
c=132; x=7−3λ2, y=λ−12, z=λ

6Exam-style questions

Original questions in the style of the IB exam, with full markschemes. Give yourself about 1 minute per mark.

Question 1Paper 2[3 marks]

Solve the system 2x+y−z=3,x−y+2z=9,3x+2y+z=10.

attempt to solve using the GDC or eliminationM1
x=3.2, y=−1A1
z=2.4A1
Question 2Paper 1[7 marks]

Consider the system of equations x+y+z=3,x−y+2z=4,2x+y+kz=c, where k,c∈ℝ.

  • (a)Find the value of k for which the system does not have a unique solution.[3]
  • (b)For this value of k, find the value of c for which the system has infinitely many solutions.[2]
  • (c)For these values of k and c, find the general solution.[2]
(a)
eliminating one variable from two pairsM1
e.g. −2y+z=1 and −y+(k−2)z=c−6, leading to (k−52)z=c−132A1
k=52A1
(b)
c−132=0M1
c=132A1
(c)
letting z=λM1
x=7−3λ2, y=λ−12, z=λA1
Question 3Paper 1[5 marks]

Show that the system x+y+z=4,x−y+2z=1,3x+y+4z=9 has infinitely many solutions, and find its general solution.

2×(1)+(2) gives equation (3)M1 A1
so infinitely many solutionsR1
z=λ, y=3+λ2A1
x=5−3λ2A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try real IB questions. Your school or teacher will have these papers.

PaperQuestionFocusDifficulty
May 2022 · TZ1 · Paper 1Q11(a)Showing three planes do not intersect★★☆
May 2021 · TZ1 · Paper 2Q6Solving equations of two planes for a line of intersection★★☆
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake