MATRICES
INTRODUCTORY PURE MATHEMATICS 1 - MATH 161
M. A. BOATENG (Ph.D., MIMA)
TABLE OF CONTENTS
0
▶ INTRODUCTION
▶ MATRIX OPERATIONS
ADDITION OF MATRICES
SUBTRACTION OF MATRICES
MULTIPLICATION OF MATRICES
▶ DETERMINANT OF A MATRIX
▶ INVERSE OF MATRICES
▶ SYSTEM OF EQUATION
M. A. BOATENG (Ph.D., MIMA) MATRICES 1/31
Table of Contents
1 INTRODUCTION
▶ INTRODUCTION
▶ MATRIX OPERATIONS
ADDITION OF MATRICES
SUBTRACTION OF MATRICES
MULTIPLICATION OF MATRICES
▶ DETERMINANT OF A MATRIX
▶ INVERSE OF MATRICES
▶ SYSTEM OF EQUATION
M. A. BOATENG (Ph.D., MIMA) MATRICES 2/31
DEFINITIONS
1 INTRODUCTION
• Matrix:: A rectangular array of numbers. The numbers in a matrix are called
elements.
• Order:The order of a matrix is the number of rows by the numberof columns.
A
1 2 3
2 × 3 matrix has two rows and three columns. For example, A = is 2 × 3
4 5 6
matrix.
• Square matrix:
A matrix
which has the same number of rows as columns. For
1 2 3
1 2
example, 4 5 6 or is a square matrix.
4 5
3 3 7
M. A. BOATENG (Ph.D., MIMA) MATRICES 3/31
• Null or zero matrix: A null or zero
matrix isa matrix in which every element is zero.
0 0 0
0 0
For example Z = , A = 0 0 0
0 0
0 0 0
0 0
Y = 0 0
0 0
• The unit or identity matrix:The identity matrix I, is a square matrix in which each
element in the leading diagonal has a value ofone(1) and all other elements have a
1 0
value of zero(0). The 2 × 2 unit matrix is I =
0 1
Any matrix multiplied by the unit matrix gives the same matrix i.e AI = A
M. A. BOATENG (Ph.D., MIMA) MATRICES 4/31
Table of Contents
2 MATRIX OPERATIONS
▶ INTRODUCTION
▶ MATRIX OPERATIONS
ADDITION OF MATRICES
SUBTRACTION OF MATRICES
MULTIPLICATION OF MATRICES
▶ DETERMINANT OF A MATRIX
▶ INVERSE OF MATRICES
▶ SYSTEM OF EQUATION
M. A. BOATENG (Ph.D., MIMA) MATRICES 5/31
ADDITION OF MATRICES
2 MATRIX OPERATIONS
Two
matrices
canbe added
if they are
of the same dimension. Example
a b e f a+e b+f
+ =
c d g h c+g d+h
Example.
3 4 10 6
Given the matrices Z = and Y = . Find Z+Y.
9 1 7 5
10 6 3 4 10 + 3 4 + 6
Z+Y = + =
7 5 9 1 7+9 1+5
13 10
=
16 6
M. A. BOATENG (Ph.D., MIMA) MATRICES 6/31
SUBTRACTION OF MATRICES
2 MATRIX OPERATIONS
Two
matrices
canbe subtracted
if they
are of the same dimension. Example
a b e f a−e b−f
− =
c d g h c−g d−h
Example.
3 4 10 6
Given the matrices A = and B = . Find A-B.
9 1 7 5
3 4 10 6 3 − 10 4 − 6
A−B= − =
9 1 7 5 9−7 1−5
−7 −2
=
2 −4
M. A. BOATENG (Ph.D., MIMA) MATRICES 7/31
MULTIPLICATION OF MATRICES
2 MATRIX OPERATIONS
Two matrices A and B can only be multiplied if the number of columns in A is the same as
the number of rows in B.
An (m × n) multiplied by (n × p) = (m × p) So the product of two matrices can be done
as shown
below
a b e f ae + bg af + bh
× =
c d g h ce + dg cf + dh
Example.
3 4 10 6
Given the matrices A = and B = . Find AB.
9 1 7 5
3 4 10 6 3(10) + 4(7) 3(6) + 4(5)
AB = × =
9 1 7 5 9(10) + 1(7) 9(6) + 1(5)
58 38
=
97 59
M. A. BOATENG (Ph.D., MIMA) MATRICES 8/31
TRIAL
13 5 7 3 8 7
Solve the following given that B = 1 9 8 and C = 0 2 5.
9 12 3 4 6 3
Find
1. 2B+C
ii.C − B
iii. C2
M. A. BOATENG (Ph.D., MIMA) MATRICES 9/31
Table of Contents
3 DETERMINANT OF A MATRIX
▶ INTRODUCTION
▶ MATRIX OPERATIONS
ADDITION OF MATRICES
SUBTRACTION OF MATRICES
MULTIPLICATION OF MATRICES
▶ DETERMINANT OF A MATRIX
▶ INVERSE OF MATRICES
▶ SYSTEM OF EQUATION
M. A. BOATENG (Ph.D., MIMA) MATRICES 10/31
DETERMINANT OF A MATRIX
3 DETERMINANT OF A MATRIX
a b
The determinant of a (2 × 2) matrix A = is defined as
c d
a b
det(A) = |A| = = ad − bc
c d
a b c
Also the determinant of a (3 × 3) matrix A = d e f is defined as det
g h i
e f d f d e
A = |A| = a −b +c
h i g i g h
M. A. BOATENG (Ph.D., MIMA) MATRICES 11/31
EXAMPLES
3 DETERMINANT OF A MATRIX
Find the determinant
of the following matrices:
9 5
1. T=
10 4
Solution
9 5
det A = |A| =
10 4
= 4(9) − 10(5)
= 36 − 50
= −14
3 8 7
2. A = 0 2 5
4 6 3
M. A. BOATENG (Ph.D., MIMA) MATRICES 12/31
Solution
e f d f d e
A = |A| = a −b +c
h i g i g h
2 5 0 5 0 2
A = |A| = 3 −8 +7
6 3 4 3 4 6
= 3[2(3) − 6(5)] − 8[0 − 4(5)] + 7[0 − 4(2)]
= 3(−24) − 8(−20) + 7(−8)
= 32
M. A. BOATENG (Ph.D., MIMA) MATRICES 13/31
Find the determinant
1 of
the matrices:
5 8 7
1. A = 8 2 − 53
4 2 3
8 7
2. P =
7 −3
5
5 7
3. B =
0 3
1 7
8 8 7
4. A = 8 2 15
7 2 3
M. A. BOATENG (Ph.D., MIMA) MATRICES 14/31
Table of Contents
4 INVERSE OF MATRICES
▶ INTRODUCTION
▶ MATRIX OPERATIONS
ADDITION OF MATRICES
SUBTRACTION OF MATRICES
MULTIPLICATION OF MATRICES
▶ DETERMINANT OF A MATRIX
▶ INVERSE OF MATRICES
▶ SYSTEM OF EQUATION
M. A. BOATENG (Ph.D., MIMA) MATRICES 15/31
INVERSE OF MATRICES
4 INVERSE OF MATRICES
The inverse of a matrix A, given as A−1 is such that AA−1 = A−1 A = I where I is the
identity matrix. It is only possible to find the inverse of square matrices. If the
determinant of the matrix is zero(0),the matrix is called a Singular matrix.
Teaser
What does it mean to say a matrix is a singular matrix?????
2 × 2 Inverse
a b d −b
The inverse of a 2 × 2 matrix A = is given by: A−1 = 1
detA
c d −c a
where det(A) = (ad − bc)
M. A. BOATENG (Ph.D., MIMA) MATRICES 16/31
1 6
Eg. 1. Given the matrix A = , find the inverse of A.
4 5
Solution
det (A) = 5(1) − 4(6) = −19
−1 1 d −b
A = detA
−c a
1 5 −6
= − 19
−4 1
5 6
− 19 19
= 4 1
19 − 19
M. A. BOATENG (Ph.D., MIMA) MATRICES 17/31
Inverse of a 3 × 3 matrix
4 INVERSE OF MATRICES
We follow the following steps to find the inverse of a 3 × 3 matrix
1. Find the determinant of the given matrix.
2. Transpose the matrix.
3. Calculate the determinant of 2 x 2 matrices.
4. Prepare the matrix of cofactors (minors).
5. Divide each term of the adjoint matrix by the determinant.
Example
1 2 3
Find the inverse of the (3 × 3) matrix A = 0 1 4
5 6 0
M. A. BOATENG (Ph.D., MIMA) MATRICES 18/31
solution
4 INVERSE OF MATRICES
1 4 0 4 0 1
det A = 1 −2 +3
6 0 5 0 5 6
= 1(−24) − 2(−20) + 3(5)
= −24 + 40 − 15
=1
1 0 5
Transpose of A=2 1 6
3 4 0
Now, we will find the determinant of each of the 2 × 2 minor matrices.
For first row elements
1 6
= −24
4 0
M. A. BOATENG (Ph.D., MIMA) MATRICES 19/31
2 6
= −18
3 0
2 1
=5
3 4
For second row elements
0 5
= −20
4 0
1 5
= −15
3 0
1 0
=4
3 4
M. A. BOATENG (Ph.D., MIMA) MATRICES 20/31
For third-row element
0 5
= −5
1 6
1 5
= −4
2 6
1 0
= −5
2 1
Now, the new matrix is
−24 −18 5
A = −20 −15 4
−5 −4 1
M. A. BOATENG (Ph.D., MIMA) MATRICES 21/31
Adj (A) = the new matrix is
−24 −18 5 + − +
A = −20 −15 4 × − + −
−5 −4 1 + − +
−24 18 5
A = 20 −15 −4
−5 4 1
A−1 = 1
detA× Adj(A)
−24 18 5
=⇒ A−1 = 20 −15 −4
−5 4 1
M. A. BOATENG (Ph.D., MIMA) MATRICES 22/31
TRIAL
Find the inverse of the following matrices
−4 8 5
• V = 2 5 −4
−5 3 0
−2 8 −6
• A = 0 −1 −4
−5 4 1
M. A. BOATENG (Ph.D., MIMA) MATRICES 23/31
Table of Contents
5 SYSTEM OF EQUATION
▶ INTRODUCTION
▶ MATRIX OPERATIONS
ADDITION OF MATRICES
SUBTRACTION OF MATRICES
MULTIPLICATION OF MATRICES
▶ DETERMINANT OF A MATRIX
▶ INVERSE OF MATRICES
▶ SYSTEM OF EQUATION
M. A. BOATENG (Ph.D., MIMA) MATRICES 24/31
SYSTEM OF EQUATION
5 SYSTEM OF EQUATION
Matrices can be used to solve systems of equations(otherwise called simultaneous
equations) . In solving such problems using matrices, we can use the following methods
• Cramer’s Rule
• Gaussian elimination
We would be focusing on the Cramer’s Rule.
CRAMER’S RULE
Cramer’s Rule is a method that uses determinants to solve a system of n linear equations
in n unknowns, i.e.
a11 x1 + a12 x2 + ... + a1n xn = b1
a21 x1 + a22 x2 + ... + a2n xn = b1
........................................
am1 x1 + am2 x2 + ... + amn xn = bn
M. A. BOATENG (Ph.D., MIMA) MATRICES 25/31
The system
can be written inmatrixform as Ax = b where the mxn coefficient matrix
a11 a12 · · · a1,n x1
a21 a22 · · · a2n x2
A= . .. .. .. , x = .. is the vector of unknowns we wish to solve and
.. . . . .
a a · · · amn xn
m1 m2
b1
b2
b = . is the vector of known right-hand-side (rhs) values.
..
bn
Provided A is invertible, i.e. det(A) ̸= 0, the system has a unique solution and Cramer’s
Rule can be applied to find the components of the solution vector x using,
M. A. BOATENG (Ph.D., MIMA) MATRICES 26/31
det(ck )
xk = det(A) , for k = 1, 2, ..., n
Here Ck is the matrix obtained from A by replacing the kth column of A by b, the vector of
known rhs values.
EXAMPLE
Solve the system of equations
3x1 + 4x2 = 6
x1 − 2x2 = 3
Solution
3 4 x1 6
A= ,x= ,b=
1 −2 x2 3
M. A. BOATENG (Ph.D., MIMA) MATRICES 27/31
6 4
3 −2
x1 = = −24 = 12
−10 5
3 4
1 −2
3 6
1 3
x2 = = 9−6 =− 3
−6−4
10
3 4
1 −2
M. A. BOATENG (Ph.D., MIMA) MATRICES 28/31
TRIAL
Solve the system of equation using the Cramer’s Rule
x1 + 3x2 − x3 = 1
−2x1 − 6x2 + x3 = −3
3x1 + 3x2 − 2x3 = 4
M. A. BOATENG (Ph.D., MIMA) MATRICES 29/31
MATRICES
Thank you for listening!
Any questions?
M. A. BOATENG (Ph.D., MIMA) MATRICES 30/31
End of Lesson
5 SYSTEM OF EQUATION
M. A. BOATENG (Ph.D., MIMA) MATRICES 31/31