Advanced Higher Maths Systems of Equations
Course 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 references
Find a Maths tutor
Need a tutor for Advanced Higher Maths?Click here to find a tutor in your area.
Example 1 (non-calculator)
Use Gaussian elimination to solve this system of equations:
$$\eqalign{
2x+y+z & =2\\
x-3y-z & =5\\
x+y+2z & =3}$$
Show answer
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_2\rightarrow R_3\!-\!R_2\normalsize\cr
\small R_3\rightarrow 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 R_3\rightarrow 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)
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 answer
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\rightarrow R_2\!-\!4R_1\normalsize\cr
\small R_3\rightarrow R_3\!-9\!R_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\rightarrow 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.\)
Example 3 (non-calculator)
Use Gaussian elimination to show that this system of equations involves redundancy, and obtain a parametric solution.
$$\eqalign{
x+y+z & =4\\
3x-y+2z & =13\\
2x-2y+z & =9}$$
Show answer
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\rightarrow R_2\!-\!3R_1\normalsize\cr
\small R_3\rightarrow 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_3\rightarrow 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.
Recommended textbook
Zeta Maths: Advanced Higher Maths
Best price, direct from the publisher
Example 4 (non-calculator)
Use Gaussian elimination to determine the value of \(\raise 0.2pt{k}\) which leads to redundancy in this system of equations.
$$\eqalign{
3x-y+z & =2\\
x+2y+2z & =6\\
x-5y+kz & =-10}$$
Show answer
$$
\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 R_2\rightarrow 3R_2\!-\!R_1\normalsize\cr
\small R_3\rightarrow 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\rightarrow 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.\)
Example 5 (non-calculator)
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?
$$\eqalign{
x+2y+6z & =5\\
x-4y-2z & =1\\
x-y+\lambda z & =-3}$$
Show answer
$$
\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_2\rightarrow R_1\!-\!R_2\normalsize\cr
\small R_3\rightarrow 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 R_3\rightarrow 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)
Is the following system of equations ill-conditioned? Explain your answer.
$$\eqalign{
10x+9y & =5\\
9x+8y & =4}$$
Show answer
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 R_2\rightarrow 9R_1\!-10\!R_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 R_2\rightarrow 9R_1\!-10\!R_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{500}{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. This system of equations is well-conditioned (that is, not ill-conditioned).
Revision guides
How To Pass Advanced Higher Maths
BrightRED AH Maths Study Guide
Example 7 (calculator)
Is the following system of equations ill-conditioned? Explain your answer.
$$\eqalign{
300x-y & =-1\\
299x-y & =-2}$$
Show answer
$$
\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 R_2\rightarrow 299R_1\!-300\!R_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 R_2\rightarrow 299R_1\!-300\!R_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
Below is a system of equations:
$$\eqalign{
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 answer
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\rightarrow R_2\!-\!2R_1\normalsize\cr
\small R_3\rightarrow 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\rightarrow 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
A system of equations is defined by
$$\eqalign{
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 answer
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\rightarrow R_2\!-\!3R_1\normalsize\cr
\small R_3\rightarrow 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\rightarrow 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.\)
Need an Advanced Higher Maths tutor?
Just use this handy little widget and our partner Bark.com will help you find one.
Past paper questions
Other great resources