Week 8: Chapter 5 Matrix: DR Chan Shiau Wei Email: Phone No: 011-33798215

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

WEEK 8: Dr Chan Shiau Wei

Chapter 5 ~ Matrix Email: swchan@uthm.edu.my


Phone No: 011-33798215
CHAPTER 4: MATRIX
Matrix
Is a rectangular array of numbers.

𝑎11 𝑎12 𝑎1𝑛 • The order of a matrix with m rows and


𝑎21 𝑎22 ⋯ 𝑎2𝑛 n columns is 𝑚 × 𝑛.
• Each entry of a matrix is called an
⋮ ⋮ ⋮ element.
𝑎𝑚1 𝑎𝑚2 ⋯ 𝑎𝑚𝑛 • For example, 𝑎12 , 𝑎21 𝑎𝑛𝑑 𝑎53 are
elements of a matrix.
Example 1: Matrix
The number of students in three classes of a secondary school is given as
follows:
Class Boy Girl
4A 18 20
4B 16 15
4C 20 12

Form a matrix from the above information.


Solution:
18 20
16 15
20 12
Example 2: Matrix
3 6
Given that matrix A = 1 2 , determine
5 8
(a) The number of rows
(b) The number of columns
(c) The order

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

(g) Triangular Matrix

(i) Upper Triangular Matrix: A square matrix and 𝑎𝑚𝑛 = 0 for 𝑚 > 𝑛.

(ii) Lower Triangular Matrix: A square matrix and 𝑎𝑚𝑛 = 0 for 𝑚 < 𝑛.

𝑎11 𝑎12 𝑎13 2 1 7 2 0 0 𝑎11 𝑎12 𝑎13


𝑎21 𝑎22 𝑎23 0 3 9 6 3 0 𝑎21 𝑎22 𝑎23
𝑎31 𝑎32 𝑎33 0 0 5 2 6 5 𝑎31 𝑎32 𝑎33
Upper Triangular Matrix Lower Triangular Matrix
Exercise: Matrices

Matrix Types Number Number Order Element


of of rows of 𝒂𝟏𝟏 𝒂𝟏𝟐 𝒂𝟐𝟏 𝒂𝟐𝟐
Matrix columns
7 2
1 −3
15
−10
−21
3 12 −8
Operations on Matrix
(a) Addition: 𝑎𝑖𝑗 + 𝑏𝑖𝑗 , 𝑖 = 1, … , 𝑚 ; 𝑗 = 1, … , 𝑛
3 7 2 2 −1 4 3 + 2 7 + (−1) 2+4 5 6 6
8 −1 4 + 3 5 0 = 8 + 3 −1 + 5 4 + 0 = 11 4 4
1 0 5 2 1 6 1+2 0+1 5+6 3 1 11

(b) Subtraction: 𝑎𝑖𝑗 − 𝑏𝑖𝑗 , 𝑖 = 1, … , 𝑚 ; 𝑗 = 1, … , 𝑛

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

If A is an 𝑚 × 𝑛 matrix, then 𝐴𝑇 is an 𝑛 × 𝑚 matrix. The


properties of transpose are
(i) (A ± B)T = AT ± BT
(ii) (AT )T = A
(iii) (AB)T = BT AT
Operations on Matrix
(e) Transposition: 𝑎𝑗𝑖𝑇 = 𝑎𝑖𝑗

(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 1 × 1 matrix A = 𝑎 is defined as

𝐴 =𝑎

𝑎 𝑏
• 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

𝑎 𝑏 𝑐 𝑎 𝑏 𝑎 𝑏 𝑐 𝑎 𝑏 𝑎 𝑏 𝑐 𝑎 𝑏
𝐴 = 𝑑 𝑒 𝑓𝑑 𝑒 = 𝑑 𝑒 𝑓𝑑 𝑒 = 𝑑 𝑒 𝑓𝑑 𝑒
𝑔 ℎ 𝑖 𝑔 ℎ 𝑔 ℎ 𝑖 𝑔 ℎ 𝑔 ℎ 𝑖 𝑔 ℎ

= aei + bfg + cdh − gec − hfa − idb


Add the down-diagonals and subtract the up-diagonals
Example: Determinant
3 0 1
Find det (A) if A = 2 1 4 .
3 2 5

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

Find the determinants of the following matrices:

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,
𝑅𝑖 + 𝑘𝑅𝑗

The elementary row operations can be used to obtain the


inverse of matrices by reducing the augmented [A / I] into
[I / A-1].
Example: Elementary Row Operations
(a) Interchange any two rows, 𝑹𝒊 ↔ 𝑹𝒋

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy