Matrix Algebra

You might also like

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

MATRIX ALGEBRA

Dr. Mohammad Jahangir Alam


Professor
Department of Economics
Jahangirnagar University
Savar, Dhaka

1
LEARNING OUTCOMES
1. Identify the properties of matrices.
2. Solve systems of linear equations using
matrices.

2
DEFINITION
• A MATRIX is a rectangular array of numbers within brackets.
1 0 2
1 2 3 1
−2 3 5 , ,
4 5 6 0
−1 4 1
• The numbers in the array are called entries/element in the matrix.
• The size/order/dimension of a matrix is described in terms of
number of rows X columns.
• For example, Matrix A below has 3 rows and 3 columns.

1 0 2 size/order/dimension : 3 x 3 (read as 3 by 3)
𝐴 = −2 3 5
Hence, matrix A can be written as A3x3.
−1 4 1 3
DEFINITION
1 0 2 • 𝑎𝑖𝑗 denotes the elements in rows 𝑖 and
𝐴 = −2 3 5 column 𝑗 respectively.
−1 4 1
• For example:
𝐴12 = element on row 1, column 2 = 0
𝐴21 = element on row 2, column 1 = −2
𝐴32 = element on row 3, column 2 = 4

• In total, Matrix A has nine elements.

4
Square Matrix
0 1 6
1 −1
2 4
−2 4 1 Triangular Matrix
3 5 1
𝑎11 0 0 𝑎11 𝑎12 𝑎13
• Number of rows equal
𝑎21 𝑎22 0 0 𝑎22 𝑎23
to number of columns.
𝑎31 𝑎32 𝑎33 0 0 𝑎33
Diagonal Matrix 𝐋𝐨𝐰𝐞𝐫 𝐔𝐩𝐩𝐞𝐫
𝑎11 0 0 • Lower Triangular – all elements above
the main diagonal elements are zero.
0 𝑎22 0
0 0 𝑎33 • Upper Triangular – all elements below
the main diagonal elements are zero
• All elements other than
the main diagonal are
zero. 5
Column Matrix
0
Row Matrix
1
−2 0 1 0 1 0
2
3 • The size is 1xn.
• The size is mx1.

Symmetric Matrix Identity Matrix


1 0 2 1 0 0
0 −3 4 0 1 0
2 4 5 0 0 1
• 𝑎𝑖𝑗 = 𝑎𝑗𝑖 • The diagonal are 1, and
• Example: 𝑎21 = 0, 𝑎12 = 0 the others are 0.
𝑎31 = 2, 𝑎13 = 2 • Denoted as In . 6
Basic Operation
Ex. 1
1 0 2 2 1 −2
𝐴 = −2 3 5 , 𝐵= 4 1 7
−1 4 1 6 4 0

1+2 0+1 2−2 3 1 0


Addition/ 𝐴 + 𝐵 = −2 + 4 3 + 1 5 + 7 = 2 4 12
Subtraction −1 + 6 4 + 4 1 + 0 5 8 1

2 1 −2 4 2 −4
Scalar 2𝐵 = 2 4 1 7 = 8 2 14
multiplication 6 4 0 12 8 0
7
Basic Operation
In mathematics,
A MATRIX IS CONFORMABLE if its
dimensions are suitable for defining
some operation.
Reference: Wikipedia

If two matrices have the same


dimensions (numbers of rows and
numbers of columns), they are
CONFORMABLE for addition. 8
Basic Operation
Ex. 2 Based on the matrices below, answer the following
questions.
1 0 2 2 1 −2
𝐴 = −2 3 5 , 𝐵= 4 1 7
−1 4 1 6 4 0
a) 2A − B
b) Find matrix C3×3 , if − A + C = B.

9
Basic Operation
Matrix Multiplication Determine the size of the
Ex. 3 matrix obtained from the
matrix multiplication(if
defined).

1 2 2 3 1 2
a) 2 3 b)
3 4 1 5 3 4

1 2 3 1 2 1 2 1 2 3
c) d)
3 2 1 3 4 3 4 3 2 1
10
Basic Operation
Matrix Multiplication

Ex. 4 Calculate the following matrix multiplication.


𝟏×2 2×𝟐 𝟏×𝟐
1 2
a) 2 3 = 2 1 +3 3 2 2 +3 4 = 11 16
3 4

𝒂𝟏𝟏 = multiply all element in row 1(1st matrix) with corresponding element in
column 1 (2nd matrix)
𝒂𝟏𝟐 = multiply all element in row 1(1st matrix) with corresponding element in
column 2 (2nd matrix) 11
Basic Operation
Matrix Multiplication

Ex. 4 Calculate the following matrix multiplication.


𝟐×2 2×𝟐 𝟐×𝟐
−1 3 1 0
b)
1 5 3 1
𝟐×2 2×𝟑 𝟐×𝟑
1 2 1 2 3
c)
3 4 3 2 1
12
Basic Operation
Matrix Multiplication
THEOREM
1. A BC = AB C

