Lesson 10: System of Linear equations with two or three variables and their solutions
Lesson Objective
Dear learner,
by the end of this lesson you will be able to:
- Find associated augmented matrix of a linear system of equations
- Solve systems of equations in two or three variables using the elementary operations
- Determine inverse of a square matrix by using elementary row operations
- Apply principles of matrices to solve problems solve real life problems by using matrices concept
Key Terms
- Augmented matrix
- one solution
- no solution
- many solution
Brainstorming Activity
Dear learner, give a brief description for the following question.
- The sum of two numbers is 54 and their difference is 20. Then find the two numbers?
Solution:
you can solve this problem by defining the variables and sormulating equations as:
let $x$ and $y$ be the two numbers, then:
the sum of this numbers is 54 $\implies$ $x+y = 54$
the difference of this numbers is 20 $\implies$ $x – y = 20$.
therefore, the matrix form is of the form:
$\begin{pmatrix}1&1\\1&-1\end{pmatrix}$ $\begin{pmatrix}x\\y\end{pmatrix}$ = $\begin{pmatrix}54\\20\end{pmatrix}$
or $x+y =54$ and $x-y =20$ $\implies$ $x = 37$ and $y =17$
3.1. System of Linear Equations
Definition:
Let $a_ij, b_j \in \mathbb{R}$ for i = 1, 2, 3, ….,m and j = 1, 2, 3, …, n. Afinite set of linear equations:
$\begin{cases}a_{11}x_{1} + a_{12}x_{2} + a_{13}x_{3} +…+ a_{1n}x_{n} &= b_{1} \\
a_{21}x_{1} + a_{22}x_{2} + a_{23}x_{3} +…+ a_{2n}x_{n}& = b_{2}\\ a_{31}x_{1} + a_{32}x_{2} + a_{33}x_{3} + …+ a_{3n}x_{n}& = b_{3}\\…\\..\\ a_{m1}x_{1} + a_{m2}x_{2} + a_{m3}x_{3} + … + a_{mn}x_{n}& = b_{m}\end{cases}$
is said to be a system of linear equations with n variables $x_{1}, x_{2}, x_{3},…., x_{n}$
Example 1:
Let the following equations be given tell about the number of variables and equations
a). $\begin{cases}4x_{1} + 5x_{2} + x_{3}& =0 \\
2x_{1} + 8x_{2} + 9x_{3}& =0\\2x_{1} + 5x_{2} + 6x_{3}&=0\\x_{1} + 7x_{2} + 4x_{3}&=0\end{cases}$
b). $\begin{cases}4x_{1} + 5x_{2} + x_{3} + x_{4}&=0 \\
2x_{1} + 8x_{2} + 9x_{3} + 2x_{4}& =8\\2x_{1} + 5x_{2} + 6x_{3} + 6x_{4}& = 3\\x_{1} + 7x_{2} + 4x_{3} + 2x_{4}& = 9\end{cases}$
Solution:
a) . the system has 4 equations and 3 – variables. the system is said to be homogenous system of equations.
b). the system has 4 equations and 4 – variables.
Note:
In the linear system, $\begin{cases} a_{11}x_{1} + a_{12}x_{2} + a_{13}x_{3} + … + a_{1n}x_{n}:& = b_{1} \\
a_{21}x_{1} + a_{22}x_{2} + a_{23}x_{3} + … + a_{2n}x_{n}& = b_{2}\\a_{31}x_{1} + a_{32}x_{2} + a_{33}x_{3} + … + a_{3n}x_{n}& = b_{3}\\ …\\…\\a_{m1}x_{1} + a_{m2}x_{2} + a_{m3}x_{3} + … + a_{mn}x_{n}& = b_{m}\end{cases}$
where $\begin{pmatrix}b_{1}\\b_{2}\\b_{3} .\\.\\.\\b_{m}\end{pmatrix}$ are all zero, then the system is a homogenous system of linear equations.
and $\begin{pmatrix}b_{1}\\b_{2}\\b_{3} .\\.\\.\\b_{m}\end{pmatrix}$ are non-zero, then the system is a non-homogenous system of equations.
The above system of linear equation can also be written as:
AX = B, where $A = \begin{pmatrix}a_{11}&a_{12} &a_{13} & … &a_{1n}\\a_{21} &a_{22}&a_{23}& …&a_{2n}\\.\\.\\.\\a_{m1}& a_{m2}& a_{m3}…. &a_{mn}\end{pmatrix}$ is the coefficient matrix
$X = \begin{pmatrix}x_{1}\\x_{2}\\x_{3}\\.\\.\\x_{n}\end{pmatrix}$ is the variable vector whereas $B =\begin{pmatrix}b_{1} \\b_{2}\\b_{3}\\.\\.\\.\\b_{m}\end{pmatrix}$ is the constant vector(matrix).

