Advanced Higher Maths Systems of Equations
Page sections
Topic content
Using the augmented matrix and Gaussian elimination to solve a \(3\!\times\!3\) system of linear equations:
unique solution
no solutions (inconsistency)
infinite solutions (redundancy).
Comparing the solutions of related \(2\!\times\!2\) systems of equations and recognising ill-conditioning.
Textbook page numbers
Zeta AH Maths Textbook pp.209-218
Leckie AH Maths Textbook pp.289-293
Leckie Practice Book page 72
Buy our favourite textbook
Zeta: Advanced Higher Clear and comprehensive. Progressive exercises. Includes answers.
Buy from Zeta Press
Need a tutor for AH Maths?
Try our free, no-obligation tutor search tool.Click here to find a tutor in your area.
Example 1 (non-calculator)
Subtopic: Unique solution
Use Gaussian elimination to solve this system of equations:
\( 2x+y+z=2 \)
\( x-3y-z=5 \)
\( x+y+2z=3 \)
Show solution
We form the augmented matrix and then use elementary row operations (EROs) to reduce its left hand side to upper triangular form . When speaking of the entire augmented matrix, this is called row echelon form . In either case, the entries below the main diagonal should all be zero.
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize\cr
\small R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
2 & 1 & 1 & 2 \cr
1 & -3 & -1 & 5 \cr
1 & 1 & 2 & 3
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small R_3\!-\!R_2\normalsize\cr
\small 2R_3\!-\!R_1\normalsize
\end{array} && \left( \begin{array}{ccc:c}
2 & 1 & 1 & 2 \cr
0 & 4 & 3 & -2 \cr
0 & 1 & 3 & 4
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small\textsf{Frozen}\normalsize\cr
\small 4R_3\!-\!R_2\normalsize
\end{array} && \left( \begin{array}{ccc:c}
2 & 1 & 1 & 2 \cr
0 & 4 & 3 & -2 \cr
0 & 0 & 9 & 18
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
Now we perform back substitution , obtaining \(\raise 0.2pt{z\small,}\) \(\raise 0.2pt{y}\) and \(\raise 0.2pt{x\small,}\) in that order, as we read up the rows of the matrix.
From row 3:
$$
\begin{gather}
9z=18 \\[4pt]
z=2
\end{gather}
$$
From row 2:
$$
\begin{gather}
4y+3z=-2 \\[4pt]
4y+6=-2 \\[4pt]
4y=-8 \\[4pt]
y=-2
\end{gather}
$$
From row 1:
$$
\begin{gather}
2x+y+z=2 \\[4pt]
2x-2+2=2 \\[4pt]
2x=2 \\[4pt]
x=1
\end{gather}
$$
Example 2 (non-calculator)
Subtopic: Unique solution
The points \(\left(1,\,-4\right),\) \(\left(2,\,-2\right)\) and \(\left(3,\,10\right)\) lie on a parabola.
Find the equation of the parabola.
Show solution
The general equation of a parabola is:
$$ y=ax^2+bx+c $$
So we substitute each coordinate point \(\left(x,\,y\right)\) to obtain a system of three equations in \(\raise 0.2pt{a\small,}\) \(b\) and \(\raise 0.2pt{c}\):
$$
\begin{gather}
-4 = a(1^2)+b(1)+c \\[4pt]
-2 = a(2^2)+b(2)+c \\[4pt]
10 = a(3^2)+b(3)+c
\end{gather}
$$
These simplify to:
$$
\begin{gather}
a+b+c=-4 \\[4pt]
4a+2b+c=-2 \\[4pt]
9a+3b+c=10
\end{gather}
$$
We then form the augmented matrix and use elementary row operations to reduce it to row echelon form .
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize\cr
\small R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 1 & 1 & -4 \cr
4 & 2 & 1 & -2 \cr
9 & 3 & 1 & 10
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small R_2\!-4R_1\normalsize\cr
\small R_3\!-9R_1\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 1 & 1 & -4 \cr
0 & -2 & -3 & 14 \cr
0 & -6 & -8 & 46
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small\textsf{Frozen}\normalsize\cr
\small R_3\!-\!3R_2\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 1 & 1 & -4 \cr
0 & -2 & -3 & 14 \cr
0 & 0 & 1 & 4
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
Now we perform back substitution , obtaining \(\raise 0.2pt{c\small,}\) \(b\) and \(\raise 0.2pt{a\small,}\) in that order, as we read up the rows of the matrix.
From row 3:
$$
\begin{gather}
1c=4 \\[4pt]
c=4
\end{gather}
$$
From row 2:
$$
\begin{gather}
-2b-3c=14 \\[4pt]
-2b-12=14 \\[4pt]
-2b=26 \\[4pt]
b=-13
\end{gather}
$$
From row 1:
$$
\begin{gather}
a+b+c=-4 \\[4pt]
a-13+4=-4 \\[4pt]
a-9=-4 \\[4pt]
a=-4+9 \\[4pt]
a=5
\end{gather}
$$
So the parabola has equation: \(y=5x^2-13x+4\small.\)
Example 3 (non-calculator)
Subtopic: Redundancy
Use Gaussian elimination to show that this system of equations involves redundancy.
Obtain a parametric solution of the system of equations.
\( x+y+z=4 \)
\( 3x-y+2z=13 \)
\( 2x-2y+z=9 \)
Show solution
We start by using EROs to reduce the augmented matrix to row echelon form.
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize\cr
\small R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 1 & 1 & 4 \cr
3 & -1 & -2 & 13 \cr
2 & -2 & 1 & 9
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small R_2\!-\!3R_1\normalsize\cr
\small R_3\!-\!2R_1\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 1 & 1 & 4 \cr
0 & -4 & -1 & 1 \cr
0 & -4 & -1 & 1
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small\textsf{Frozen}\normalsize\cr
\small R_2\!-\!R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 1 & 1 & 4 \cr
0 & -4 & -1 & 1 \cr
0 & 0 & 0 & 0
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
Rows 2 and 3 being the same led to a row of zeros, so we have redundancy. As a consequence, there is no unique solution and the best we can do is to obtain equations connecting \(\raise 0.2pt{x\small,}\) \(\raise 0.2pt{y}\) and \(\raise 0.2pt{z}\) parametrically.
Start by letting \(\raise 0.2pt{z\!=\!\lambda\small,}\) say. Then from row 2:
$$
\begin{gather}
-4y-z=1 \\[4pt]
-4y-\lambda=1 \\[4pt]
-4y=\lambda+1 \\[4pt]
y=-\small\frac{\lambda+1}{4}\normalsize \\[4pt]
\end{gather}
$$
Then from row 1:
$$
\begin{gather}
x+y+z=4 \\[4pt]
x-\small\frac{\lambda+1}{4}\normalsize+\lambda=4 \\[4pt]
4x-(\lambda+1)+4\lambda=16 \\[4pt]
4x-\lambda-1+4\lambda=16 \\[4pt]
4x+3\lambda=16+1 \\[4pt]
4x=-3\lambda+17 \\[4pt]
x=\small\frac{-3\lambda+17}{4}\normalsize \\[4pt]
\end{gather}
$$
So a parametric solution is:
$$ x=\small\frac{-3\lambda+17}{4}\normalsize,\:y=-\small\frac{\lambda+1}{4}\normalsize,\:z=\lambda $$
Note: Interpreted geometrically, our three original equations represent three 2D planes. However, because of the redundancy, the three planes do not intersect at a point, but instead along a straight line. Our parametric solution gives us the parametric equations of this line.
Example 4 (non-calculator)
Subtopic: Redundancy
Use Gaussian elimination to determine the value of \(\raise 0.2pt{k}\) which leads to redundancy in this system of equations.
\( 3x-y+z=2 \)
\( x+2y+2z=6 \)
\( x-5y+kz=-10 \)
Show solution
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize\cr
\small R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
3 & -1 & 1 & 2 \cr
1 & 2 & 2 & 6 \cr
1 & -5 & k & -10
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small 3R_2\!-\!R_1\normalsize\cr
\small 3R_3\!-\!R_1\normalsize
\end{array} && \left( \begin{array}{ccc:c}
3 & -1 & 1 & 2 \cr
0 & 7 & 5 & 16 \cr
0 & -14 & 3k\!-\!1 & -32
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small\textsf{Frozen}\normalsize\cr
\small R_3\!+\!2R_2\normalsize
\end{array} && \left( \begin{array}{ccc:c}
3 & -1 & 1 & 2 \cr
0 & 7 & 5 & 16 \cr
0 & 0 & 3k\!+\!9 & 0
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
For redundancy, \(3k+9=0\) so this occurs when \(k=-3\small.\)
Recommended textbook
Zeta Maths: Advanced Higher Maths
Best price, direct from Zeta Press
Example 5 (non-calculator)
Subtopic: Inconsistency
Use Gaussian elimination on the system of equations below to give an expression for \(\raise 0.2pt{z}\) in terms of \(\raise 0.2pt{\lambda\small.}\)
For what value of \(\raise 0.2pt{\lambda}\) is this system of equations inconsistent?
\( x+2y+6z=5 \)
\( x-4y-2z=1 \)
\( x-y+\lambda z=-3 \)
Show solution
We create the augmented matrix and use EROs to reduce it to row echelon form.
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize\cr
\small R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 2 & 6 & 5 \cr
1 & -4 & -2 & 1 \cr
1 & -1 & \lambda & -3
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small R_1\!-\!R_2\normalsize\cr
\small R_1\!-\!R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 2 & 6 & 5 \cr
0 & 6 & 8 & 4 \cr
0 & 3 & 6\!-\!\!\lambda & 8
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small\textsf{Frozen}\normalsize\cr
\small 2R_3\!-\!R_2\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 2 & 6 & 5 \cr
0 & 6 & 8 & 4 \cr
0 & 0 & 4\!-\!2\lambda & 12
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
From row 3:
$$
\begin{gather}
(4-2\lambda)z=12 \\[4pt]
z=\small\frac{12}{4-2\lambda}\normalsize \\[4pt]
z=\small\frac{6}{2-\lambda}\normalsize \\[4pt]
\end{gather}
$$
The system is inconsistent when \(4\!-\!2\lambda=0\small,\) which is when \(\lambda\!=\!2\small.\)
Example 6 (calculator)
Subtopic: Ill-conditioning
Is the following system of equations ill-conditioned? Explain your answer.
\( 10x+9y=5 \)
\( 9x+8y=4 \)
Show solution
Note: A system is ill-conditioned if changing an entry in the augmented matrix by a small amount results in very different solutions.
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize
\end{array} && \left( \begin{array}{cc:c}
10 & 9 & 5 \cr
9 & 8 & 4
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small 9R_1\!-10R_2\normalsize
\end{array} && \left( \begin{array}{cc:c}
10 & 9 & 5 \cr
0 & 1 & 5
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
From row 2, \(y\!=\!5\small,\) and from row 1:
$$
\begin{gather}
10x+9y=5 \\[4pt]
10x+45=5\\[4pt]
10x=-40\\[4pt]
x=-4\\[4pt]
\end{gather}
$$
Now we make a very small change to one of the coefficients and repeat this process to find out whether or not the new solutions are close to \(x\!=\!-4\small,\normalsize\ y\!=\!5\small.\)
$$\eqalign{
10x+9y & =5\\
9x+8.001y & =4}$$
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize
\end{array} && \left( \begin{array}{cc:c}
10 & 9 & 5 \cr
9 & 8.001 & 4
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small 9R_1-10R_2\normalsize
\end{array} && \left( \begin{array}{cc:c}
10 & 9 & 5 \cr
0 & 0.99 & 5
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
From row 2, \(0.99y\!=\!5\) so \(y=\large\frac{5}{0.99}\normalsize\approx 5.06\small.\)
From row 1:
$$
\begin{gather}
10x+9y=5 \\[4pt]
10x+\frac{500}{11}=5\\[4pt]
10x=-\small\frac{445}{11}\normalsize\\[4pt]
x=-\small\frac{89}{22}\normalsize\\[4pt]
x\approx -4.05\\[4pt]
\end{gather}
$$
The values of \(\raise 0.2pt{x}\) and \(y\) have changed very little.
So this system of equations is well-conditioned (that is, not ill-conditioned).
Example 7 (calculator)
Subtopic: Ill-conditioning
Is the following system of equations ill-conditioned? Explain your answer.
\( 300x-y=-1 \)
\( 299x-y=-2 \)
Show solution
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize
\end{array} && \left( \begin{array}{cc:c}
300 & -1 & 1 \cr
299 & -1 & -2
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small 299R_1\!-300R_2\normalsize
\end{array} && \left( \begin{array}{cc:c}
300 & -1 & -1 \cr
0 & 1 & 301
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
From row 2, \(y\!=\!301\small,\) and from row 1:
$$
\begin{gather}
300x-y=-1 \\[4pt]
300x-301=-1\\[4pt]
300x=300\\[4pt]
x=1\\[4pt]
\end{gather}
$$
Now we make a very small change to one of the coefficients and repeat this process to find out whether or not the new solutions are close to \(x\!=\!1\small,\normalsize\ y\!=\!301\small.\)
$$\eqalign{
300x-y & =-1\\
299x-1.01y & =-2}$$
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize
\end{array} && \left( \begin{array}{cc:c}
300 & -1 & -1 \cr
299 & -1.01 & -2
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small 299R_1\!-300R_2\normalsize
\end{array} && \left( \begin{array}{cc:c}
300 & -1 & -1 \cr
0 & 4 & 301
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
From row 2, \(4y\!=\!301\) so \(y=75.25\small.\)
From row 1:
$$
\begin{gather}
300x-y=-1 \\[4pt]
300x-75.25=-1\\[4pt]
300x=74.25\\[4pt]
x=0.2475\\[4pt]
\end{gather}
$$
The values of \(\raise 0.2pt{x}\) and \(y\) have changed considerably.
This system of equations is therefore ill-conditioned.
Example 8 (calculator)
SQA Advanced Higher Maths 2016 Q4 Subtopic: Redundancy
Below is a system of equations:
\( x+2y+3z=3 \)
\( 2x-y+4z=5 \)
\( x-3y+2\lambda z=2 \)
Use Gaussian elimination to find the value of \(\raise 0.2pt{\lambda}\) which leads to redundancy.
Show solution
We create the augmented matrix and use EROs to reduce it to row echelon form. For redundancy, all entries in the third row will be zero.
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize\cr
\small R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 2 & 3 & 3 \cr
2 & -1 & 4 & 5 \cr
1 & -3 & 2\lambda & 2
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small R_2\!-\!2R_1\normalsize\cr
\small R_3\!-\!R_1\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 2 & 3 & 3 \cr
0 & -5 & -2 & -1 \cr
0 & -5 & 2k\!-\!3 & -1
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small\textsf{Frozen}\normalsize\cr
\small R_3\!-\!R_1\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & 2 & 3 & 3 \cr
0 & -5 & -2 & -1 \cr
0 & 0 & 2\lambda\!-\!1 & 0
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
For redundancy, \(2\lambda-1=0\small.\) This occurs when \(\lambda=\frac12\small.\)
Example 9 (non-calculator)
SQA Advanced Higher Maths 2023 Paper 1 Q3 Subtopics: Redundancy, Inconsistency
A system of equations is defined by
\( x-3y+z=-1 \)
\( 3x-2y+4z=11 \)
\(x+4y+2z=15 \)
Use Gaussian elimination to determine whether the system shows redundancy, inconsistency or has a unique solution.
Show solution
First we create the augmented matrix. Then we use Gaussian elimination to reduce it to row echelon form.
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize\cr
\small R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & -3 & 1 & -1 \cr
3 & -2 & 4 & 11 \cr
1 & 4 & 2 & 15
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small R_2\!-\!3R_1\normalsize\cr
\small R_3\!-\!R_1\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & -3 & 1 & -1 \cr
0 & 7 & 1 & 14 \cr
0 & 7 & 1 & 16
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small\textsf{Frozen}\normalsize\cr
\small R_3\!-\!R_2\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & -3 & 1 & -1 \cr
0 & 7 & 1 & 14 \cr
0 & 0 & 0 & 2
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
From row 3, we can see that the system shows inconsistency, because \(0\neq 2\small.\)
Note: We could also have concluded that the system is inconsistent at the previous stage, because \(14\neq 16\small.\)
Example 10 (calculator)
SQA Advanced Higher Maths 2024 Paper 2 Q3 Subtopics: Inconsistency, Unique solution
(a) Use Gaussian elimination to express \(z\) in terms of \(\lambda\) for the system of equations:
\( \:\:\:\:\:\:\:\:x-y-3z=1 \)
\( \:\:\:\:\:\:\:\:2x-3y-5z=8 \)
\( \:\:\:\:\:\:\:\:x+2y+\lambda z=-7 \)
(b) State the value of \(\lambda\) for which this system is inconsistent.
(c) Determine the solution of this system when \(\lambda=-1\small.\)
Show solution
(a) We create the augmented matrix and use EROs to reduce it to row echelon form.
$$
\begin{eqnarray}
\begin{array}{r}
\small R_1\normalsize\cr
\small R_2\normalsize\cr
\small R_3\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & -1 & -3 & 1 \cr
2 & -3 & -5 & 8 \cr
1 & 2 & \lambda & -7
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small R_2\!-\!2R_1\normalsize\cr
\small R_3\!-\!R_1\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & -1 & -3 & 1 \cr
0 & -1 & 1 & 6 \cr
0 & 3 & \lambda\!+\!3 & -8
\end{array} \right) \\[10pt]
\begin{array}{r}
\small\textsf{Frozen}\normalsize\cr
\small\textsf{Frozen}\normalsize\cr
\small R_3\!+\!3R_2\normalsize
\end{array} && \left( \begin{array}{ccc:c}
1 & -1 & -3 & 1 \cr
0 & -1 & 1 & 6 \cr
0 & 0 & \lambda\!+\!6 & 10
\end{array} \right) \\[10pt]
\end{eqnarray}
$$
From row 3:
$$
\begin{gather}
(\lambda+6)z=10 \\[4pt]
z=\small\frac{10}{\lambda +6}\normalsize \\[4pt]
\end{gather}
$$
(b) The system is inconsistent when \(\lambda +6=0\small,\) i.e. when \(\lambda\!=\!-6\small.\)
(c) When \(\lambda\!=\!-1\small,\) \(\lambda +6=5\small.\)
So, from row 3:
$$
\begin{gather}
5z=10 \\[4pt]
z=2
\end{gather}
$$
From row 2:
$$
\begin{gather}
-y+z=6 \\[4pt]
-y+2=6 \\[4pt]
-y=4 \\[4pt]
y=-4
\end{gather}
$$
From row 1:
$$
\begin{gather}
x-y-3z=1 \\[4pt]
x+4-6=1 \\[4pt]
x=1-4+6 \\[4pt]
x=3
\end{gather}
$$
The solution is \(x\!=\!3\small,\normalsize\ y\!=\!-4\small,\normalsize\ z\!=\!2\small.\)
Buy AH Maths revision guides
How To Pass: Advanced Higher Maths
BrightRED: AH Maths Study Guide
Past paper questions
Buy our favourite textbook
Zeta: Advanced Higher Clear and comprehensive. Progressive exercises. Includes answers.
Buy from Zeta Press
Worksheets
Buy AH Maths revision guides
How To Pass: Advanced Higher Maths
BrightRED: AH Maths Study Guide
Notes and videos