Notes on Basic Linear Algebra 8 March 2022
Notes on Basic Linear Algebra 8 March 2022
In this module, we will study Linear Algebra, which will be needed in solving problems created in a
later module. We begin by discussing the building blocks of linear algebra: matrices and vectors.
Then, we use our knowledge of matrices to develop a systematic procedure (General Elimination/
Gaussian Elimination with Back Substitution and Gauss Jordan method) premised on elementary row
operations (ERO) for solving linear equations, which we then use to invert matrices.
Matrix Operations
Matrix is a rectangular array of numbers. Various mathematical operations that could be carried out
on matrices include: (i) Scalar Multiplication of Matrix, (ii) Tranposing a matrix, (iii) Addition and
Subtraction of Matrices and (iv) Multiplication of matrices
Example 1
Solution
3A = 3 [−11 20 ]
3A = [−33 60]
Tutorial Questions
If A = [−53 28] 2
, Determine (i) 5A, (ii) A
5
Tranpose of a matrix
Example 1
If A = [ 14 2 3
5 6 ]
, Determine AT .
Solution
[ ]
1 4
T
A = 2 5
3 6
Tutorial Questions
1) If A = [ 25 4 3
7 8 ]
, Determine AT
[ ]
2 4 3
2) If A = 3 6 8 , Determine AT
5 9 12
Example 1
If A = [ 10 2 3
−1 1 ]
and B =
−1 −2 −3
2 1 −1 [ ]
, Determine (i) A + B, (ii) 3A + 5B, (iii) 3A – 2B
Solution
(i) A + B = [ 10 2 3
−1 1
+
2 ][
−1 −2 −3
1 −1 ]
A+B= [ 1−1 2−2
0+2 −1+1
3−3
1−1 ]
A+B= [ 02 00 00 ]
ii) 3A + 5B = 3 [ 10 2 3
−1 1
+5
2 ] [
−1 −2 −3
1 −1 ]
3A + 5B = [ 3 6
0 −3 3 ] [ 10
9 −5
+
−10
5 −5 ]
−15
3A + 5B = [−210 −42 −6 −2 ]
[ ] [ ]
1 3 2 1 4 5
If A = 2 4 5 , and B = 5 6 −9 , Determine (i) A + B, (ii) 3A + 2B, (iii) 5A – 3B
4 6 9 9 11 3
Multiplication of matrices
Example 1
Compute C = AB for:
[ ]
1 1
A= [ 1 1 2
2 1 3 ]
and B = 2 3
1 2
][ ]
1 1
C= [
1 1 2
2 1 3
. 2 3
1 2
Suppose an oil company manufactures three types of gasoline: premium unleaded, regular
unleaded, and regular leaded. These gasolines are produced by mixing two types of crude oil: crude
oil 1 and crude oil 2. The number of gallons of crude oil required to manufacture 1 gallon of gasoline
is given in Table 1.
If the company wants to produce 10 gallons of premium unleaded, 6 gallons of regular unleaded,
and 5 gallons of regular leaded, then the company’s crude oil requirements would be:
Solution:
[ ]
3 2 1
4 3 4
.
1 1 3
4 3 4
[]
10
6
5
Using matrix computation approach, we have:
[ ][ ]
3 2 1
[ ]
Cr1 10
4 3 4
= . 6
Cr2 1 1 3
5
4 3 4
[ ]
Cr1
Cr2
=
[ ( 34 ×10)+( 23 ×6)+( 14 ×5)
( 14 ×10)+( 13 ×6)+( 34 ×5) ]
[ ] [ ]
Cr1
Cr2
=
12.75
8.25
Therefore, crude 1 and crude 2 required are 12.75 gallons and 8.25 gallons.
Tutorial Questions
The matrix operations that are deployed in formulating the elementary row operations used in
solving systems of linear equations via either the GEP or the Gauss Jordan method are the: (i) scalar
multiplication of matrix, (ii) addition and subtraction of matrices and (iii) row matrices swap.
Example 1
Solve the system of linear equations given below using the GEP.
Solution
( |)
2 2 1 9
A/b = 0 3 −1 3
1 −1 2 5
( |)
2 2 1 9
A/b = 0 3 −1 3
0 4 −3 −1
( |)
2 2 1 9
A/b = 0 3 −1 3
0 0 5 15
Step 2: Convert the augmented matrix back to systems of linear equations, and thereafter solve
these equations in a backward format to determine the value of x 1, x 2 and x 3.
We have:
2 x1 + 2 x 2 + x 3 = 9 (1)
3 x2 - x3 = 3 (2)
5 x 3 = 15 (3)
5 x 3 = 15
x 3 = 15/5 = 3
3 x2 - x3 = 3
3 x2 - 3 = 3
3 x2 = 3 + 3
3 x2 = 6
x 2 = 6/3
x2 = 2
Substitute x 2 = 2 and x 3 = 3 into equation (1), we have:
2 x1 + 2 x 2 + x 3 = 9
2 x1 + 2(2) + 3 = 9
2 x1 = 9 – 7
2 x1 = 2
x 1 = 2/2 = 1
:., x 1 = 1, x 2 = 2 and x 3 = 3
Solve the system of linear equations given below using the GEP.
Solution
We need to convert the left hand side of the augmented matrix to a 3 by 3 unit matrix (i.e.
[ ]
1 0 0
0 1 0)
0 0 1
1 1
Step 1: Multiply row 1 by . (i.e. ERO 1 = R 1),we have:
2 2
Step 2: ERO 2 = R 2 – 2R1, we have:
−1
Step 4: ERO 4 = R 2, we have:
3
6
Step 7: ERO 7 = R 3, we have:
5
1
5
Step 8: ERO 8 = R 1− R 3, we have:
6
1
Step 9: ERO 9 = R 2+ R 3, we have:
3
Tutorial Questions
Solve the system of linear equations given below using the GEP and Gauss Jordan method.
1) -3x + 2y – 6z = 6
5x + 7y – 5z = 6
x + 4y -2z = 8
2) x + y – z = 7
x – y + 2z = 3
2x + y + z = 9
3) x + y + z = 5
2x – z = 4
3y + z = 2
4) 2x - 3y + z = -5
3x + 2y – z = 7
x + 4y -5z = 3
5) 3x + 4y + z = 6
2x - y + 2z = -5
x + 3y -z = 9
6) w + 2x – y + z = 6
-w + x + 2y - z = 3
2w - x + 2y + 2z = 14
w + x – y + 2z = 8
Another approach to solve systems of linear equation, is to first determine the inverse of a Matrix,
using the Gauss Jordan method and thereafter use the matric operation rule: A. A−1x = b. A−1, to
obtain the unknown variables.
Example 1
b) Based on your result in question (a), solve the following system of linear equations.
Solution
a) Obtain an augmented matrix:
1
Step 1: ERO1 = R 1, we have:
2
Step 3: 2R2
5
Step 4: ERO1 = R 1− R 2, we have:
2
Because A has been transformed into I2, I2 will have been transformed into A−1. Hence,
Tutorial Questions
b) Based on your result in question (a), solve the following system of linear equations.
2 x1 - x 3 = 10
3 x 1 + x 2 +2 x 3 = 15
−x 1 + x 3 = 8
d) Based on your result in question (c), solve the following system of linear equations.