2. A B + C = AB + BC

3. A + B C = AC + BC

4. k AB = kA B = A kB

5. Ak = AAA … k times of A ; A3 = AAA

13
Basic Operation
Transposition 𝑨𝒊𝒋 → 𝑨𝒋𝒊
- The transpose of matrix A is denoted as AT.

Ex. 5 Find the transpose for the following matrix.


a) A = 2 3 T 2
a) A =
3
1 2
b) B = T 1 3
3 4 b) B =
2 4
1 2 3 1 3
c) C =
3 2 1 c) CT = 2 2
3 1
14
Basic Operation
Transposition
THEOREM
T T
1. A =A
T
2. A+B = AT + BT

3. kA T = kAT

4. AB T = B T AT

5. AAT = AT A (symmetric matrices)

15
Basic Operation
EXERCISE SET 1.3
3. Consider the matrices
 3 0  1 5 2  6 1 3
  4 − 1  1 4 2    
A = − 1 2 , B =   , C =   , D =  − 1 0 1 , E =  − 1 1 2 
 0 2  3 1 5
 1 1  3 2 4  4 1 3

In each part, compute the given expression (where possible).


(a) D + E (f) 4E − 2D
(b) D − E (g) − 3(D + 2E )
(c) 5 A (h) A − A
(d) − 7C
(e) 2B − C 16
Basic Operation
EXERCISE SET 1.3
4. Using the matrices in Exercise 3, in each part compute the given
expression (where possible).
(a) 2 AT + C (h) (2E − 3D )
T T T

(b) DT − E T (i) (CD)E


(c) (D − E )
T
( j) C(BA)
(d) B T − 5C T
1 T 1
(e) C − A
2 4
(f) B − B T
(g) 2E T − 3DT 17
Basic Operation
EXERCISE SET 1.3
17. Solve the matrix equation for a, b, c and d.
a 3   4 d − 2c
 = 
 − 1 a + b   d + 2 c − 2 

18. Solve the matrix equation for a, b, c and d.


 a − b b + a  8 1
 = 
3d + c 2d − c 7 6

18
• Only square matrices have determinant
• Determinant of A is noted as det(A) or |A|
• Determinant of A is a NUMBER, NOT A MATRIX!
Matrix size : 1x1 Matrix size : 2x2

A = m , A = m a b 
A=   , A = ad − bc
A = 2 , A = 2 c d
 1 2
A=   , A = 1(3 ) − 2(2 ) = −1
2 3  19
Example 1 Find the determinant for the following matrices.

 1 2 − 1 0  3 2 
A=   B=  C= 
3 4   0 − 4 0 6 

This method is called as


COFACTOR/LAPLACE EXPANSION
20
n
Matrix size : 3x3 A =  aijCij , where Cij is the cofactor of i th row
j =1

and jth column

a b c e f
  d f d e
A = d e f  A =a −b +c
h i g i g h
 g h i 
How do we decide the sign
+ − + 
  b c a c a b
 − + −  A = −d +e −f
+ − +  h i g i g h
REMEMBER!
Cofactor expansion also
Example 2 can be done along the jth
column.
 1 2 − 3

A = 0 − 2 −1 
  − 2 −1 0 −1 0 −2
4 0 5  A =1 −2 + (− 3 )
0 5 4 5 4 0
+ − + 
  = 1(− 10 − 0 ) − 2(0 + 4 ) − 3(0 + 8 )
− + − = −10 − 8 − 24
+ − + 
= −42
22
Click the matrix for
answer!
Example 3 Find the determinant for the following matrices by using
cofactor expansion.
 1 2 − 1 4 1 3  2 1 − 1
A = 0 0 3  B = 0 2 5  C = 3 1 − 2 
     
 1 0 4  0 − 2 3  1 − 2 5 

23
Example 4 Find the determinant for the following matrices by using
Sarrus’ Rule. (only for matrix of order 3 and above)
1. Copy the first 2 columns on the right
2. Multiply the elements along the highlighted element below

 1 2 − 1 1 2  1 2 − 1 1 2
0 0 3  0 0 0 0 3  0 0
   
 1 0 4  1 0  1 0 4  1 0

S1 = 1(0 )(4 ) + 2(3 )(1) + (− 1)(0 )(0 ) S2 = −1(0 )(1) + 1(3 )(0 ) + 2(0 )(4 )
=6 =0
A = S1 − S2 = 6 − 0 = 0
24
Let A and B be square matrices, and k be a nonzero
constant.

kA = k A
n
−11
A =
n = size of matrix(nxn) A
T
A+ B  A + B A = A

AB = A  B AB = BA
k k
A = A , k is positive integer
25
PROPERTIES OF

Example
. 5 Consider the Matrix A and Matrix B below and let k = 2 and
n = 3. Proof all the properties of determinant from the
previous slide.

 1 2 − 1
