Engineering Mathematics 1 BMFG 1313 Matrices: Slloh@utem - Edu.my Irma@utem - Edu.my
Engineering Mathematics 1 BMFG 1313 Matrices: Slloh@utem - Edu.my Irma@utem - Edu.my
BMFG 1313
MATRICES
When
• 𝑚 = 𝑛 ∶ Square matrix of order 𝑛
𝑏1
𝑏2
• 𝑛 = 1 ∶ Column Vector, i.e. 𝑩 =
⋮
𝑏𝑚
Identity matrix:
the entries are all zeros except 𝑎𝑖𝑖 = 1, 𝑖 = 1,2, … 𝑛
1 0 0
1 0
e.g. 𝑰2 = and 𝑰3 = 0 1 0
0 1
0 0 1
1.2 Basic Operation on Vectors and Matrices
a) Equality
Two matrices are equal if and only if all their elements are the same including their order.
𝑨=𝑩
5 −1 2 −4 5−2 −1 − (−4) 3 3
4 6 − 3 7 = 4−3 6−7 = 1 −1
2 3 −7 8 2 − (−7) 3−8 9 −5
1.2 Basic Operation on Vectors and Matrices
c) Multiplication by a scalar
Scalar c is multiplied to each of the elements of matrix.
e.g.
3 −3 2 6 = 3(−3) 3(2) 3(6) = −9 6 18
0 3 −1 −2 0 −2 3 −2 −1 0 −6 2
−2 −4 2 6 = −2 −4 −2 2 −2 6 = 8 −4 −12
5 −3 7 −2 5 −2 −3 −2 7 −10 6 −14
1.2 Basic Operation on Vectors and Matrices
For example:
T T T T
𝑨 +𝑨 = 𝑨 + 𝑨T = 𝑨 + 𝑨T
and this shows 𝑨T + 𝑨 must be a symmetric matrix.
Exercise 1.3:
1.2 Basic Operation on Vectors and Matrices
Exercise 1.1:
2 −1 3 1 0 5 5 3
4 3 0
Let 𝑨 = 7 5 0 , 𝑩 = −2 4 6 ,𝑪= , 𝑫 = 7 −2
−3 6 −6
−2 8 1 3 7 −2 1 0
Find
1) 𝑨T + 2𝑩
2) 𝑩 − 5𝑪
3) 6 𝑫T − 2𝑪
4 7 8
22 36 6
[Ans: −5 13 20 ; undefined; ]
24 −24 12
9 14 −3
1.3 Properties of Matrix Multiplication
Matrix multiplication:
Given matrix A with order 𝑝 × 𝑞 and matrix B with order 𝑞 × 𝑟,
product of AB = C has an order of 𝑝 × 𝑟.
e.g.
Given 𝑨2×3 and 𝑩3×5 ,
The order of matrix C = AB is 2 × 5,
but BA is undefined.
1.3 Properties of Matrix Multiplication
Matrix multiplication:
To multiply two matrices, take the row of the first matrix multiply to the
column of the second matrix.
i.e. row1 × column2 gives the value of 𝑎12
For example:
3 0
1 3 2 4 −1
1 2
1X3 3X 2
1X2
= 1 3 +3 4 +2 1 1 0 + 3 −1 + 2 2 = 17 1
1.3 Properties of Matrix Multiplication
Matrix multiplication:
row2 × column3 gives the value of 𝑎23 = 4
For example:
2 3 −1 3 0 8
0 5 2 4 −1 2
−1 6 4 1 2 −3
2 3 + 3 4 + (−1)(1) 2 0 + 3 −1 + (−1)(2) 2 8 + 3 2 + (−1)(−3)
= 0 3 + 5 4 + 2(1) 0 0 + 5 −1 + 2(2) 0 8 + 5 2 + 2(−3)
−1 3 + 6 4 + 4(1) −1 0 + 6 −1 + 4(2) −1 8 + 6 2 + 4(−3)
17 −5 25
= 22 −1 4
25 2 −8
1.3 Properties of Matrix Multiplication
Some Properties:
Let 𝐴 ∈ 𝑀𝑚×𝑛 , let 𝐵 and 𝐶 have orders for which the indicated sums and products are
defined.
• 𝑨 𝑩𝑪 = 𝑨𝑩 𝑪 (associative law of multiplication)
• 𝑨 𝑩 + 𝑪 = 𝑨𝑩 + 𝑨𝑪 (left distributive law)
• 𝑩 + 𝑪 𝑨 = 𝑩𝑨 + 𝑪𝑨 (right distributive law)
• 𝑟 𝑨𝑩 = 𝑟𝑨 𝑩 = 𝑨(𝑟𝑩) for any scalar 𝑟
• 𝑰𝑚 𝑨 = 𝑨 = 𝑨𝑰𝑛 (identity for matrix multiplication)
• 𝑨𝑩𝑪 T = 𝑪T 𝑩T 𝑨T (Transpose of a product)
• 𝑨𝑘 = 𝑨 … 𝑨 for k times (Power of a matrix)
Warnings:
• 𝑨𝑩 ≠ 𝑩𝑨
• The cancellation laws do not hold for matrix multiplication.
i.e., If 𝑨𝑩 = 𝑨𝑪, 𝑩 ≠ 𝑪 in general.
• If 𝑨𝑩 = 𝟎𝑚×𝑛 , we cannot conclude either 𝑨 = 𝟎 or 𝑩 = 𝟎.
1.3 Properties of Matrix Multiplication
Exercise 1.2:
2 −1 3 1 0 5 2 −1 0
Given 𝑨 = 7 5 0 , 𝑩 = −2 4 6 , 𝑪 = 1 2 −6 ,
−2 8 1 3 7 −2 3 0 5
Find
1) 3𝑩𝑪
2) (𝑨𝑩)T +2𝑪
3) Verify Associative law of multiplication
51 −3 75 17 −5 −15
[Ans: 54 30 18 ; 19 24 27 ]
21 33 −156 4 65 46
1.4 Determinants
Computation of determinant, Method 1:
For a matrix with order 2 × 2,
𝑎 𝑏
i.e. = 𝑎𝑑 − 𝑏𝑐
𝑐 𝑑
For a matrix with order 3 × 3,
𝑎 𝑏 𝑐
i.e. 𝑑 𝑒 𝑓 = 𝑎𝑒𝑖 + 𝑏𝑓𝑔 + 𝑐𝑑ℎ − (𝑐𝑒𝑔 + 𝑏𝑑𝑖 + 𝑎𝑓ℎ)
𝑔 ℎ 𝑖
𝑎 𝑏 𝑐 𝑎 𝑏 𝑐
𝑑 𝑒 𝑓 𝑑 𝑒 𝑓
𝑔 ℎ 𝑖 𝑔 ℎ 𝑖
1.4 Determinants
Method 2:
Determinant of an 𝑛 × 𝑛 matrix A is denoted by 𝑨 and it is computed by
Cofactors Expansion along a row:
𝑛 i.e. 𝑖 = 2 gives
cofactor
𝑨 = (−1)𝑖+𝑗 𝑎𝑖𝑗 𝑴𝑖𝑗 expansion along
𝑗=1 the second row
or Cofactors Expansion along a column:
𝑛
i.e. 𝑗 = 3 gives
𝑖+𝑗
𝑨 = (−1) 𝑎𝑖𝑗 𝑴𝑖𝑗 cofactor
expansion along
𝑖=1
the third column
where 𝑎𝑖𝑗 is the entry of matrix A and
𝑴𝑖𝑗 is known as minor.
1.4 Determinants
Minor of a matrix, 𝑴𝑖𝑗 :
Minor, 𝑴𝑖𝑗 , of an 𝑛 × 𝑛 matrix A is the determinant of (𝑛 − 1) × (𝑛 − 1) matrix
formed from A by deleting the row and column that contains 𝑎𝑖𝑗 .
Example:
2 −1 3
Given 𝑨 = 6 5 8 , find the minor 𝑴32 .
−4 7 1
Solution:
Delete the row and column that contains 𝑎32 = 7:
2 −1 3
𝑨= 6 5 8
−4 7 1
2 3
𝑴32 = = 16 − 18 = −2
6 8
1.4 Determinants
The sign associated with the minor is given as follows:
+ − + − ⋯
− + − + ⋯ Alternating signs
𝑨= + − + − ⋯ start with “+” at
𝑎11
− + − + ⋯
⋮ ⋮ ⋮ ⋮
A minor multiplied by the appropriate sign is known as cofactor, 𝑨𝑖𝑗 .
So, 𝑨𝑖𝑗 = (−1)𝑖+𝑗 𝑴𝑖𝑗
2 −1 3
e.g. Given 𝑨 = 6 5 8 ,
−4 7 1
−1 3
𝑨21 = (−1) = 22
7 1
6 5
𝑨13 = (+1) = 62
−4 7
1.4 Determinants 𝑛
𝟏 0 0 0
1 −𝟏 0 0
= 1 −1 2 4 = −8
1 3 𝟐 0
2 1 1 𝟒
Lower triangular
1.4 Determinants
Properties of determinants:
Theorem 2:
Let 𝐴 be a square matrix.
a) If a multiple of one row of 𝑨 is added to another row to produce a matrix 𝑩,
then 𝑩 = 𝑨 .
1 2 1 2
e.g. =
2 3 −2𝑟1 +𝑟2 0 −1
Theorem 4:
If two rows (columns) of 𝑨 are equal, then 𝑨 = 0.
1 0 3 1 2 5 8 3
1 0 5 1 1 0 1 0
e.g. = 0, = 0.
2 1 7 2 5 8 4 6
1 0 1 1 1 0 1 0
1.4 Determinants
Properties of determinants:
Theorem 5:
If a row (column) of 𝑨 consists entirely of zeroes, then 𝑨 = 0.
1 0 1 5
1 2 5
4 0 2 2
e.g. = 0, 4 −2 7 = 0.
1 0 1 1
0 0 0
1 0 3 4
Theorem 6:
• If 𝑨 and 𝑩 are 𝑛 × 𝑛 matrices, 𝑨𝑩 = 𝑨 𝑩 .
• If 𝑨 is an 𝑛 × 𝑛 matrix, then 𝑨 is invertible or nonsingular matrix iff 𝑨 ≠ 0.
• 𝑨 + 𝑩 ≠ 𝑨 + 𝑩 in general.
1.4 Determinants
Exercise 1.3:
Evaluate the following determinants:
1 −3 1 −2
2 −5 −1 −2
1) by using cofactor expansion across third column.
0 −4 5 1
−3 10 −6 8
5 2 0
2) 0 −2 5
0 0 4
4 2 2 0
2 0 0 0
3)
3 0 0 1
0 0 1 0
[Ans: 0; - 40; 4]
1.4 Determinants
Exercise 1.3:
Evaluate the following determinants:
𝑎 𝑏 𝑐
4) Given 𝑑 𝑒 𝑓 = 7, find
𝑔 ℎ 𝑖
𝑎 𝑏 𝑐 𝑎+𝑑 𝑏+𝑒 𝑐+𝑓
a) 3𝑑 3𝑒 3𝑓 b) 𝑑 𝑒 𝑓
𝑔 ℎ 𝑖 𝑔 ℎ 𝑖
1 3 2
5) −2 3 −4
5 5 6
[Ans: 21; 7; -36]
1.5 Inverse of a Matrix
Given a matrix A,
if 𝑩𝑨 = 𝑨𝑩 = 𝑰, it means that B is the inverse of A and hence,
𝑩 = 𝑨−1
To compute an inverse from a matrix,
−1
1
𝑨 = adj 𝑨
𝑨
where 𝑨 ≠ 0 (A is a nonsingular matrix) and adj A is an adjoint matrix of A
formed by transpose matrix which consists of cofactors of each of the elements
in A.
1.5 Inverse of a Matrix
Example:
3 −2 1
Given 𝑨 = 5 6 2 , find the inverse matrix of A.
1 0 −3
Solution:
Step 1: Find the determinant of matrix
3 −2 1
5 6 2 = 3 6 −3 + −2 2 1 + 5 0 1
1 0 −3
− 1 6 1 + 5 −2 −3 + 3 2 0
= −94
1.5 Inverse of a Matrix
Solution:
Step 2: Find matrix of cofactors, B
6 2 5 2 5 6
+ − +
0 −3 1 −3 1 0
−2 1 3 1 3 −2
𝑩= − + −
0 −3 1 −3 1 0
−2 1 3 1 3 −2
+ − +
6 2 5 2 5 6
+(−18) −(−17) +(−6) −18 17 −6
= −(6) +(−10) −(2) = −6 −10 −2
+(−10) −(1) +(28) −10 −1 28
1.5 Inverse of a Matrix
Solution:
Step 3: Find adj A = 𝑩T
−18 −6 −10
adj 𝑨 = 𝑩T = 17 −10 −1
−6 −2 28
−1 1
Step 4: Find inverse matrix 𝑨 = adj 𝑨
𝑨
9 3 5
47 47 47
1 −18 −6 −10 17 5 1
𝑨−1 = 17 −10 −1 = −
−94 94 47 94
−6 −2 28
3 1 14
−
47 47 47
1.5 Inverse of a Matrix
Exercise 1.4:
Find the inverse of the following matrices:
2 4
1) 𝑨 =
5 10
−1 2
2) 𝑩 =
3 5
2 1 3
3) 𝑪 = 1 −1 1
1 4 −2
5 0 3
4) 𝑫 = 6 4 −2
1 0 −3
−1/7 1 2/7 1/6 0 1/6
−5/11 2/11
[Ans: no inverse; ; 3/14 −1/2 1/14 ; −2/9 1/4 −7/18 ]
3/11 1/11
5/14 −1/2 −3/4 1/18 0 −5/18