Lesson 3 Matrices
Lesson 3 Matrices
WMSU Matrices
This document is for classroom use only and should not be shared.
1
Definition
Matrix
A matrix is an array of numbers or functions which is enclosed
in brackets.
Example:
𝑰𝒂𝟎 𝟏 𝟏 𝟏
𝑰𝒂𝟏 , 𝟏 𝟏 < 𝟏𝟐𝟎° 𝟏 < 𝟐𝟒𝟎°
𝑰𝒂𝟐 𝟏 𝟏 < 𝟐𝟒𝟎° 𝟏 < 𝟏𝟐𝟎°
This document is for classroom use only and should not be shared.
3
Types of Matrices
Types of Matrices
Column Matrix
A column matrix is formed by a single column.
𝟐
𝟑
−𝟏
Row Matrix
Is a matrix with only one row.
𝟒𝒙 𝒙𝟐 𝒆−𝒙
This document is for classroom use only and should not be shared.
4
Types of Matrices
Zero Matrix
Null or zero matrix is matrix where all elements are zeros.
𝟎 𝟎
𝟎 𝟎
Square Matrix
A square matrix is a matrix with the same number of rows
and columns. The elements of the form 𝒂𝒊𝒊 constitute the
principal or main diagonal.
𝟏 𝟐 𝟏
𝟒 𝟒 −𝟑
𝟏 𝟑 𝟏
This document is for classroom use only and should not be shared.
5
Types of Matrices
Rectangular Matrix
A rectangular matrix is formed by a different number of
rows and columns, and its dimension is denoted as mxn.
𝟏 𝟐 𝟑
𝟒 𝟓 𝟔
Identity or Unit Matrix
A unit matrix is a square matrix whose all diagonal
elements are one and all off diagonal elements are zero.
𝟏 𝟎 𝟎
𝟎 𝟏 𝟎
𝟎 𝟎 𝟏
This document is for classroom use only and should not be shared.
6
Types of Matrices
Triangular Matrix:
A triangular matrix is a special kind of square matrix. There are two
types of triangular matrices:
This document is for classroom use only and should not be shared.
9
Types of Matrices
Operation of Transpose Matrices
𝑻 𝑻
𝑨
=𝑨
𝑨 + 𝑩 𝑻 = 𝑨𝑻 + 𝑩𝑻
𝜶 ∙ 𝑨 𝑻 = 𝜶 ∙ 𝑨𝑻
𝑨 ∙ 𝑩 𝑻 = 𝑨𝑻 ∙ 𝑩𝑻
Symmetric Matrix
Symmetric Matrix is a square matrix in which 𝑎𝑖𝑗 = 𝑎𝑗𝑖 . A
matrix A is said to be symmetric if and only if 𝑨 = 𝑨𝑻 .
1 2 3
2 4 8
3 8 7
𝑎23 = 𝑎32 8
This document is for classroom use only and should not be shared.
10
Types of Matrices
Skew Symmetric Matrix
Skew Symmetric Matrix is a square matrix with all values
on the principal or main diagonal equal to zero and with
off-diagonal elements given such that 𝑎𝑖𝑗 = −𝑎𝑗𝑖 . A matrix
A is said to be skew symmetric if and only if 𝑨 = −𝑨𝑻 .
0 −2 3
2 0 −8
−3 8 0
𝑎23 = −𝑎32
This document is for classroom use only and should not be shared.
11
Operations of Matrices
Sum of two matrices
Matrices A and B can only be added if they have the same
dimensions, i.e. both matrices have the same number of rows
and columns. The sum of A and B, denoted by 𝑨 + 𝑩, is the
matrix for which each of its elements is the sum of the
corresponding elements of A and B.
Example:
2 1 4 1 4 5
𝐴 = −2 3 −5 𝑎𝑛𝑑 𝐵 = 0 9 −2
1 4 7 1 8 3
2 1 4 1 4 5 2+1 1+4 4+5
𝐴 + 𝐵 = −2 3 −5 + 0 9 −2 = −2 + 0 3 + 9 −5 + (−2)
1 4 7 1 8 3 1+1 4+8 7+3
3 5 9
𝐴 + 𝐵 = −2 12 −7
2 12 10
This document is for classroom use only and should not be shared.
12
Operations of Matrices
Difference of two matrices
Matrices A and B can only be subtracted if they have the
same dimensions, i.e. both matrices have the same
number of rows and columns. The difference of A and B,
denoted by 𝑨 − 𝑩, is defined as 𝑨 − 𝑩 = 𝑨 + (−𝑩)
Example:
2 1 4 1 4 5
𝐴 = −2 3 −5 𝑎𝑛𝑑 𝐵 = 0 9 −2
1 4 7 1 8 3
𝐴 − 𝐵 = 𝐴 + (−𝐵)
−1 −4 −5
−𝐵 = 0 −9 2
−1 −8 −3
This document is for classroom use only and should not be shared.
13
Operations of Matrices
𝐴 − 𝐵 = 𝐴 + (−𝐵)
2 1 4 −1 −4 −5
𝐴 + −𝐵 = −2 3 −5 + 0 −9 2
1 4 7 −1 −8 −3
2 + (−1) 1 + (−4) 4 + (−5)
= −2 + 0 2 + (−9) −5 + 2
1 + (−1) 4 + (−8) 7 + (−3)
1 −3 −1
𝐴 − 𝐵 = −2 −6 −3
0 −4 4
This document is for classroom use only and should not be shared.
14
Operations of Matrices
Multiplying a matrix by a constant 𝜶
The product of 𝛼 and a matrix A can be obtained by
multiplying each element of matrix A by
𝛼, where 𝛼 𝑖𝑠 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡.
Example:
Solve for 3A where,
2 1 4
𝐴 = −2 3 −5
1 4 7
2 1 4 3𝑥2 3𝑥1 3𝑥4 6 3 12
3𝐴 = 3 −2 3 −5 = 3𝑥(−2) 3𝑥3 3𝑥(−5) = −6 9 −15
1 4 7 3𝑥1 3𝑥4 3𝑥7 3 12 21
This document is for classroom use only and should not be shared.
15
Operations of Matrices
Product of two matrices
Supposed that A is a matrix of order mxp and B is a matrix
of order pxn, then the product of A and B, denoted by AB,
is the mxn matrix for which the element in the ith row and
the jth column is the sum of the products formed by
multiplying each element in the ith row of A by the
corresponding element in the jth column of B. Note that
for matrix multiplication, the number of columns in the
first matrix A must be equal to the number of rows in the
second matrix B.
This document is for classroom use only and should not be shared.
16
Operations of Matrices
Example:
Find AB.
1 2 3
1 3 5
𝐴= 𝑎𝑛𝑑 𝐵 = −4 0 1
−2 0 4
2 2 8
A is a 2x3matrix and B is a 3x3 matrix. The product AB can
be obtained because the number of columns of A (3
columns) is equal to the number of rows of B (3 rows). The
product AB will be a 2x3 matrix.
This document is for classroom use only and should not be shared.
17
Operations of Matrices
1 2 3
1 3 5
𝐴= 𝑎𝑛𝑑 𝐵 = −4 0 1
−2 0 4
2 2 8
𝐴𝐵
1 1 + 3 −4 + 5(2) 1 2 + 3 0 + 5(2) 1 3 + 3 1 + 5(8)
=
−2 1 + 0 −4 + 4(2) −2 2 + 0 0 + 4(2) −2 3 + 0 1 + 4(8)
−1 12 46
𝐴𝐵 =
6 4 26
This document is for classroom use only and should not be shared.
18
Operations of Matrices
Division of matrices
The quotient of matrices A and B can be obtained by
multiplying the numerator by the inverse matrix of the
denominator.
𝐴
= 𝐴𝐵 −1
𝐵
−1
Where 𝐵 is called the inverse matrix of B.
Inverse Matrix
The inverse matrix can be obtained using the following steps:
1. Form the cofactor matrix
2. Form the transpose matrix of the cofactor matrix
3. Evaluate the determinant of the matrix
4. Divide each element of the transposed cofactor matrix by
the determinant.
This document is for classroom use only and should not be shared.
19
Operations of Matrices
Minor Entries of a Matrix
If A is a square matrix of size (n x n), the minor entry 𝑀𝑖𝑗 is
the determinant of the (n-1) x (n-1) submatrix after
deleting the ith row and jth column from A.
Example:
Consider the following 3 x 3 matrix:
1 3 2
𝐴= 4 6 5
7 9 8
Find 𝑀11 and 𝑀21 .
This document is for classroom use only and should not be shared.
20
Operations of Matrices
Solution:
1 3 2
𝐴= 4 6 5
7 9 8
𝑀11 is the determinant of the 2 x 2 matrix after deleting
the 1st row and 1st column.
6 5
𝑀11 = = 6 8 − 9 5 =3
9 8
𝑀21 is the determinant of the 2 x 2 matrix after deleting
the 2nd row and 1st column.
3 2
𝑀21 = = 3 8 − 9 2 =6
9 8
This document is for classroom use only and should not be shared.
21
Operations of Matrices
Cofactor of an entry of a matrix
Given that 𝑀𝑖𝑗 is the minor entry for row i and column j in
a square matrix. The cofactor of row i and column j is
denoted as 𝐶𝑖𝑗 and is calculated by the formula:
𝐶𝑖𝑗 = −1 𝑖+𝑗 𝑀𝑖𝑗
Sign conventions:
+ − +
+ −
− + −
− +
+ − +
This document is for classroom use only and should not be shared.
22
Operations of Matrices
Example:
Find 𝐶31
3 3 3
𝐴 = −5 6 5
2 9 8
Solution:
𝐶31 = −1 3+1 𝑀31 = 𝑀31
3 3
𝑀31 = = 3 5 − 6 3 = −3
6 5
This document is for classroom use only and should not be shared.
23
Operations of Matrices
Cofactor of a matrix
A cofactor matrix is formed by replacing each element in
the given matrix by its cofactor.
Sign conventions:
+ − +
+ −
− + −
− +
+ − +
This document is for classroom use only and should not be shared.
24
Operations of Matrices
Example:
Find the cofactor matrix of A.
−3 2
𝐴=
5 −8
This document is for classroom use only and should not be shared.
25
Operations of Matrices
Example:
Find the cofactor matrix of B.
3 3 3
𝐵 = −5 6 5
2 9 8
This document is for classroom use only and should not be shared.
26
Operations of Matrices
Example:
Find the cofactor matrix of A.
−3 2
𝐴=
5 −8
+(−8) −(5) −8 −5
𝐶𝑜𝑓𝑎𝑐𝑡𝑜𝑟 𝑚𝑎𝑡𝑟𝑖𝑥 𝑜𝑓 𝐴 = =
−(2) +(−3) −2 −3
Find the cofactor matrix of B.
3 3 3
𝐵 = −5 6 5
2 9 8
6 5 −5 5 −5 6
9 8 2 8 2 9
3 3 3 3 3 3
𝐶𝑜𝑓𝑎𝑐𝑡𝑜𝑟 𝑚𝑎𝑡𝑟𝑖𝑥 𝑜𝑓 𝐵 =
9 8 2 8 2 9
3 3 3 3 3 3
6 5 −5 5 −5 6
This document is for classroom use only and should not be shared.
27
Operations of Matrices
Incorporating the sign conventions:
+(3) −(−50) +(−57)
𝐶𝑜𝑓𝑎𝑐𝑡𝑜𝑟 𝑚𝑎𝑡𝑟𝑖𝑥 𝑜𝑓 𝐵 = −(−3) +(18) −(21)
+(−3) −(30) +(33)
3 50 −57
𝐶𝑜𝑓𝑎𝑐𝑡𝑜𝑟 𝑚𝑎𝑡𝑟𝑖𝑥 𝑜𝑓 𝐵 = 3 18 −21
−3 −30 33
Transposed Cofactor matrix of B
3 3 −3
𝐶𝑜𝑓𝑎𝑐𝑡𝑜𝑟 𝑀𝑎𝑡𝑟𝑖𝑥 𝐵 𝑇 = 50 18 −30
−57 −21 33
This document is for classroom use only and should not be shared.
28
Operations of Matrices
Determinant of matrix B
3 3 3
𝐵 = −5 6 5
2 9 8
Using Cramer's rule
3 3 3 3 3
det 𝐵 = −5 6 5 −5 6൩
2 9 8 2 9
det 𝐵 = 3 6 8 + 3 5 2 + (3)(−5)(9) − ሾ 2 6 3
+ 9 5 3 + (8)(−5)(3)ሿ
det 𝐵 = 39 − 51 = −12
This document is for classroom use only and should not be shared.
29
Operations of Matrices
Inverse matrix of B 𝑩−𝟏
𝐶𝑜𝑓𝑎𝑐𝑡𝑜𝑟 𝑀𝑎𝑡𝑟𝑖𝑥 𝐵 𝑇 −1 3 3 −3
𝐵−1 = = 50 18 −30
det 𝐵 12
−57 −21 33
This document is for classroom use only and should not be shared.
30