A = 0 0 3 
 
 1 0 4 

4 1 3 
B = 0 2 5 
 
0 − 2 3
26
PROPERTIES OF

 1 2 3 0 2 3 
A = 0 if A has zero rows or
A = 4 5 6  , A = 0 B = 0 5 6  , B = 0
zero column    
0 0 0 0 1 1

Two or more  1 2 3  1 2 1
rows/columns in A A = 4 5 6  , A = 0 B = 4 5 4  , B = 0
   
are the same  1 2 3  1 3 1

A row/column is a
multiple of another  1 2 2  1 2 3
row/column A = 4 5 8  , A = 0 B = 4 5 6  , A = 0
   
 1 3 2 2 4 6 
27
3 operations
Multiply a row with a nonzero
1 constant

2 Interchange of two rows

Add a multiple of row to


3 another row
28
1. Multiply a row with a nonzero constant
𝑐𝑅𝑖 → 𝑅𝑖
Example 1
1 2 3 2 4 6 2 4 6
−1 4 5 2𝑅1 → 𝑅1 −1 4 5 −𝑅2 → 𝑅2 1 −4 −5
−2 1 2 −2 1 2 −2 1 2

1 2 4 6
𝑅3 → 𝑅3
2 1 −4 −5
1
−1 1
2
29
2. Interchange of two rows
𝑅𝑖 ↔ 𝑅𝑗
Example 2
1 2 3 −1 4 5 −1 4 5
−1 4 5 𝑅1 ↔ 𝑅2 1 2 3 𝑅2 ↔ 𝑅3 −2 1 2
−2 1 2 −2 1 2 1 2 3

30
3. Add a multiple of row to another row
𝑅𝑖 + 𝑐𝑅𝑗 → 𝑅𝑖
Example 3
1 2 3 −1 10 13 −1 10 13
−1 4 5 𝑅1 + 2𝑅2 → 𝑅1 −1 4 5 𝑅2 − 𝑅3 → 𝑅2 1 3 3
−2 1 2 −2 1 2 −2 1 2
1 + 2 −1 = −1 −1 + 2 = 1
2 + 2 4 = 10 4−1=3
3 + 2 5 = 13 5−2=3

31
PROPERTIES OF Effect of row elementary operations on
determinant

1. Multiply a row with a nonzero constant


Ex 1 2 4  6 12
Given that A =   and, A = −2. If B =   , find B .
x y  x y 
A B
kR i → R i
A B 2 4  3R1 → R1 6 12
x y x y 
If A = a, then B = ka    

 B = 3(− 2 ) = −6
32
PROPERTIES OF Effect of row elementary operations on
determinant

2. Interchange of two rows


Ex 1 2 4   x y
Given that A =   and, A = −2. If B =  , find B .
x y 
2 4 

Ri  R j A B
A B 2 4  x y
R1  R2
If A = a, then B = −a x y 2 4 
   

 B = − (− 2 ) = 2
33
PROPERTIES OF Effect of row elementary operations on
determinant

3. Add a multiple of row to another row


Ex 1 2 4   2 + 2 x 4 + 2y 
Given that A =   and, A = −2. If B =  , find B .
x y  x y 

kRi + R j → Ri A B
A B 2 4  R1 + 2R2 → R1 2 + 2 x 4 + 2y 
If A = a, then B = a x y  x y 
  
34

 B = −2
PROPERTIES OF

EXERCISE SET 2.1


In exercise 21 – 26, evaluate det(A) by cofactor expansion
along a row or column of your choice.

− 3 0 7 1 k k 2  3 3 0 5
21. A =  2 5 1 
23. 1 k k 2 2 2 0 − 2
  25.  
 − 1 0 5 1 k k 2  4 1 − 3 0 
 
 2 10 3 2 
3 3 1 k + 1 k − 1 7 
22. A =  1 0 − 4 24.  2 k − 3 4
   
 1 − 3 5   5 k + 1 k 
35
PROPERTIES OF

EXERCISE SET 2.2


a b c
In exercise 20 – 27, evaluate the determinant given that d e f = −6.
g h i
g h i a b c a+d b+e c+f a b c
20. d e f 22. d e f 24. −d −e −f 26. 2d 2e 2f
a b c 2a 2b 2c g h i g + 3a h + 3b i + 3c
d e f 3a 3b 3c a+ g b+ h c+f − 3a − 3b − 3c
21. g h i 23. − d − e − f 25. d e f 27. d e f
a b c 4g 4h 4i g h i g − 4d h − 4e i − 4f
36
If A is a square matrix, and if a
matrix B of the same size can Inverse of
Matrix A is
be found such that ,
denoted by
AB = BA = I then,
−1
A is said to be INVERTIBLE A
and
B is called as inverse of A.
I is an identity matrix with the same size as A. 37
A non square matrix is not invertible, but not all
square matrices is invertible
Inverse of 2x2 matrix
a b  −1 1  d − b
A=   ; A = − c a 
 c d  ad − bc  

