Matrices 2025 1
Matrices 2025 1
Business Mathematics II
Matrices
Outcomes
a) Define a matrix.
b) Represent matrices using standard notation.
c) Describe types of matrices: Row, column, null,
square matrix and its variations.
d) Carry out matrix operations: Scalar
multiplication, matrix addition and product.
e) Define a determinant of a matrix.
f) Calculate determinants: Cofactor, and Sarrus
methods
g) Describe the properties of determinants.
h) Determine the transpose, singularity, adjoint,
and the inverse of a matrix.
i) Solve system of equations: Cramer’s rule,
inverse method, Gaussian/Gauss Jordan method
j) Calculate the rank and nullity of a matrix
Matrix and Matrix Notation
Defn:
A matrix is a set of mn numbers arranged in a rectangular formation enclosed in [ ].
A rectangular array of numbers (enclosed in [ ]).
Each element/number in a matrix is called an entry.
Denote matrices by capital bold letters: A, B, C, …
Each entry is identified by its row and column as subscripts of the corresponding lower case
E.g. if A is a matrix, then an entry in A in the i-th row and j-th column is denoted: aij
NB:
Matrix A can also be denoted as:
A aij orA aij
Order or Size of a Matrix
The size of a matrix with m rows and n columns is denoted by (i.e. number of rows first)
Examples: In general, a matrix A of size, :
a11 a12 a13 ... a1n
a b c a
B i.e. B 23 21 a22 a23 ... a2 n
d e f
. .
A aij
. .
1 2 3 4 5 . .
6 7 8 9
10 am1 am 2 am 3 ... amn
A 11 12 13 14 15 A 55
i.e.
16 17 18 19 20
21 22 23 24 25
Types of Matrices
Row & Column Matrices
Dfn: Row Matrix E.g.: Row matrix A 5 6 0 12
A matrix with one row
Has order 7
E.g.: Column matrix
B 8
Dfn: Column Matrix
A matrix with one column 3
Has order
Null or Zero Matrix 0 0
E.g.: Null matrix O
Dfn: 0 0
A matrix whose entries are all zeros (0s). NB: Generally, is a null matrix iff
Denoted by letter O and
Types of Matrices cont…
Square Matrix
E.g.: 4 0 1
Dfn:
A 2 6 7
A matrix having the same number of rows and columns.
11 5 3
A square matrix of order is written .
Variations to Square Matrices:
Dfn: Principal Diagonal
The principal diagonal of a square matrix is the set of entries s.t. extending from the upper left
corner to the lower right corner.
Principal Diagonal = a11 , a22 , a33 , ... ann
The PD for matrix is {4, 6, 3}
PD = Main Diagonal = Leading Diagonal
Types of Matrices cont…
Diagonal Matrix
Dfn
A square matrix whose entries are all zeros except those in the principal diagonal.
Note that some entries in the principal diagonal may be zeros.
E.g.:
7 0 0
0 0
A 0 11 0 B
0 0 10 0 8
0, ij
aij
k 0, i j
Types of Matrices cont…
Identity Matrix (or Unit Matrix)
Dfn
A square matrix whose all principal diagonal entries are ones, and all the other entries are zeros.
Denoted
E.g.:
1 0 0
1 0
I3 0 1 0 I 2
0 0 1 0 1
Use matrices of your choice to explore Solve the following matrix equations:
whether or not matrix addition and i.
1 0 2 6 4 8
subtraction are commutative and/or X
0 2 1 5 2 0
associative i.e.
A B B A & A B C A B C
ii.
Find the values of and that satisfy the 1 0 2 2 3 1
3X 2 1 3 1 2 0
following matrix equation:
a 3 2b a 0 7 4 1 5 0 1 5
c 1 4d 6 3 2d
iii.
Write in tabular/rectangular form: 3 1
Y 2I 2
where i = 1 and j = 1, 2, 3, 4 1 2
Example – Network Matrix
The network below consists of 6 arrows and 4 nodes. One node is the reference node which has no
consequence on the network. The nodal incidence matrix of the network is where:
1, if arrow j leaves node i
aij 0, if arrow j does not touch node i
1, if arrow j enters node i
Solution:
Represent the nodal incidence matrix in a rectangular form.
Arrow
1 2 3 4 5 6
Node 1 1 1 1 0 0 0
Node 2 0 1 0 1 1 0
Node 3 0 0 1 0 1 1
Activity – Network Matrix
Represent each of the following networks using nodal incidence matrix, where:
1, if arrow j leaves node i
aij 0, if arrow j does not touch node i
1, if arrow j enters node i
a) b)
Matrix Operation cont…
Matrix Multiplication
Let A and B be matrices, then they are conformable for multiplication if the number of columns of A is
equal to the number of rows of B i.e.
A B iff A is m n and B is n p
The product of A and B will have number of rows equal to A’s rows and number of columns equal to
B’s.
A mn B np Cmp
NB: Example:
Matrix multiplication is not commutative Compute the following products if they exist:
If AB = BA, then A and B commute to each
4 1 3 0 7
other. a) 5 2 1 4 6
If A is a square matrix, then it can be
multiplied by itself 8 5 3
2 3 n
A , A , ... A
1 3 0 4 3 10 2
In the product AB, b) 2 5 8 9 2 0 4
A is a pre-multiple of B.
B is a pre-multiple of A. 1 7 5
Solution
a) 4 1 3 0 7 4 3 1 1 4 0 1 4 4 7 1 6
5 2 1 4 6
5 3 2 1 5 0 2 4 5 7 2 6
11 4 34
17 8 23
(The product will be a matrix)
Alternatively, multiply 1st matrix and each column of the 2nd matrix separately.
b) 8 5 3
13 53 17
1 3 0 4 3 10 2
2 5 8 9 2
0 4 56 23 81
81
1 7 5
NB: Example:
(A)B = (AB) = A(B), The matrix below shows the production level at a
Production matrix:
A B C
23 16 10 Units of material
P
7 9 11 Units of man-hours
Cost matrix:
C Mat Lab
C 45 6
Total cost = CP
23 16 10
45 6 7 9 11 1, 077 774 516
The cost of production for A was K1,077,000, B was K774,000 & C was K516,000
Activity
Dfn: a) det(A):
It is a function of the entries of a square matrix 6 5
A 6 1 3 5 9
whose outcome is a scalar quantity. 3 1
A determinant is denoted det(A ) or det A or .
Determinant of a matrix: b) det(B):
a b a b 7 8
A 2 , det(A) ad cb B
c d 1 2
c d
E.g.: Find the determinant, given 7 2 1 8
6 5 7 8 22
a) A b) B
3 1 1 2
Determinants cont…
Determinant of a matrix: Since e is in the 2nd row and 2nd column, its
Recall that for a matrix, . minor is the determinant of the matrix formed
Dfn: Minor by deleting the 2nd row and 2nd column i.e
The minor, of the entry is the determinant of the a c
M e M 22
matrix obtained by deleting the i-th row and j-th x z
column. az xc
Activity:
a b c
Write the minors of the following entries: f, x,
E.g.: For
A d e f
and z.
x y z
Determine the minor of the entry e.
Determinants cont…
Sarrus Rule (Diagonal Rule) Add the products of the three diagonal entries
Consider the matrix running from top-left to bottom-right
a b c Add the products of the three diagonals entries
A d e f
running from bottom-left to top-right.
g h i
det(A) = the difference between top-bottom sum and
To find the determinant of A, the bottom-top sum i.e.
Write the first two columns of the a b c a b
matrix to the right of the third column d e f d e
a b c a b g h i g h
d e f d e det( A) (aei bfg cdh) ( gec hfa idb)
g h i g h Activity: Find |B| using Sarrus Rule.
Properties of Determinants
If two rows or columns are identical, then the value The determinant of a diagonal matrix is the
of the determinant is zero (0). product of its diagonal entries.
a b c Eg.g: Find det(A)
E.g.: A a b c 0 3 0 0
A 0 5 0
x y z
If every entry of a row or column is multiplied by , 0 0 2
then the determinant is also multiplied by . |A| =
E.g.: Find the determinants of A and B The determinant of a product of two
6 5 12 5 matrices = the product of the determinants of
a) A b) B
3 1 6 1 the matrices i.e.
|A| = – 9 |B| = 2|A| = – 18 det(AB) = det(A) x det(B)
Application of Determinants – Cramer’s
Rule
Cramer’s rule is used to solve a systems of equations. Find the determinant of the coefficient
Steps: matrix and represent it as D i.e det(A) =
Write a system of equations in matrix form: D
AX B Find the determinants of the matrices
Where: A = Coefficient matrix – Square obtained by replacing the i-th column of
matrix the coefficient matrix by the solution
X = Variable matrix – Column matrix. Represent the determinants as
matrix Find the value of the variable by dividing
x1 10
6 B 5=Solution
3 1 x 7 matrix – Column by D i.e. Dxi
xi , D 0
matrix 2 D
E.g.:
Types of Solutions - Cramer’s Rule
Check the value of the
determinant of A, D
𝐷≠0 𝐷 =0
Unique solution (Consistent system)
Dx1 Dx2 Dx3 Check the values of
x1 , x2 , x3 ...
D D D
1 3 1 x3 10 1 10 1
1 1 1 9 30 2 2 3 20 9 8
det( A) D 2 1 3 1 1 2
1 3 1 det( A x3 ) Dx3 2 1 9
1 3 10
1 9 2 3 6 1 4
10 27 20 9 2 6 1 12
2 1 1 Dx1 Dx2 8 Dx3 12
4
det( A x1 ) Dx1 9 1 3 x1 1 x2 2 x3 3
D 4 D 4 D 4
10 3 1 x1 1, x2 2, x3 3
Example
Linga farmers have 500 acres of land for growing AX = B:
maize and soya. The costs (K’000) of growing 1 1 x 500
42 30 y 18, 600
maize and soya are K42 and K30 per acre,
respectively. The farmers have K18,600 available 1 1
det( A) D 12
for growing the crops. If they wish to use all the 42 30
land and the entire budget for the two crops, how 500 1
det( A x ) Dx 3, 600
many acres of each crop should they grow? 18, 600 30
Solution:
1 500
Let the farm use x acres for maize and y acres for soya det( A y ) Dy 2, 400
42 18, 600
Equations: x y 500
42 x 30 y 18, 600
Example cont…
x
Dx 3, 600
300
4 x1 2 x2 9 x3 2
D 12
3 x1 4 x2 x3 5
Dy 2, 400 x1 3 x2 2 x3 8
y 200 7, -3 & -4
D 12 b) Determine whether the following system is
Linga farmers should grow maize on 300 acres
consistent or inconsistent. If consistent, whether has
and soya on 200 acres of the land.
a unique or infinitely many solutions.
x 2 y 3 z 17
Activity:
2 x y 2 z 6
Use the Cramer’s rule to:
2 x 4 y 6 z 34
a) Solve the following system of equations
Yankho has a total of K2,000,000 on deposit with two village banks. One pays interest at the rate of 3%
per year, whereas the other pays interest at the rate of 4% year. If Yankho earned a total of K72,000 in
interest during last year, how much did she have on deposit in each bank?
K800,000 & K1,200,000
Malawi Housing Corporation (MHC) is planning build a new apartment complex consisting of one-
bedroom, two-bedroom and three-bedroom units. A total of 192 units is planned, and the number of
family units (two-bedroom and three-bedroom) will be equal to the number of one-bedroom units. If the
number of one-bedroom units will be 3 times the number of three-bedroom units, find how many units
of each type will be in the complex.
1-bedroom – 96, 2-bedroom – 64 & 3-bedroom – 32
Special Matrices
Transpose of a Matrix If = –, then is skew symmetric
Dfn:
If A is a matrix, then the transpose of A is a matrix 0 4 1
E.g.:
B 4 0 3
obtained by interchanging the rows and columns.
Denoted or or 1 3 0
1 2 T 1 4
E.g.: B B 0 4 1
4 5 2 5 T
B 4 0 3
If = , then is symmetric
1 3 0
8 1 2 8 1 2
E.g.: A 1 3 5 T
A 1 3 5 B B T
B B T
2 5 7 2 5 7
Special Matrices cont…
Singular & Non-Singular Matrices
Example
Dfn:
Evaluate x if A is singular.
A square matrix, , is called singular if |A| = 0 i.e.
3 x
det(A) = 0. A
If det(A) 0, then A is non-singular 8 x 4
3 12 Solution
E.g., if B Since A is singular, then det(A) = 0
2 8
12 8 x x 0
det(B) 38 9 2 0 2
12 8 x x 0
B is a singular matrix x 6 x 2 0
x 2 or 6
Special Matrices cont…
Adjoint of a Matrix
Example 1 0 1
Dfn:
Find adj(A) if A 1 3 1
An adjoint of a square matrix, is the transpose of a
0 1 2
matrix obtained by replacing the entries of the
matrix by its corresponding cofactors.
Solution
Cofactors, :
The transpose of the cofactor matrix, .
Cofactor of a11 , C11 3 2 1 1 5
Denoted Cofactor of a12 , C12 1 2 0 1 2
Cofactor of a13 , C13 1 1 0 3 1
adj A Cij
T
C21 1, C22 2, C23 1
C31 3, C32 2, C33 3
where is the cofactor matrix of A
Special Matrices cont…
The cofactors: 5 1 3
C11 5, C12 2, C13 1
adj A 2 2 2
C21 1, C22 2, C23 1
1 1 3
C31 3, C32 2, C33 3
NB:
The cofactor matrix: For matrix, the adjoint is:
5 2 1
a22 a12
C 1 2 1 adj A
Swap &
a b d b
5 2 1
T E.g.:
A adj A
c a
c d
adj(A) = 1 2 1
3 2 3
Special Matrices cont…
Inverse of a Matrix Example
Dfn: Find , given:
If A is a non-singular square matrix, then the 3 4
A
inverse of A is another square matrix B such 1 2
that AB = BA = I Solution:
Denoted 3 4
det A 6 4 2
The inverse of is given by 1 2
2 4
1 adj A adj A
A 1
adj A 1 3
det A det A
1
A 1
adj A
det( A)
Special Matrices cont…
1 1 2 4
A
2 1 3
1 2
1 3
2 2
Activity:
Find if it , given that
0 2 3 0 2 3
B 1
1 3 3
B 1 3 3
1 2 2 1 2 2
Solving Systems of Linear Equations – Inverse
Method
Steps: 1 1
A AX A B
Write the system of equations in matrix 1
IX A B
form: 1
X A B (Solution to the system)
AX = B
If B = O, then the system is adj ( A)
X B
homogenous. det( A)
NB:
If B O, then the system is non- If A is singular (i.e. ), then either the system has
homogenous
no solution or the solution is not unique.
If A is non-singular (i.e. ), and the
system is non-homogenous, multiply
both sides of AX = B by
Example
Solve the following system of equations X = B:
using the inverse of a matrix method: 1 1 2
det( A) 3 1 1
x y 2 z 3
3 3 6
3 x y z 5
3 x 3 y 6 z 9 1 1 2 1 1
3 1 1 3 1
Solution 3 3 6 3 3
Matrix form AX = B:
1 1 2 x 3 det( A) 6 3 18 6 3 18 0
3 1 1 y 5 Since det(A) = 0, A is a singular matrix. . The system has
3 3 6 z 9 no solution or has many solutions.
Example
Solve the following system of equations 3 1
det( A) 15 4 19
using the inverse of a matrix method: 4 5
1 1
X A B = adj ( A ) B
3 x1 x2 4 det A
4 x1 5 x2 18 x1 1 5 1 4
x 19 4 3 18
2
Solution
1 38
Matrix form AX = B: 38
19
3 1 x1 4
4 5 x 18 x1 2
2
x 2
2
X = B:
Example
Solve the following system of equations 1 3 2
det( A) 2 3 0
using the inverse of a matrix method:
x1 3 x2 2 x3 3 1 1 4
2 x1 3 x2 1 1 3 2 1 3
x1 x2 4 x3 2 2 3 0 2 3
1 1 4 1 1
Solution
Matrix form AX = B: det( A) 12 0 4 6 0 24 22
Since det(A) 0, A is a non-singular matrix, and the system
1 3 2 x1 3
2 3 0 x 1 is non-homogenous, we use:
2
1 1 4 x3 2 1 1
X A B = adj ( A) B
det A
Example cont…
x1 3 12 14 6
x 1 8 2 4
1 adj A Cij
T
22 ij
T
C
2
x3 2 5 4 3
Cofactor matrix of A, : x1 12 14 6 3
x 1 8 2 4 1
1 3 2 C11 12, C12 8, C13 5 2 22
x3 5 4 3 2 55
A 2 3 0 C21 14, C22 2, C23 4
11 11
1 1 4 C31 6, C32 4, C33 3 x1
x1 1010 x 77
x 1 2 1111
12 8 5 14
2 22 x3
17
Cij 14 2 4 x3 17 17
22
22
6 4 3
Activity
2 x 3 y 1 xy 2 4 x 8 y z 6
x 4y 5 2x z 1 2x 3y 2z 0
2 y 3 z 1 x 7 y 3z 8
x = 1, y = 1 x = 1, y = 1, y = 1 x = -2, y = 0, y = 2
Special Matrices cont…
[Row] Echelon Matrix Example
A matrix is in [row] echelon form iff: State whether or not each of the
1. A leading (left-most) entry of every non-zero row is to following is in echelon form.
the right of the leading entry of every row above it. 1 0 0
0 3 0
2. All entries below a leading entry are zeros. 0 1 0 0
0 0 1 1 0 0 0
3. All rows consisting of zeros are at the bottom.
Reduced Row Echelon Form [Row] Echelon Not echelon Reduced
row
In addition to the three above, in a reduced row echelon
1 0 5 1 0echelon
0 0
form: 0 1 0 0 0 1 0
4. All leading entries are 1s – Leading 1s Reduced [row] echelon
0 0 0
5. All entries above and below a leading 1 are zeros. Reduced [row] echelon
Gaussian Elimination & Gauss Jordan
Methods
Steps – Solving a system of linear equations: For Gauss Jordan, perform row operations
Write the systems as augmented matrix – Append
(iterations) until the augmented matrix is
(combining) the coefficient matrix, A and the transforms into a reduced row echelon
solution matrix, B. form.
A B
Once in reduced echelon form, the
2 3 12
variables corresponding to the pivots
1 5 7
(leading 1) are called “basic variables”.
For Gaussina Elimination, perform row
Read the values of the basic variables
operations (iterations) until the augmented
straight from the reduced echelon matrix.
matrix is transforms into a row echelon form.
Apply back substitution to evaluate the variables.
Gaussian Elimination & Gauss Jordan
cont…
The three basic elementary row operations: Example:
Multiply row i by a constant c
Solve the following system of linear equations:
Notation:Ri cRi 4 x 8 y z 6
Interchange rows i and j 2x 3y 2z 0
Notation:Ri R j x 7 y 3z 8
Add c times row i to row j
Solution:
Notation:R j R j cRi
Augmented matrix
4 8 1 6
2 3 2 0
1 7 3 8
Example cont…
R1 R3
1 7 3 8
Need 0 0 1 8 / 17 16
16 / 17
17
1 7 3 8 here
Need 0s 0 20 13 26
here 2 3 2 0
R3 R3 20 R2
4 8 1 6
1 7 3 8
R2 R2 2 R1 R3 R3 4 R1
0 1 8 / 17 16 / 17 Row Echelon
0 0 61 / 17 17
122 / 17
Example cont…
1 7 3 8 Back substitution
Eq...(3) : z 2
0 1 8 / 17 16 / 17
8 16
0 0 61 / 17 122 / 17 Eq...(2) : y z
17 17
16 8
Need a 1 y 2 0
here 17 17
61 Eq...(1) : x 7 y 3 z 8
R3 R3
17
x 8 7 0 3 2 2
x y z
1 7 3 8 x 2, y 0, z 2
0 1 8 / 17 16 / 17
0 0 11 2
Example cont…
Using Gauss Jordan – Reduced row echelon x y z Basic variables
1 0 0 2
1 7 3 8
Need a 0 1 0 0 Reduced row echelon
0 1 8 / 17 16 / 17
0 here 0 0 1 2
0 0 1 2
x 2, y 0, z 2
R1 R1 7 R2 Need 0s Activity:
here After attempting to solve a system of linear
1 equations, a student ended up with the following
0 5 / 17 224 17
4 // 17
reduced echelon matrix. Determine the solution.
0 1 8 / 17 16 / 17
0 1 0 1 3
0 1 2
0 1 2 4 Many solutions
8
5
R1 R1 R3 R2 R2 R3 0 0 0 0
17 17
Activity
Solve the following systems of equations using
c) x1 x2 6 x3 x4 4
either Gaussian elimination or Gauss Jordan
method:
x1 9 x3 x4 6 Many solutions
a) 3 x1 2 x2 8
𝑥1 =2 , 𝑥 2=− 1 2 x2 6 x3 x4 9
2 x1 5 x2 1
b)
b) 2 x1 6 x2 15 x3 12
2x 6 y 7z 7
6 x 18 y 24 z 6 4 x1 7 x2 13 x3 10
No solution 3 x1 6 x2 12 x3 9
2 x y 5 z 14
2 x 12 y 4 z 10 𝑥1 =−3 ,𝑥 2=4, 𝑥3 =−2,
Rank and Nullity of a Matrix
Dfn: Rank 1
R2 3R1 ; R1 R2
Rank of a matrix is the [maximum] number of
3
Max # of linearly independent rows = 1
linearly independent rows or columns in the Columns:
matrix. Likewise, each column can be expressed as
Rank of a matrix is denoted r(A).
a linear combination of the other.
E.g.:
Max # of linearly independent columns = 1
1 2 4
A r(A) = 1
3 6 12 Alternatively, transform a matrix into an
Rows: echelon form. The rank will be the number of
Each row can be expressed as a linear combination
non-zero rows.
of the other
Rank and Nullity cont…