32.1 Systems of Linear Equations
AHL 1.16
- what a linear equation and a system of linear equations are
- what the solutions of \(2 \times 2\) and \(3 \times 3\) systems mean geometrically
- how to solve a system by hand (elimination) and with a GDC
- how to tell whether a system has one solution, no solution or infinitely many solutions
- how to form a system from a context
In examinations a system has at most three equations and three unknowns.
Linear equations and systems
A linear equation is an equation of degree 1 in its unknowns. Each unknown appears only to the power 1, and two unknowns are never multiplied together.
- \(2x + 3y = 5\) and \(x - 4y + z = 0\) are linear.
- \(x^2 + y = 3\), \(\;xy = 6\) and \(\dfrac{1}{x} + y = 2\) are not linear.
A system of linear equations is a set of linear equations that must be true at the same time (simultaneous equations). To find \(n\) unknowns we usually need \(n\) equations.
\(2 \times 2\) and \(3 \times 3\) systems Not in the formula booklet
\[ \begin{aligned} a_1x + b_1y &= c_1 \\ a_2x + b_2y &= c_2 \end{aligned} \qquad\qquad \begin{aligned} a_1x + b_1y + c_1z &= d_1 \\ a_2x + b_2y + c_2z &= d_2 \\ a_3x + b_3y + c_3z &= d_3 \end{aligned} \]
A solution is a set of values of the unknowns that makes every equation true.
- \(x, y, z\): the unknowns
- \(a_i, b_i, c_i, d_i\): constants (the coefficients and the right-hand sides)
What the solutions mean geometrically
- In a \(2 \times 2\) system, each equation is a straight line in the \(xy\)-plane. A solution is a point on both lines.
- In a \(3 \times 3\) system, each equation is a plane in 3D. A solution is a point on all three planes (see Section 22.6).
Two lines can meet in one point, be parallel, or be the same line. So a system can have exactly one solution, no solution, or infinitely many solutions.
Solving by elimination (Paper 1)
Eliminate one unknown at a time: add or subtract multiples of the equations until one equation has only one unknown. Then substitute back.
Example 1 Paper 1 Solve the system
\[ \begin{aligned} 3x + 2y &= 7 \\ 5x - 4y &= 19 \end{aligned} \]
Multiply the first equation by 2 and add it to the second, so that \(y\) is eliminated:
\[ \begin{aligned} 6x + 4y &= 14 \\ 11x &= 33 && {\color{#9F353A}\text{add } 5x - 4y = 19} \\ x &= 3 \end{aligned} \]
Substitute into the first equation: \(9 + 2y = 7\), so \(y = -1\).
Check in the second equation: \(15 - 4(-1) = 19\) ✓. The solution is \(x = 3\), \(y = -1\).
Example 2 Paper 1 Solve the system
\[ \begin{aligned} x + y + z &= 6 && (1) \\ 2x - y + z &= 3 && (2) \\ x + 2y - z &= 2 && (3) \end{aligned} \]
Eliminate \(z\) from two different pairs of equations:
\[ \begin{aligned} (1) + (3):\quad 2x + 3y &= 8 && (4) \\ (2) + (3):\quad 3x + y &= 5 && (5) \end{aligned} \]
Now (4) and (5) are a \(2 \times 2\) system. \(3 \times (5) - (4)\):
\[ \begin{aligned} 9x + 3y - (2x + 3y) &= 15 - 8 \\ 7x &= 7 \\ x &= 1 \end{aligned} \]
From (5): \(y = 5 - 3 = 2\). From (1): \(z = 6 - 1 - 2 = 3\).
Check in (2): \(2 - 2 + 3 = 3\) ✓. The solution is \(x = 1\), \(y = 2\), \(z = 3\).
How many solutions?
During elimination, look at the last equation you reach.
The number of solutions Not in the formula booklet
After elimination, the last equation has the form \(k\,z = m\).
- \(k \neq 0\): exactly one solution.
- \(k = 0\) and \(m = 0\) (the equation becomes \(0 = 0\)): infinitely many solutions.
- \(k = 0\) and \(m \neq 0\) (the equation becomes \(0 = m\), which is false): no solution.
- \(z\): the last unknown left after elimination
- \(k, m\): the numbers (or expressions) you get
A system with at least one solution is called consistent. A system with no solution is inconsistent.
When there are infinitely many solutions, let one unknown be a parameter, for example \(z = \lambda\), and write the other unknowns in terms of \(\lambda\). This is the general solution.
Example 3 Paper 1 Consider the system
\[ \begin{aligned} x + y + z &= 2 && (1) \\ x + 2y + 3z &= 5 && (2) \\ 2x + 3y + kz &= m && (3) \end{aligned} \]
where \(k, m \in \mathbb{R}\).
(a) Find the value of \(k\) for which the system does not have a unique solution.
(b) For this value of \(k\), find the value of \(m\) for which the system has infinitely many solutions.
(c) For these values of \(k\) and \(m\), find the general solution.
(a) Eliminate \(x\):
\[ \begin{aligned} (2) - (1):\quad y + 2z &= 3 && (4) \\ (3) - 2 \times (1):\quad y + (k - 2)z &= m - 4 && (5) \end{aligned} \]
Then \((5) - (4)\):
\[ (k - 4)z = m - 7 . \]
The solution is not unique when the coefficient of \(z\) is \(0\): \(\;k = 4\).
(b) When \(k = 4\) the last equation is \(0 = m - 7\). There are infinitely many solutions when \(m = 7\). (If \(m \neq 7\), it is false, and there is no solution.)
(c) Let \(z = \lambda\). From (4): \(y = 3 - 2\lambda\). From (1):
\[ \begin{aligned} x &= 2 - y - z \\ &= 2 - (3 - 2\lambda) - \lambda \\ &= -1 + \lambda \end{aligned} \]
General solution: \(x = -1 + \lambda\), \(\;y = 3 - 2\lambda\), \(\;z = \lambda\), \(\;\lambda \in \mathbb{R}\).
Check with \(\lambda = 0\): \((-1, 3, 0)\) gives \(2\), \(5\) and \(-2 + 9 + 0 = 7\) ✓.
Forming a system from a context
Some questions do not give the equations. Then you must:
- Introduce a letter for each unknown quantity (and say what it means).
- Write one equation for each piece of information in the words.
- Solve the system, and answer the question in the context.
Example 4 Paper 2 A café sells tea, cake and sandwiches.
- Order A: 2 teas, 1 cake and 1 sandwich cost $15.50.
- Order B: 1 tea, 2 cakes and 2 sandwiches cost $22.00.
- A sandwich costs $1.50 more than a cake.
Find the price of each item.
Let the prices be \(t\) (tea), \(c\) (cake) and \(s\) (sandwich), in dollars.
\[ \begin{aligned} 2t + c + s &= 15.5 \\ t + 2c + 2s &= 22 \\ -c + s &= 1.5 && {\color{#9F353A}s = c + 1.5} \end{aligned} \]
With the GDC (linSolve, see below): \(t = 3\), \(c = 4\), \(s = 5.5\).
Tea costs $3.00, cake costs $4.00 and a sandwich costs $5.50.
In a Calculator page:
- Menu → Algebra → Solve System of Linear Equations.
- In the box, choose the Number of Equations (2 or 3) and the variables (for example \(x, y, z\)), then OK.
- A
linSolvetemplate appears. Type one equation in each line and press enter. - The answer is a list in the same order as the variables. For Example 2, \(\{1, 2, 3\}\) means \(x = 1\), \(y = 2\), \(z = 3\).

linSolve template for three equations
You may type the equations as they are, for example \(s = c + 1.5\); they do not need to be rearranged.
Another way. Menu → Matrix & Vector → Simultaneous solves the system from the matrix of coefficients and the column of right-hand sides. When there is no unique solution, use Menu → Matrix & Vector → Reduced Row-Echelon Form on the augmented matrix and read the last row: a row of zeros means infinitely many solutions; a row \(\begin{pmatrix} 0 & 0 & 0 & 1 \end{pmatrix}\) means no solution.
Use the GDC on Paper 2 even when the question does not ask for it, to check an answer found by hand.
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| Eliminating \(z\) from only one pair of equations | Eliminate the same unknown from two different pairs | You need two equations in two unknowns. |
| “\(0 = 0\), so there is no solution.” | \(0 = 0\): infinitely many solutions | \(0 = 0\) is always true; \(0 = 5\) is never true. |
| Giving one solution when there are infinitely many | Use a parameter: \(z = \lambda\) | The general solution describes all the solutions. |
| Stopping at \(t = 3\), \(c = 4\), \(s = 5.5\) | Answer in the context, with units | “Tea costs $3.00, …” |
Exercises
1 Paper 1 Solve \(\;4x - 3y = 5\), \(\;2x + 5y = 9\).
\(2 \times\) (second) \(-\) (first):
\[ \begin{aligned} (4x + 10y) - (4x - 3y) &= 18 - 5 \\ 13y &= 13 \\ y &= 1 \end{aligned} \]
Then \(2x + 5 = 9\), so \(x = 2\).
2 Paper 1 Solve
\[ \begin{aligned} x + 2y + z &= 8 \\ 2x - y + 3z &= 15 \\ 3x + y - 2z &= -1 \end{aligned} \]
Call the equations (1), (2), (3). Eliminate \(y\):
\[ \begin{aligned} (1) + 2 \times (2):\quad 5x + 7z &= 38 && (4) \\ (2) + (3):\quad 5x + z &= 14 && (5) \end{aligned} \]
\((4) - (5)\): \(6z = 24\), so \(z = 4\). From (5): \(5x = 10\), so \(x = 2\). From (1): \(2y = 8 - 2 - 4 = 2\), so \(y = 1\).
Solution: \(x = 2\), \(y = 1\), \(z = 4\).
3 Paper 1 Show that the system
\[ \begin{aligned} x + y - z &= 1 \\ 2x + 2y - 2z &= 5 \\ x - y + z &= 3 \end{aligned} \]
has no solution.
Second equation \(- 2 \times\) first equation:
\[ \begin{aligned} (2x + 2y - 2z) - (2x + 2y - 2z) &= 5 - 2 \\ 0 &= 3 \end{aligned} \]
This is false, so the system is inconsistent: there is no solution. (The first two planes are parallel.)
4 Paper 1 Find the general solution of
\[ \begin{aligned} x + y + z &= 4 \\ 2x - y + z &= 3 \\ 4x + y + 3z &= 11 \end{aligned} \]
The third equation is \(2 \times\) (first) \(+\) (second), so it gives no new information: there are infinitely many solutions.
Let \(z = \lambda\). Then \(x + y = 4 - \lambda\) and \(2x - y = 3 - \lambda\). Adding:
\[ \begin{aligned} 3x &= 7 - 2\lambda \\ x &= \frac{7 - 2\lambda}{3} \end{aligned} \]
Then \(y = 4 - \lambda - x = \dfrac{5 - \lambda}{3}\).
General solution: \(x = \dfrac{7 - 2\lambda}{3}\), \(\;y = \dfrac{5 - \lambda}{3}\), \(\;z = \lambda\), \(\;\lambda \in \mathbb{R}\).
5 Paper 1 Consider the system
\[ \begin{aligned} x + y + 2z &= 3 \\ 2x - y + z &= 1 \\ x + 4y + az &= b \end{aligned} \]
Find the values of \(a\) and \(b\) for which the system has
(a) a unique solution,
(b) infinitely many solutions,
(c) no solution.
Call the equations (1), (2), (3). Eliminate \(x\):
\[ \begin{aligned} (2) - 2 \times (1):\quad -3y - 3z &= -5 && (4) \\ (3) - (1):\quad 3y + (a - 2)z &= b - 3 && (5) \end{aligned} \]
\((4) + (5)\): \(\;(a - 5)z = b - 8\).
(a) \(a \neq 5\) (any \(b\)).
(b) \(a = 5\) and \(b = 8\).
(c) \(a = 5\) and \(b \neq 8\).
6 Paper 1 Three adult tickets and two child tickets for a museum cost $54. Two adult tickets and five child tickets cost $58. Find the price of each ticket.
Let \(a\) and \(c\) be the prices in dollars of an adult and a child ticket.
\[ \begin{aligned} 3a + 2c &= 54 \\ 2a + 5c &= 58 \end{aligned} \]
\(2 \times\) (first) \(- 3 \times\) (second): \(4c - 15c = 108 - 174\), so \(-11c = -66\) and \(c = 6\). Then \(3a = 54 - 12 = 42\), so \(a = 14\).
An adult ticket costs $14 and a child ticket costs $6.
7 Paper 2 At a market, 2 apples, 3 bananas and 1 melon cost $9.10. 1 apple, 2 bananas and 2 melons cost $13.80. 3 apples, 1 banana and 1 melon cost $8.90. Find the price of each fruit.
Let \(p\), \(q\), \(r\) be the prices in dollars of an apple, a banana and a melon.
\[ \begin{aligned} 2p + 3q + r &= 9.1 \\ p + 2q + 2r &= 13.8 \\ 3p + q + r &= 8.9 \end{aligned} \]
GDC (linSolve): \(p = 0.8\), \(q = 0.5\), \(r = 6\).
An apple costs $0.80, a banana $0.50 and a melon $6.00.
8 Paper 1 The curve \(y = ax^2 + bx + c\) passes through the points \((1, 2)\), \((2, 7)\) and \((-1, 4)\). Find \(a\), \(b\) and \(c\).
Substitute each point:
\[ \begin{aligned} a + b + c &= 2 && (1) \\ 4a + 2b + c &= 7 && (2) \\ a - b + c &= 4 && (3) \end{aligned} \]
\((1) - (3)\): \(2b = -2\), so \(b = -1\). Then (1) gives \(a + c = 3\) and (2) gives \(4a + c = 9\).
Subtract: \(3a = 6\), so \(a = 2\) and \(c = 1\). The curve is \(y = 2x^2 - x + 1\).
9 Paper 1 Consider the system \(\;kx + 3y = 6\), \(\;4x + 6y = k\), where \(k \in \mathbb{R}\).
(a) Find the value of \(k\) for which the system does not have a unique solution.
(b) Show that for this value of \(k\) the system has no solution.
(a) \(2 \times\) (first) \(-\) (second):
\[ (2k - 4)x = 12 - k . \]
There is no unique solution when \(2k - 4 = 0\), that is \(k = 2\).
(b) When \(k = 2\) the last equation is \(0 = 10\), which is false. So there is no solution. (The lines \(2x + 3y = 6\) and \(2x + 3y = 1\) are parallel.)
10 Paper 1 The sum of three numbers is 24. The first number is twice the second, and the third number is 4 more than the first. Find the three numbers.
Let the numbers be \(x\), \(y\), \(z\):
\[ \begin{aligned} x + y + z &= 24 \\ x - 2y &= 0 \\ -x + z &= 4 \end{aligned} \]
Substitute \(x = 2y\) and \(z = 2y + 4\) into the first equation: \(2y + y + 2y + 4 = 24\), so \(5y = 20\) and \(y = 4\).
The numbers are \(8\), \(4\) and \(12\).