a b 
The matrix   is invertible if and only if ad − bc  0
c d
38
3 − 1
Example 1 Find the inverse of M, given that M =   .
2 − 1
−1 1  − 1 1 How can I check my
M =  
3(− 1) − (− 1)(2 ) − 2 3 answer?

 − 1 1
= −1 
− 2 3
 1 − 1 −1 −1 1 0
= MM = M M =  
  0 1
2 3  39
Inverse of 3x3 matrix

Elementary row
operation
Adjoint Method
1. Find determinant
2. Find Minor and Cofactor
3. Find Adjoint
4. Find inverse
40
Given that A is a square matrix with i row and j column

Minor of entry aij Example 2 Find the minor of entry


3 − 1
➢ is denoted by Mij a11 and a21, given that A =   .
2 − 1
➢ is defined to be the 3 −1
M11 = = − 1 = −1
determinant of the submatrix 2 −1
➢ that remains after the ith row
3 −1
M21 = = 3 =3
and jth column are deleted 2 −1
from A. 41
3 1 − 4 
Example 3 Find the minor for all entry given that, A =  2 5 6  .
 
 1 4 8 
3 1 −4
5 6
M11 = 2 5 6 = = 40 − 24 = 16 M23 = 11 M32 = 26
4 8
1 4 8
M31 = 26 M33 = 13
2 6 1 −4
M12 = = 10 M21 = = 24
1 8 4 8 Matrix of Minor

2 5 3 −4 16 10 3 
M13 = =3 M22 = = 28 M = 24 28 11
1 4 1 8  
26 26 13 42
Given that A is a square matrix with i row and j column

➢ is denoted by Cij
Cofactor of entry aij
➢ is defined as (–1)i+j Mij
Example 4 Find the cofactor matrix of matrix A from the previous
example 3 (slide 40).
Matrix of Minor C 11 = (− 1) M11 = 16
1+1 Cofactor Matrix

16 10 3  + 16 − 10 + 3 
C 12 = (− 1) M12 = −10
1+ 2

M = 24 28 11 C = − 24 + 28 − 11


    
26 26 13 + 26 − 26 + 13
C 33 = (− 1)
3+3
M33 = 13 43
Example 5 Find the minor and the cofactor for all entry given that,
 1 2 − 3
A = 0 − 2 − 1 .
 
4 0 5 

M11 = −10 M12 = 4 M13 = 8  + M11 − M12 + M13 


CF =  − M21 + M22 − M23 
M21 = 10 M22 = 17 M23 = −8  
+ M31 − M32 + M33 
M31 = −8 M32 = −1 M33 = −2
− 10 −4 8 
= − 10 17 8 
 
 − 8 1 − 2 44
Inverse of 3x3 matrix Adjoint Method
 1 2 − 3
Example 6 Find the inverse of matrix A given that, A = 0 − 2 − 1 .
 
4 0 5 

1. Find determinant 3. Find Adjoint of A


A = −42
adj(A ) = (CF )
T

2. Find Minor and Cofactor − 10 − 10 − 8


− 10 4 8  − 10 −4 8  Adj(A) =  − 4 17 1
 
M =  10 17 − 8 CF = − 10 17 8   8 8 − 2
   
 − 8 − 1 − 2  − 8 1 − 2 45
Inverse of 3x3 matrix Adjoint Method
 1 2 − 3
Example 6 Find the inverse of matrix A given that, A = 0 − 2 − 1 .
 
4 0 5 

4. Find inverse of A
 5 5 4 
1  21 
A −1
= adj(A )  − 10 − 10 − 8   21 21
A −1 1   2 17 1
A = − 4 17 1 = − − 
− 42    21 42 42 
 8 8 − 2  4 4 1 
− −
 21 21 21 
46
Inverse of 3x3 matrix Adjoint Method

Example 7
Find the inverse of
matrix B given that,
 1 2 − 1
B=2 5 1 .
 
− 1 − 2 2 

47
Finding inverse by Elementary row operation

A In  ⎯⎯ ⎯ ⎯ ⎯⎯→  In A
row operation −1

Example 8 Find the inverse of matrix B by using row operations given that,
 1 2
A=   .
2 5 
 1 2 1 0  1 2 1 0  R − 2R → R  1 0 5 − 2 
2 5 0 1 R − 2 R → R 1 2 1
0 1 − 2 1 
 
2 1 2
0 1 − 2 1  
 
 A In   In A−1
−1  5 − 2
Answer : A =   .
− 2 1  48
Example 9  1 2 − 1
Find the inverse of matrix B by using row operations given that, B =  2 5 1  .
− 1 − 2 2 

49
PROPERTIES

• (A ) = A
−1 −1

• (A ) = (A )
k −1 −1 k