Example 2:
Find the cofficient and Augmented matrix of the system:
$\begin{cases}x + y+ z = 8\\x+2y = 5\\y +3z =9\end{cases}$
Solution:
a). The coefficient matrix for the system is $A = \begin{pmatrix}1&1&1\\1&2&0\\0&1&3\end{pmatrix}$
b). The constant matrix for the system is B = $\begin{pmatrix}8\\5\\9\end{pmatrix}$
c). The Augmented matrix is A|B = $\begin{pmatrix}1&1&1&:8\\1&2&0&:5\\0&1&3&:9\end{pmatrix}$
https://www.geogebra.org/m/vshv3vnf
3.2. Solutions of System of Linear Equations
There are different methods of finding solutions
- Elimination method
- Gauss- method
- Gauss-Jordan method
- Elimination method: This method is effective on 3-4 number of equations and variables.
Example 3:
Solve the system$\begin{cases}x+y+z =3\\x-2y+z =1\\3x+2y – 3z =4\end{cases}$
Solution:
First take the first and second equations together you have $\begin{cases}x+y+z =3\\x-2y+z = 1\end{cases}$
$\implies$ x = 3-y-z and substituting in to second equation 3- y -z -2y +z =1 implies $y = \frac{2}{3}$
Second take the second and third equation$\begin{cases}x -2y +z = 1\\3x +2y -3z =4\end{cases}$
$\implies$ x = 1+2y -z then substituting it in to the second equation gives 3(1+2y-z)+2y-3z=4 implies z = 13/18.
On the third step take the first and second equations from the original system you have determine the value of x.
thus $\begin{cases}x+y+z =3\\3x+2y-3z =4\end{cases}$ then x = 3-y-z substituting it into the second equation:
x = 3-2/3 -13/18 = 29/18.
Therefore solution of the system (x y z) = ($\frac{29}{18}$ $\frac{2}{3}$ $\frac{13}{18}$)
2.Gaussian Method
Gauss used elementary row / column operations on augmented matrix
- Swipping :- interchanging rows of a matrix$R_{i}\leftrightarrow R_{j}$
- Re-scaling: – multiply a row of a matrix by non zero constant $R_{i}\rightarrow kR_{i}$
- Pivoting: – add constant multiple of one row to an other row $R_{j}\rightarrow R_{j} +kR_{i}$
Example 4:
Solve the system$\begin{cases}x+y+z =3\\x-2y+z =1\\3x+2y – 3z =4\end{cases}$
First determine the augmented matrix: $\begin{pmatrix} 1&1&1&:3\\1&-2&1&:1\\3&2&-3&:4\end{pmatrix}$
$R_2 \rightarrow R_2 + (-1)R_1$ $\begin{pmatrix}1&1&1&:3\\0&-3&0&:-2\\3&2&-3&:4\end{pmatrix}$
$\implies R_3 \rightarrow R_3 + (-3)R_1$ $\begin{pmatrix}1&1&1&:3\\0&-3&0&:-2\\0&-1&-6&:-5\end{pmatrix}$
$\implies R_3 \rightarrow R_3 + (-1/3)R_2$ $\begin{pmatrix}1&1&1&:3\\0&-3&0&:-2\\0&0&-6&:-13/3\end{pmatrix}$ it shows that the coefficient matrix is in its echelon form.
use back substitution to determine the values of x, y and z as :
$\begin{pmatrix}1&1&1&:3\\0&-3&0&:-2\\0&0&-6&:-13/3\end{pmatrix}$ $\implies$ $\begin{cases}x + y +z = 3\\-3y = -2\\-6z = \frac{-13}{3}\end{cases}$ $\implies$ $z = \frac{13}{18}$, $y = \frac{2}{3}$ and $x = \frac{29}{18}$
therefore the solution is $\begin{pmatrix}x\\y\\z\end{pmatrix}$ = $\begin{pmatrix} \frac{29}{18}\\ \frac{2}{3}\\ \frac{13}{18}\end{pmatrix}$
3.Gauss – Jordan method :
This method uses the method of row reduced echelon (RREF).
Eliminate until coefficient matrix is changed into an identity matrix
Example 5
Solve the system$\begin{cases}x+y+z =3\\x-2y+z =1\\3x+2y – 3z =4\end{cases}$
First determine the augmented matrix: $\begin{pmatrix} 1&1&1&:3\\1&-2&1&:1\\3&2&-3&:4\end{pmatrix}$
$R_2 \rightarrow R_2 + (-1)R_1$ $\begin{pmatrix}1&1&1&:3\\0&-3&0&:-2\\3&2&-3&:4\end{pmatrix}$
$\implies R_3 \rightarrow R_3 + (-3)R_1$ $\begin{pmatrix}1&1&1&:3\\0&-3&0&:-2\\0&-1&-6&:-5\end{pmatrix}$
$\implies R_3 \rightarrow R_3 + (-1/3)R_2$ $\begin{pmatrix}1&1&1&:3\\0&1&0&:2/3\\0&-1&-6&:-5\end{pmatrix}$
$R_3 \rightarrow (-1/6)R_3$ $\begin{pmatrix}1&1&1&:3\\0&1&0&:2/3\\0&0&1&:13/18\end{pmatrix}$ $R_1 \rightarrow R_1 – R_2$ $\begin{pmatrix}1&0&1&:7/3\\0&1&0&:2/3\\0&0&1&:13/18\end{pmatrix}$
$R_1 \rightarrow R_1 – R_3$ $\begin{pmatrix}1&0&0&:29/18\\0&1&0&:2/3\\0&0&1&:13/18\end{pmatrix}$ here the coefficient matrix is changed in to RREF so thatyou can take the solution directely as:
$\begin{pmatrix}x\\y\\z\end{pmatrix}$ = $\begin{pmatrix} \frac{29}{18} \\ \frac{2}{3}\\ \frac{13}{18}\end{pmatrix}$
3.3. Different Solutions of System of Linear Equations
There are three solution types
- Unique (one) solution ( consistent system)
- Many solution ( dependent, consistent system)
- No solution ( inconsistent system)
1. Unique (one ) solution
§ A linear system has unique solution if and only if it has only one solution.
Example 6:
Solve $\begin{cases}3x+4y = 6\\x – 2y = 1\end{cases}$
Solution:
Let $l_{1}:3x+4y = 6$ and $l_{2}: x -2y = 1$ be two lines and $l_{1}$ and $l_{2}$ intersects at apoint then the system has one solution.
To do so Draw the graph of two lines and determine the intersection point by solving the two equations symoultinously as:
x = 1+2y and substitute to the second equation 3(1+2y) +4y =6 implies $y = \frac{3}{10}$ and x = 1+$2(\frac{3}{10}$ = $\frac{8}{5}$
therefore the intersection point which is $(\frac{8}{5}, \frac{3}{10})$ is the solution of the system as shown below in the graph.

fig 3.1. graph showing one solution
NOTE:
For a linear system, if the number of non-zero rows of the augmented matrix A/B and coefficient matrix A are the same and are equal to the number of rows before reduction, then the system has unique(one) solution.
2.Many(infinite) solution: The last row of reduced augmented matrix is zero. Graph of equations coincide to each other.
Example 7:
soolve $\begin{cases}2x -3y =1\\4x -6y = 2\end{cases}$ graphically
Solution:
First solve the two equations by substitution:
Let x =$\frac{1+3y}{2}$ and substitute in to the second equation $4(\frac{1+3y}{2}) -6y = 2$ $\implies$ 2 =2 shows the two lines overlap to each other.therefore the system has infinite solutions

fig 3.2. graph showing many solution
b). solve the linear system$\begin{cases}x+y -3z = 3\\x -3y +2z = 5\\2x -2y -z =8\end{cases}$ using Gauss method?
Solution:
Let $A\B = \begin{pmatrix}1&1&-3&3\\1&-3&2&5\\2&-2&-1&8\end{pmatrix}$ be the augmented matrix then
$R_2 \rightarrow (-1)R_1 + R_2$
$R_3 \rightarrow (-2)R_1 + R_3$ $\begin{pmatrix}1&1&-3&3\\0&-4&5&2\\0&-4&5&2\end{pmatrix}$
$R_3 \rightarrow (-1)R_2 + R_3$ $\begin{pmatrix}1&1&-3&3\\0&-4&5&2\\0&0&0&0\end{pmatrix}$
As seen from the above the last row is all zero. Therefore the ststem has many solutions (dependent).
Using back substitution you can determine the solution as:
from the second row -4y + 5z = 5 and consider z = t for any real number t
implies -4y +5t = 5 $\implies$ $y = \frac{-5}{4}(t – 1)$ and from the first row x +y – 3z = 3 $\implies$ $ x= 3 – y +3z$ $\implies$ $x = \frac{7t}{4} + \frac{17}{4}$
therefore the solution becomes $\begin{pmatrix} x\\y\\z\end{pmatrix}$ = $\begin{pmatrix} \frac{7t}{4} + \frac{17}{4}\\ \frac{-5}{4}(t – 1)\\ t\end{pmatrix}_{t\in \mathbb{R}}$
3.No Solution ( Inconsistent): The system has no set of values satisfying the equations symaultinously. The lines do not intersect at all.
Example 8:
a). solve $\begin{cases}x+2y =5\\3x+6y = 8\end{cases}$ graphically
Solution:
determine the intersection point of the two lies$l_{1}: x +2y = 5$ and $l_{2}: 3x+6y = 8$
from the first equation x = 5 -2y and substitute in to the second equation 3(5 – 2y) +6y =8
implies 15 -6y+6y =8 resulta 15 = 8 is false. therefore the two lines do nt intersect and the system has no solution

