Week 8: Chapter 5 Matrix: DR Chan Shiau Wei Email: Phone No: 011-33798215
Week 8: Chapter 5 Matrix: DR Chan Shiau Wei Email: Phone No: 011-33798215
Week 8: Chapter 5 Matrix: DR Chan Shiau Wei Email: Phone No: 011-33798215
Solution:
3 6 Row 1 (a) 3
A= 1 2 Row 2
(b) 2
5 8 Row 3
(c) 3 x 2
Column 1 Column 2
Types of Matrix
(a) Row Matrix: If a matrix has one row, it is called a row matrix.
3 4 2 1
(b) Column Matrix: If a matrix has one column, it is called a column 4
matrix. 9
5
(c) Square Matrix: A matrix with number of rows equals to number of
columns is called square matrix. 2 1 0
0 3 9
2 6 5
Types of Matrix
(d) Null Matrix: A matrix with each element equals to zero. 0 0
0 0
(e) Diagonal Matrix: A square matrix with all entries is equal to zero
except the diagonal entries. 2 0 0
0 3 0
0 0 5
(f) Identity Matrix: A square matrix with diagonal entries equals to one
and all other entries are zero
1 0 0
0 1 0
0 0 1
Types of Matrix
(i) Upper Triangular Matrix: A square matrix and 𝑎𝑚𝑛 = 0 for 𝑚 > 𝑛.
(ii) Lower Triangular Matrix: A square matrix and 𝑎𝑚𝑛 = 0 for 𝑚 < 𝑛.
3 7 2 2 −1 4 3 − 2 7 − (−1) 2−4 1 8 −2
8 −1 4 + 3 5 0 = 8 − 3 −1 − 5 4 − 0 = 5 −6 4
1 0 5 2 1 6 1−2 0−1 5−6 −1 −1 −1
Operations on Matrix
(c) Scalar Multiplication: 𝑘. 𝑎𝑖𝑗 , 𝑖 = 1, … , 𝑚 ; 𝑗 = 1, … , 𝑛
2 −1 4 3 ×2 3 × (−1) 3×4 6 −3 12
33 5 0 = 3×3 3×5 3 × 0 = 9 15 0
2 1 6 3×2 3×1 3×6 6 3 18
𝑝
(d) Matrix Multiplication: 𝑎𝑖𝑘 × 𝑏𝑘𝑗 = 𝑐𝑖𝑗 = 𝑘=1 𝑎𝑖𝑘 𝑏𝑘𝑗
3 −1 −2 3 3 × −2 + (−1 × 1) 3 × 3 + (−1 × 5) −7 4
× = =
4 2 1 5 4 × −2 + (2 × 1) 4 × 3 + (2 × 5) −6 22
Operations on Matrix
(e) Transposition: 𝑎𝑗𝑖𝑇 = 𝑎𝑖𝑗
2 −5 𝑇
2 3 4
=3 6
−5 6 1 2×3
4 1 3×2
(A ± B)T = AT ± BT
1 2 1 0 𝑇 2 2 𝑇 2 5
(𝐴 + 𝐵)𝑇 = ( + ) =( ) =
3 4 2 −1 5 3 2 3
1 2 𝑇 1 0 𝑇 1 3 1 2 2 5
AT + BT = ( ) +( ) = + =
3 4 2 −1 2 4 0 −1 2 3
Operations on Matrix
(e) Transposition: 𝑎𝑗𝑖𝑇 = 𝑎𝑖𝑗
(AT )T = A
1 2
𝐴=
3 4
𝑇 𝑇
T T 1 2 𝑇 1 3 1 2
(A ) =( ) = =
3 4 2 4 3 4
Operations on Matrix
(e) Transposition: 𝑎𝑗𝑖𝑇 = 𝑎𝑖𝑗
(AB)T = BT AT
𝑇 𝑇
1 2 1 0 1 × 1 + (2 × 2) 1 × 0 + (2 × −1)
(AB)T = × =
3 4 2 −1 3 × 1 + (4 × 2) 3 × 0 + (4 × −1)
𝑇 𝑇
1 + 4 0 + (−2) 5 −2 5 11
= = =
3 + 8 0 + (−4) 11 −4 −2 −4
1 0 𝑇 1 2 𝑇 1 2 1 3 5 11
BT AT =( ) 𝑥( ) = 𝑥 =
2 −1 3 4 0 −1 2 4 −2 4
Exercise 1: Operations on Matrix
2
4 0 −3 1 −1 2
Given 𝑃 = ,𝑄= and 𝑅 = −1 ,
−1 −2 3 0 3 4
3
5 −1 −1
Find (a) P+Q −1 1 7
−2 −2 7
(b) 2Q – P
1 8 5
(c) QR 9
9
(d) RR Not defined
T T 9 9
(e) R Q
4 −7 4
(f) P T Q 0 −6 −8
−3 12 6
Exercise 2: Operations on Matrix
1 3 1 −1 −2 0
If 𝑃 = 2 −1 0 and 𝑄 = 4 0 1,
0 4 2 1 3 2
1 2 0 −1 4 1
(a) Find 𝑃𝑇 and 𝑄𝑇 𝑃𝑇 = 3 𝑇
−1 4 , 𝑄 = −2 0 3
1 0 2 0 1 2
(b) Show that (5𝑃)𝑇 = 5𝑃𝑇
(c) Show that (𝑃 − 𝑄)𝑇 = 𝑃𝑇 − 𝑄 𝑇
Determinant
• The determinant is denoted as det (A) or 𝐴 .
𝐴 =𝑎
𝑎 𝑏
• The determinant of a 2 × 2 matrix A = is defined as
𝑐 𝑑
𝐴 = 𝑎𝑑 − 𝑏𝑐
Determinant
𝑎 𝑏 𝑐
• The determinant of a 3 × 3 matrix A = 𝑑 𝑒 𝑓 is defined as
𝑔 ℎ 𝑖
Extend the determinant's grid by
rewriting the first two columns of Then multiply along the down-
numbers diagonals and along the up-diagonals
𝑎 𝑏 𝑐 𝑎 𝑏 𝑎 𝑏 𝑐 𝑎 𝑏 𝑎 𝑏 𝑐 𝑎 𝑏
𝐴 = 𝑑 𝑒 𝑓𝑑 𝑒 = 𝑑 𝑒 𝑓𝑑 𝑒 = 𝑑 𝑒 𝑓𝑑 𝑒
𝑔 ℎ 𝑖 𝑔 ℎ 𝑔 ℎ 𝑖 𝑔 ℎ 𝑔 ℎ 𝑖 𝑔 ℎ
Solution:
3 0 13 0
det 𝐴 = 2 1 4 2 1
3 2 53 2
= 3×1×5 + 0×4×3 + 1×2×2 − 3×1×1
− 2×4×3 − 5×2×0
= 15 + 4 − 3 − 24
= −8
Exercise: Determinant
2 −6
(a) 16
1 5
7 6 5
(b) 1 2 1 0
3 −2 1
Elementary Row Operations
Three elementary row operations are
(a) Interchange any two rows, 𝑅𝑖 ↔ 𝑅𝑗
(b) Multiplying one row by a nonzero constant, 𝑘, 𝑘𝑅1
(c) Adding or subtracting one row with k times of another row,
𝑅𝑖 + 𝑘𝑅𝑗
0 2 0 1 2 9
0 5 7 0 5 7
1 2 9 0 2 0
Example: Elementary Row Operations
(b) Multiplying one row by a nonzero constant, 𝒌, 𝒌𝑹𝟏
1
1 4 2 𝑅2 1 4 2
5
0 5 10 0 1 2
0 0 9 0 0 9
Example: Elementary Row Operations
(C) Adding or subtracting one row with k times of another
row, 𝑹𝒊 + 𝒌𝑹𝒋
3 9 0
+ -3 6 2
0 15 2
1 3 5 𝑹𝟐 + 𝑹𝟑 1 3 5
3 9 0 0 15 2
−3 6 2 −3 6 2
Example: Elementary Row Operations
3 1
Find the inverse of A = using elementary row operation method.
2 5
Solution: 𝑅1 ⇒ 𝑅2 ⇒
3 11 0 𝑹𝟏 − 𝑹𝟐
1 −4 1 −1 𝑹𝟐 − 𝟐𝑹𝟏 1 −4 1 −1
2 50 1 2 5 0 1 0 13 −2 3
𝑅1 ⇒
𝑅2 ⇒ 𝟏
𝑹 1 −1 𝑹𝟏 + 𝟒𝑹𝟐 5 −1
𝟏𝟑 𝟐 1 −4 −2 3
0 1 1 0 13 13
13 13 0 1 −2 3
5 −1 13 13
13 13
∴ 𝐴−1 = −2 3
13 13
Exercise: Elementary Row Operations
Find the inverse of each matrix using elementary row operation:
(1) 2 5 3 −5
1 3 −1 2
(2) −1 0 1 1 1 1
4 −1 −2 0 1 2
−2 1 1 2 1 1