1 −1
• (cA) −1
= A
c
• (A )
T −1
= (A )
−1 T

• ( AB) = B −1A−1
−1

50
EXERCISE SET 1.4
In exercise 4 – 7, compute the inverse of the following matrices.

3 1 2 − 3  6 4 2 0 
4. A =   5. B =   6. C =   7. D =  
5 2   4 4  − 2 − 1  0 3 

In exercise 14 – 17, use the given information to find A.

2 − 1 − 3 7 
5. (7 A)
−1 −1
14. A =   = 
 3 5   1 − 2 

51
EXERCISE SET 1.5
In exercise 9 – 24, compute the inverse of the following matrices.

3 4 − 1 1 1 2
5 5 − 
13. A =  1 0 3  5 2 6 6 
1 1 1 
 
16. C =   19. D = 2 7 6
2 5 − 4  
5 5 10  2 7 7
1 − 4 1 
 1 2 0  5 5 10 
14. B = 2 1 2
 
0 2 1

52
Terms & definition 3. In any two
successive rows
ROW ECHELON FORM that do not
1. If a row does not 1 2 0 3 0 7 consist entirely of
zeros, the leading
consist entirely of 0 0 1 0 0 1 1 in the lower row
zeros, then the first
nonzero number in
  occurs farther to
the row is a 1. We 0 0 0 0 1 2 the right than the
call this a leading 1.   leading 1 in the
0 0 0 0 0 0 higher row.

2. If there are any rows that


consist entirely of zeros, then
they are grouped together
at the bottom of the matrix 53
Terms & definition 3. In any two
REDUCED successive rows
ROW ECHELON FORM that do not
1. If a row does not 1 2 0 3 0 7 consist entirely of
zeros, the leading
consist entirely of 0 0 1 0 0 1 1 in the lower row
zeros, then the first
nonzero number in
  occurs farther to
the row is a 1. We 0 0 0 0 1 2 the right than the
call this a leading 1.   leading 1 in the
0 0 0 0 0 0 higher row.

2. If there are any rows that


consist entirely of zeros, then 4. Each column that contains a
they are grouped together leading 1 has zeros everywhere
at the bottom of the matrix else in that column. 54
Terms & definition
Gauss-Jordan elimination
– The procedure for reducing a matrix to reduced row
echelon form. This procedure consist of two parts, a forward
phase in which zeros are introduced below the leading 1's
and then a backward phase in which zeros are introduced
above the leading 1's.

Gaussian elimination
– Only the forward phase is used and the procedure
produces a row echelon form only.
55
Terms & definition

Rank of a matrix
rank [A] or r[A] is the number of non zero rows of a matrix in
row echelon form

1 2 − 1 4   1 4 − 3 7 0 1 2 6 0 
A = 0 1 3 7  B = 0 1 6 2  C = 0 0 0 0 0 
     
0 0 1 − 1 0 0 0 0 0 0 0 0 0

r ( A) = 3 r (B ) = 2 r (C) = 1 56
Example 1 Terms & definition
Determine whether the following matrices is in row echelon
form, reduced row echelon form, both, or neither
 1 2 0 0   1 0
A=   B=  C= 
 0 1  0 1  0 1
REF NEITHER RREF & REF

1 0 0 4   1 4 − 3 7 0 1 2 6 0 
D = 0 1 0 7  E = 0 1 6 2  F = 0 0 1 2 0 
     
0 0 1 − 1 0 0 1 5 0 0 0 0 1
RREF & REF REF REF
57
Example 2 Terms & definition
Use Gaussian elimination to reduce the following matrices to
row echelon form. Hence, determine their rank.

2  12 2 1 0 0 1 1 1 0
   1 1 11 01 0
  1 1  0− R → R
1 1 1 0
A =− 2 05 2− 11 2  2 R13 − R11 → R− 32
 5 2 →RR23 →−R23
1 − R3 +−8RR31 + 502 
  0 − 1 2  0 − 1 2  −1 2
1
  1 4 − 1   
 8  11 40 − 1 1  8  0 704 10 1
 1 0 1 0 − 1 1  

 2 2 2 1 10 1 0  1 1 1 0 1 1 1 1 0
 1 1  R03 −R2 → R3  R2 → R2 0 1 4 7 1 7
B −=R2 −
+ 22R−
1→R5
2 → R02
R2 2 71 4 1  0 7 4 1 7  
  0 1  − 2
 4 1  r ( A) = 3 
0 0 0 0 
 8 1 40 7
− 1
0 0 1 
0 0 0 0
r (B ) = 2 58
• Linear equations in xy-coordinate system → 2 variables/unknowns
ax + by = c
• Linear equations in xyz-coordinate system → 3 variables/unknowns
ax + by + cz = d

• Linear equations in the n variables, x1 , x2 , x3 , … , xn to be one that


can be expressed in the form:

a1x1 + a2 x2 + a3 x3  + an xn = b