fig.3.3. graph showing no solution
b). Solve the system
$\begin{cases}x +y +-3z =3\\x _ 3y +2z =5\\2x -2y – z =6\end{cases}$
Solution:
The augmented matrix$A|B = \begin{pmatrix}1&1&-3&3\\1&-3&2&5\\2&-2&-1&6\end{pmatrix}$
then $R_{2}\rightarrow-R_{1} +R_{2}$
$R_{3}\rightarrow-2R_{1} +R_{3}$ $\begin{pmatrix}1&1&-3&3\\0&-4&5&2\\0&-4&5&0\end{pmatrix}$
$R_{3}\rightarrow-R_{2} +R_{3}$ $\begin{pmatrix}1&1&-3&3\\0&-4&5&2\\0&0&0&-2\end{pmatrix}$
the reduced form shows that the number of non-zero rows on A is less than the number of non-zero rows in A|B. therefore the system has no solution.
NOTE:
- For a linear system, if the number of non-zero rows of coefficient matrix A is less than number of non-zero rows of aaaaaaaaugmented matrix A|B after reduction, then the system has no solution.
- The system $\begin{cases} a_{11}x_{1} + a_{12}x_{2} + a_{13}x_{3} + … + a_{1n}x_{n} = 0 \\a_{21}x_{1} + a_{22}x_{2} + a_{23}x_{3} + … + a_{2n}x_{n}& = 0\\a_{31}x_{1} + a_{32}x_{2} + a_{33}x_{3} + … + a_{3n}x_{n}& = 0\\ …\\…\\a_{m1}x_{1} + a_{m2}x_{2} + a_{m3}x_{3} + … + a_{mn}x_{n}& = 0\end{cases}$ is the homogenous system of linear equations.
- For the system on the above the solution $x_{1} = x_{2} = x_{3} = …. = x_{n} = 0$ is called the trivial solution and the solution $(x_{1} x_{2} x_{3} ….. x_{n})^{t}$ for $x_{i} \ne 0$ is the non- trivial solution.