59
• A system of linear equations is a finite set of linear equation.
2 x1 − x2 + 3 x3 = 0
2x + y = 3 x1 + x3 = 3
x−y =5 2 x1 − x2 = 1
→ 2 variables/unknown → 3 variables/unknown
• A system of linear equations with m equations and n variables can
be written as:
a11x1 + a12 x2 + a13 x3  + a1n xn = b1 Example

a21x1 + a22 x2 + a23 x3  + a2 n xn = b2 2 x1 − 5 x2 + 7 x3 = 9


 − x1 + 4 x2 + 2 x3 = −2
am1x1 + am2 x2 + am3 x3  + amn xn = bm 3 x1 + 3 x2 − 6 x3 = 5 60
• System of linear equations in matrix notation is written in the form
of AX = B

2 x1 − 5 x2 + 7 x3 = 9 2 −5 7   x1  9
− 1 4 2 x  − 2
− x1 + 4 x2 + 2 x3 = −2    2  
3 x1 + 3 x2 − 6 x3 = 5  3 3 − 6  x3   5 
Coefficient variable constant

A x B

61
Homogenous Non Homogenous
1 2 3  x1  0  2 −5 7   x1   9 
− 1 3 2   x  = 0 − 1 4 2  x  =  − 2
   2      2  
 2 1 − 1  x 3  0  3 3 − 6  x 3   5 

All constant are zero At least one constant


is not zero

System of Linear Equations Set of solution

Unique solution
Consistent
Infinitely many solutions
Inconsistent No solution 62
SOLUTION : INVERSION METHOD
solution −1
A X = B ⎯⎯ ⎯
⎯→ X = A B
Step 1: Find A–1
Step 2: Solve by using X = A–1 B

1 A = 0 → singular, A −1
does not exist
−1
A = adj ( A)
A A  0 → non singular, A −1 exist

63
SOLUTION : INVERSION METHOD
Example 1
Solve the following system of linear equations by using inversion
method.
Step 1: Find A–1 4
x+y =4
1 A =1 1
− y + 2z = 5
−1
A = adj ( A)
− 1 2 1 A
x+z =6 CF = − 1 1 1
2   − 1 − 1 2 
 1 1 0   x  4   2 − 2 − 1 =  2 1 − 2
0 − 1 2   y  =  5   
− 1 −1 2   1 1 − 1
     
 1 0 1  z  6  3 adj ( A) =  2 1 − 2
 
A X B  1 1 − 1 64
SOLUTION : INVERSION METHOD
Example 1
Solve the following system of linear equations by using inversion
method.
Step 2: Solve by using X = A–1 B
 x   − 1 − 1 2  4  − 1(4 ) − 1(5) + 2 (6) 3 
y  =  2 1 − 2 5 =  2 (4 ) + 1(5) − 2 (6)  =  1
        
 z   1 1 − 1 6   1(4 ) + 1(5) − 1(6)  3

65
SOLUTION : Cramer’s Rule
• If AX = B is system of linear equation and A  0, then the system
has solution.
A1 A2 A3 An
x1 = , x2 = , x3 = , x n =
A A A A
Step 1: Find |A|
Step 2: Find A1 by replacing 1st column of A with constant matrix B
Step 3: Find | A1 |
Step 4: Find x1 Cramer’s rule only
can solve system
Step 5: Repeat Step 2, 3 and 4 for the other unknown, xn with |A|≠ 0
66
SOLUTION : Cramer’s Rule
Example 2
Step 1: Find |A| A =1
Solve the following
system of linear Step 2: Find A1 by  4 1 0
equations by using replacing 1st
Cramer’s Rule. column of A with A 1 =  5 − 1 2
 
constant matrix B  6 0 1
 1 1 0  x1  4
0 − 1 2   x  =  5  A1 = 3
   2   Step 3: Find | A1|
 1 0 1  x3  6 
A1 3
A X B Step 4: Find x1 x1 = = =3
A 1
67
SOLUTION : INVERSION METHOD
Example 2
Step 5: Repeat Step 2, 3 and 4 for x2 and x3
Solve the following
 1 4 0 A2
1
system of linear x2 = = =1
A 2 =  0 5 2 A2 = 1 A 1
equations by using  
Cramer’s Rule.  1 6 1

 1 1 0  x1  4  1 1 4 A3
3
0 − 1 2   x  =  5  x3 = = =3
A3 =  0 − 1 5 A3 = 3 A 1
   2    
 1 0 1  x3  6   1 0 6 
A X B
CONCLUSION x1 = 3, x 2 = 1, x 3 = 3
68
SOLUTION : GAUSS ELIMINATION METHOD
Step 1: Write out the augmented matrix
Step 2: Solve system by using Gauss elimination - Perform elementary row
operations to get zeros below the diagonal (upper triangular form).
Step 3: Use back substitution and rewrite the answer in matrix form

69
SOLUTION : GAUSS ELIMINATION METHOD
Example 3
Step 2: Gauss elimination
Solve the following 1 1 4 
R2 + R1→R2
system of linear ⎯⎯ ⎯ ⎯
⎯→ 
 0 3 3 
equations by using
Gauss elimination. Upper triangular
x+y =4 form
Step 3: Back Substitution (begin with the last row)
− x + 2y = −1 3y = 3 x+y =4
Step 1: Augmented Matrix y =1 x=3
1 1 4   x  3 
  Answer :   =  
− 1 2 − 1  y   1 70
SOLUTION : GAUSS ELIMINATION METHOD
Example 4
Solve the following Step 2: Gauss elimination
system of linear 1 1 0 4  1 1 0 4 
equations by using R3 − R1 → R3  0 − 1 2 5  R3 − R2 → R3  0 −1 2 5 
Gauss elimination.    
x+y =4  0 − 1 1 2   0 0 − 1 − 3 

− y + 2z = 5 Upper triangular
x+z =6 form
Step 3: Back Substitution (begin with the last row)
Step 1: Augmented Matrix
− z = −3 x+y =4  x  3 
1 1 0 4  z=3 x=3 Answer : y  =  1
 0 −1 2 5     
  − y + 2z = 5  z  3
 1 0 1 6  y =1 71
SOLUTION : GAUSS ELIMINATION METHOD
Unique Solution Infinitely many solutions No solution
1 1 0 4  2 −6 8 7   3 6 15 3 
 0 −1 2   0 2 − 10 2   0 30 24 4 
5  
   
 0 0 − 1 − 3   0 0 0 0   0 0 0 5 

x = 3, y = 1, z = 3  z=t
• Each unknown equal to • All the elements in the • Zero unknown equal to
a value. last row is zero. nonzero constant.
• This system is considered • This system is considered • This system is considered
as consistent and as consistent but as inconsistent.
independent dependent.
72
SOLUTION : GAUSS ELIMINATION METHOD
Example 5
Solve the following Step 2: Gauss elimination
2
system of linear 2 −6 8 7 2 −6 8 7
equations by using R3 − R1 → R3  0 2 − 10 2  R3 − R2 → R3  0 2 − 10 2 
Gauss elimination.    
 0 2 − 10 2   0 0 0 0 
2 x − 6y + 8 z = 7
Infinitely many solutions
2y − 10 z = 2
2 x − 4y − 2 z = 9 Step 3: Back Substitution (begin with the last row)

Step 1: Augmented Matrix  z=t 2 x − 6y + 8 z = 7  x  6.5 − 11t 


 3 6 15 3 2y − 10 z = 2 13 y  =  1− 5t 
x= − 11t
 0 30 24 2    
4 y = 1− 5t  z   t 
 
 6 − 3 18 9  73
SOLUTION : GAUSS ELIMINATION METHOD
Example 6
Solve the following Step 2: Gauss elimination
2
system of linear 3 6 15 3  2 −6 8 7 
equations by using R3 − 2R1 → R3  0 30 24 4  2R3 + R2 → R3  0 2 − 10 2 
Gauss elimination.    
 0 − 15 − 12 3   0 0 0 10 
3 x + 6y + 15 z = 3
30y + 24 z = 4 No solution
6 x − 3y + 18 z = 9

Step 1: Augmented Matrix


 3 6 15 3
 0 30 24 4
 
 6 − 3 18 9  74
SOLUTION : GAUSS ELIMINATION METHOD
Example 7 Step 2: Gauss elimination
Solve the following
2
system of linear  1 2 3 0  1 2 3 0 
equations by using − R3 + 2R1 → R3  − 1 3 2 0  R2 + R1 → R2 0 5 5 0 
   
Gauss elimination.  0 3 4 0   0 3 4 0 
x + 2y + 3 z = 0 1 2 3 0 
5R3 − 3R2 → R3 
− x + 3y + 2 z = 0 0 5 5 0 
 
2x + y − 2z = 0  0 0 5 0 

Step 1: Augmented Matrix Step 3: Back Substitution (begin with the last row)
 1 2 3 0  − 5z = 0 5y + 5 z = 0 x + 2y + 3 z = 0  x  0 
 y  = 0 
 −1 3 2 0  z=0 y=0 x=0    
   z  0
 2 1 − 2 0  Trivial solution: All unknown equal to zero. 75
SOLUTION : GAUSS ELIMINATION METHOD

Homogeneous system always has trivial solution, if number of


VARIABLE is EQUAL to number of EQUATIONS in the system.

Homogeneous system has infinitely many solutions, if number


of VARIABLE is MORE than number of EQUATIONS.

76
A scalar λ is called an eigenvalue of the nxn matrix A if there is a nontrivial
solution x of Ax = λx. Such an x is called an eigenvector corresponding to the
eigenvalue λ.
Example 1
 1 − 1  1   1
2 4   − 2  = 3  − 2 
    
A x  x

 1
➢ 3 is eigenvalue of A and eigenvector of A
− 2
 
corresponding to 3
77
COMPUTING EIGENVALUES & EIGENVECTORS

How to find λ If A is nxn matrix, then


Ax = x λ is eigenvalue of A if
Ax − x = 0 and only if, it satisfies

( A − I )x = 0 the equation ;

I = identity matrix
A − I = 0
This is called the
Eigenvector x, characteristics equation
must be nonzero
of A.
78
COMPUTING EIGENVALUES & EIGENVECTORS
3 2 1
Example 2 Given H =  1 2 − 1. Find all the eigenvalue s of H.
− 1 1 4 

3 2 1  1 0 0
A − I = 0
A − I =  1 2 − 1 −  0 1 0
   
− 1 1 4  0 0 1
3− 2 1 Characteristics
1 2− −1 = 0 equation
 3 2 1   0 0 
−1 1 4−
=  1 2 − 1 − 0  0 
   
− 1 1 4  0 0   − 3 + 92 − 26 + 24 = 0
3 −  2 1   = 2, 3, 4
= 1 2− −1 
 
 − 1 1 4 −   79
COMPUTING EIGENVALUES & EIGENVECTORS
Example 3 Find the eigenvalue for the following matrices.
2 − 2 3 
1 3  B = 0 3 − 2 
A=    
2 − 4  0 − 1 2 

B − I = 0
A − I = 0 (2 −  ) (2 − 5 + 4 ) = 0
1−  3 2− −2 3  = 2,1,4
=0 0 3− −2 = 0
2 −4−
0 −1 2−
(1−  )(− 4 −  ) − 3(2 ) = 0 3− −2
(2 −  ) −0+0 = 0
2
 + 3 − 10 = 0 −1 2−
 = 2, − 5
80
COMPUTING EIGENVALUES & EIGENVECTORS

To find x is by solving the ( A − I )x = 0


Ax = λx 1. Convert to augmented matrix
(A – λI )x = 0 2. Perform row echelon operation.
λ is eigenvalue
x is eigenvector

81
COMPUTING EIGENVALUES & EIGENVECTORS
2 0 1
Example 4 Given H = 0 3 0. Find the eigenvecto r corresponding
 
 1 0 2
to the smallest eigenvalue of H.

 =1 (H − I )v = 0
 1 0 1 0  1 0 1 0   1 0 1 0
 1 0 1 1
0 1 0 0 
0 2 0 0 ⎯⎯ R2 →R2

⎯⎯→ 0 1 0 0  ⎯ R3 − R1→R3
⎯ ⎯ ⎯ →
H −  I = 0 2 0 
2
     
  0 0 0 0
 1 0 1  1 0 1 0  1 0 1 0
Augmented − t
matrix

eigenvecto r, v = 0
x3 = t , x2 = 0 , x1 + x3 = 0  
x1 = −t  t82
COMPUTING EIGENVALUES & EIGENVECTORS
2 0 1
Given H = 0 3 0. Find the normal eigenvecto r corresponding
Example 5  
 1 0 2
to the smallest eigenvalue of H.
v 2 2 2
Normalize eigenvecto r ,u = , where v = v1 + v2 +  + vn
v
 =1 v = (− t )2 + 0 + t 2 = 2t 2 = t 2
− t 
eigenvecto r, v =  0  −
  t − t 2

  1   1  
 t  u= 0 =  0 
t 2   2 2
 t   t  83
Theorem
Let A be n × n matrix with the eigenvalue, λ and the corresponding eigenvector 𝐯
1. If Ak , eigenvalue = λk ,
eigenvector = 𝐯

2. If AT , eigenvalue = λ
eigenvector = solved AT − λI = 0

1
3. If A−1 , eigenvalue =
λ
eigenvector = 𝐯
84
EXERCISE SET 5.1
Find the eigenvalues for the following matrices.
3 0 10 −9 −2 −7
4𝑎) 4𝑏) 4𝑑)
8 −1 4 −2 1 2

4 0 1 −2 0 1 5 6 2
6𝑎) −2 1 0 6𝑐) −6 −2 0 6𝑓) 0 −1 −8
−2 0 1 19 5 −4 1 0 −2

Find the eigenvector corresponding to the smallest eigenvalue


for the matrix in 6a), 6b) and 6c).

85
More excercise
Find the eigenvalues and the eigenvector corresponding to the
largest eigenvalue for the following matrices.
−1 −6 0
−5 5
𝑎) 𝑏) 1 4 1
4 3
2 4 1

5 8
Given A = . Find the eigenvalues and the eigenvectors for
1 3
𝑎) 𝐴, 𝑏) 𝐴3 , 𝑐)𝐴𝑇 , 𝑑)𝐴−1

86
Thank You Very Much

87

You might also like