Sie sind auf Seite 1von 118

MA1506

Mathematics II
Chapter 5
Matrices and their uses

Chew T S MA1506-14 Chapter 5 1
This chapter consists of two parts
In part one, we shall study
Chew T S MA1506-14 Chapter 5 2
Matrix operations
Some special matrices
Inverse matrix and unique solution of AX=B
Determinant and inverse matrix
Leontief Input-Output model
PART ONE
5.1 What is a Matrix?
Chew T S MA1506-14 Chapter 5 3
rewritten as
2x1 matrix
2x2 Matrix
2 7 3 x y + =
4 8 11 x y + =
2 7 3
4 8 11
x
y
( ( (
=
( ( (

3x3 Matrix
m x n Matrix: m rows, n columns
Entry at i-th row j-th column
5.1 What is a Matrix?
Chew T S MA1506-14 Chapter 5 4
11 1
1
n
m mn
a a
a a
| |
|
|
|
\ .

We may write
11 12 13
21 22 23
31 32 33
a a a
a a a
a a a
| |
|
|
|
\ .
( )
ij
A a =
5.2 Matrix operations
Chew T S MA1506-14 Chapter 5 5
Matrix addition
Scalar multiplication
Matrix multiplication
Matrix transposition
Matrix Addition
Chew T S MA1506-14 Chapter 5 6
m x n matrices
Term by term addition
5.2 Matrix operations
( )
ij
A a =
( )
ij
B b =
( )
ij ij
A B a b + = +
1 2 7 3 8 5
4 8 6 9 10 17
( ( (
+ =
( ( (

Scalar multiplication
Chew T S MA1506-14 Chapter 5 7
m x n matrix
Term by term multiplication
real or complex number
5.2 Matrix operations
( )
ij
A a =
c
( )
ij
cA ca =
1 2 3 6
3
4 8 12 24
( (
=
( (

Matrix Multiplication
Chew T S MA1506-14 Chapter 5 8
Not term by term but row to column
m x n matrix
n x p matrix
5.2 Matrix operations
( )
ij
A a =
( )
ij
B b =
m x p matrix
AB C =
( )
ij
C c =
1 1 2 2 ij i j i j in nj
c a b a b a b = + + +
Example
Chew T S MA1506-14 Chapter 5 9
|
|
|
.
|

\
|

|
.
|

\
|
2 1
3 2
1 1
6 5 4
3 2 1
|
.
|

\
|
+ + + +
+ + + +
=
) 2 ( 6 3 5 1 4 ) 1 ( 6 2 5 1 4
) 2 ( 3 3 2 1 1 ) 1 ( 3 2 2 1 1
|
.
|

\
|
=
7 8
1 2
5.2 Matrix operations
Animation slide
Chew T S MA1506-14 Chapter 5 10
In general
Non commutative
5.2 Matrix operations
AB BA
2 7 1 3 16 1
4 8 2 1 20 4
AB

( ( (
= =
( ( (


1 3 2 7 14 31
2 1 4 8 0 6
BA
( ( (
= =
( ( (


Matrix transposition
Chew T S MA1506-14 Chapter 5 11
m x n matrix
swap rows with columns
5.2 Matrix operations
( )
ij
A a =
( )
T
ji
A a =
n x m matrix
1 2 4
6 8 9
T
(
=
(

1 6
2 8
4 9
(
(
(
(

1 7 9
6 8 2
4 10 12
T
(
(
=
(
(

1 6 4
7 8 10
9 2 12
(
(
(
(

Chew T S MA1506-14 Chapter 5 12
5.2 Matrix operations
( )
T
T
A A =
( )
T
T T
A B A B + = +
( )
T
T
cA cA =
( )
T
T T
AB B A =
Symmetric matrix
Chew T S MA1506-14 Chapter 5 13
An n x n matrix is symmetric if
5.3 Special matrices
T
A A =
1 7 9
7 8 2
9 2 12
(
(
(
(

0 0 4
0 8 0
4 0 1
(
(
(
(

1 0
0 1
(
(

Anti-Symmetric matrix
Chew T S MA1506-14 Chapter 5 14
An n x n matrix is anti-symmetric or skew
symmetric if
5.3 Special matrices
T
A A =
0 7 9
7 0 2
9 2 0

(
(

(
(

0 2
2 0

(
(

Properties of Symmetric matrices
Chew T S MA1506-14 Chapter 5 15
If A is symmetric and B is any square matrix
T
B B +
T
BAB
is symmetric
is symmetric
The above property will be used in T8 Q4
5.3 Special matrices
( ) ( )
T T T T T T
B B B B B B + = + = +
Hence
( ) ( )
T T T T T T T
BAB B A B BAB = =
Hence
Properties of anti-Symmetric matrices
Chew T S MA1506-14 Chapter 5 16
If A is anti-symmetric and B is any square matrix
T
BAB
T
B B
is anti-symmetric
is anti-symmetric
The above property will be used in T8 Q4
5.3 Special matrices
( ) ( ) ( )
T T T T T T
B B B B B B = =
Hence
Hence
( ) ( )
T T T T T T T
BAB B A B BAB = =
Identity matrix
Chew T S MA1506-14 Chapter 5 17
n x n identity matrix
sometimes denoted by
I
n

5.3 Special matrices
1 0 0
0 1 0
0 0 0 1
(
(
(
(
(


I =
AI IA A = =
Vectors as special matrices
Matrices containing only one column are often
called column vectors or vectors
Matrices containing only one row are often
called row vectors or vectors

Chew T S MA1506-14 Chapter 5 18
1
2
(
(

1
2
3
(
(
(
(

| |
1 2
| |
1 2 3
5.3 Special matrices
Vectors
Chew T S MA1506-14 Chapter 5 19
=
1
0
(
(

0
1
(
(

=
1
0
0
(
(
(
(

0
1
0
(
(
(
(

0
0
1
(
(
(
(

= = =
(0,1)
(1,0)
(1,0,0)
(0,1,0)
(0,0,1)
5.3 Special matrices

Chew T S MA1506-14 Chapter 5 20
a
b
(
(

1 0
0 1
a b
( (
= +
( (


1 0 0
0 1 0
0 0 1
a
b a b c
c
( ( ( (
( ( ( (
= + +
( ( ( (
( ( ( (

=
=
5.3 Special matrices

ai bj +


ai bj ck + +
Rotation
Chew T S MA1506-14 Chapter 5 21
Rotation (anti-clockwise)
through angle
Let
5.3 Special matrices
cos sin
( )
sin cos
R

(
=
(


cos sin Ri i j = +

sin cos Rj i j = +
Rotation
Chew T S MA1506-14 Chapter 5 22
Rotation (anti-clockwise)
through angle
R transforms
5.3 Special matrices

cos sin Ri i j = +

sin cos Rj i j = +

sin cos i j +

cos sin i j +
Chew T S MA1506-14 Chapter 5 23
cos sin
( )
sin cos
R

(
=
(

| |
1506
1506
cos sin
( )
sin cos
cos(1506 ) sin(1506 )
sin(1506 ) cos(1506 )
R

(
=
(

(
=
(

5.3 Special matrices
Orthogonal matrix
Chew T S MA1506-14 Chapter 5 24
An n x n matrix, B is orthogonal if
is orthogonal
T
BB I =
cos sin
sin cos

(
(

cos sin cos sin
sin cos sin cos

( (
( (


2 2
2 2
cos sin 0
0 sin cos
I


(
+
= =
(
+ (

5.3 Special matrices
Check
Chew T S MA1506-14 Chapter 5 25
cos sin
sin cos

(
(

( )
cos ,sin
( )
sin ,cos
( )
cos , sin
( )
sin ,cos
An n n matrix A is
orthogonal iff its columns
are perpendicular unit
vectors.
An n n matrix A is
orthogonal iff its rows are
perpendicular unit
vectors.
Chew T S MA1506-14 Chapter 5 26
Involutory matrix ( a matrix that is its own inverse)
AA I =
2
1
a b
A
a
a
b
| |
|
=

|

|
\ .
Example
Then
AA I =
=

1
2


or
Shear angle and parallel to x-axis
Chew T S MA1506-14 Chapter 5 27
Let S=
1 tan 1

0 1 0
Si

( (
=
( (

1

0
i
(
= =
(

1 tan 0

0 1 1
Sj

( (
=
( (

5.3 Special matrices
Then
So
tan

tan
1
i j

(
= = +
(

1 tan
0 1

(
(


Si i =

tan sj i j = +

Chew T S MA1506-14 Chapter 5 28


5.3 Special matrices

Si i =

tan sj i j = +

tan i j +
multiplication
multiplication

j
becomes
,turn angle clockwise,
measure
from


tan i j +

j
Chew T S MA1506-14 Chapter 5 29
(S transforms)
5.3 Special matrices

Si i =

tan sj i j = +

tan i j +
S maps
We may say that S maps

i
to
maps

j to

tan i j +

Si =
1
0
(
(

Sj =
1 tan
0 1
S

(
=
(

tan
1

(
(

1 tan
1 2
0 1

( (
= +
( (

1 2tan
1 0 2 1
+
(
=
(
+

1 2tan
2
+
(
=
(


1
2
(
(

1 2tan
2
+
(
(

or
1 1 tan 1 1 2tan
2 0 1 2 2
S
+
( ( ( (
= =
( ( ( (

1

(1 2 ) 1 2
2
S S i j Si Sj
(
= + = +
(

30 Chew T S MA1506-14 Chapter 5
5.3 Special matrices

Si =
1
0
(
(

Sj =
1 tan
0 1
S

(
=
(

tan
1

(
(

1 tan
( 1) 2
0 1

( (
= +
( (

1 2tan
( 1) 0 2 1
+
(
=
(
+

1 2tan
2
+
(
=
(


1
2

(
(

1 2tan
2
+
(
(

or
1 1 tan 1 1 2tan
2 0 1 2 2
S
+
( ( ( (
= =
( ( ( (

1

(( 1) 2 ) ( 1) 2
2
S S i j Si Sj

(
= + = +
(

31 Chew T S MA1506-14 Chapter 5
5.3 Special matrices
Question 7 (a) [5 marks] (2007 Exam )
In two dimensions, we perform a shear
[shearing angle 45 degrees] by means of
forces parallel to an axis which makes an
angle of 30 degrees with respect to the
positive x-axis. Find the final location of
the point which was originally at (x, y)
coordinates (0, 1).
(0,1)
30

45

Rotate
30

Shear
45

Rotate
30

parallel to x axis
cos sin
( )
sin cos
R

(
=
(

Chew T S MA1506-14 Chapter 5 34
Summary We have learnt
symmetric matrix A
anti symmetric matrix A
identity matrix
orthogonal matrix B
shear matrix
vector
rotation matrix
T
A A =
T
A A =
I
T
BB I =
1
2
(
(

| |
1 2
1 tan
( )
0 1
S

(
=
(

cos sin
( )
sin cos
R

(
=
(

5.3 Special matrices
Involutory matrix A
2
A I =

5.4 Inverse matrix and unique solution

Chew T S MA1506-14 Chapter 5 35
Let
A=
11 1
1
n
n nn
a a
a a
| |
|
|
|
\ .

be an
n n
matrix
Then an
n n
an inverse matrix of A if
matrix C is said to be
AC=CA=
n
I
.
identity matrix
The inverse matrix of A is denoted by
1
A

WARNING: We only define inverse for


n n
matrices, i.e. square matrices.
Let A=
11 1
1
n
n nn
a a
a a
| |
|
|
|
\ .

be an
n n
matrix

5.4 Inverse matrix and unique solution

Chew T S MA1506-14 Chapter 5 36
B=
1
2
n
b
b
b
| |
|
|
|
|
\ .

X=
1
2
n
x
x
x
| |
|
|
|
|
\ .

Consider a linear system


AX=B
11 1
1
n
n nn
a a
a a
| |
|
|
|
\ .

1
2
n
x
x
x
| |
|
|
|
|
\ .

1
2
n
b
b
b
| |
|
|
|
|
\ .

i.e.,
=
Chew T S MA1506-14 Chapter 5 37

5.4 Inverse matrix and unique solution

which is equivalent to
11 1 12 2 1 1
...
n n
a x a x a x b + + + =
21 1 22 2 2 2
...
n n
a x a x a x b + + + =
..............................................
1 1 2 2
...
n n nn n n
a x a x a x b + + + =
Chew T S MA1506-14 Chapter 5 38

5.4 Inverse matrix and unique solution

Theorem 1
The linear system of equations AX=B
has a unique solution if and only if A has an
inverse
1
A

How to find
1
A

if
1
A

exists?
We can perform elementary row
operations to A to get
1
A

Chew T S MA1506-14 Chapter 5 39


Remark: B can be any n-dim vector
Proof omitted

5.4 Inverse matrix and unique solution

See Appendix
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 40
In this section, we introduce determinants,
which help us to determine whether an
n n matrix has an inverse or not.
Consider
11 12
21 22
a a
a a
| |
|
\ .
1
2
x
x
| |
|
\ .
1
2
b
b
| |
|
\ .
=
Then
11 1 12 2 1
a x a x b + =
21 1 22 2 2
a x a x b + =
(1)
(2)
Hence
22 12
(1) (2) a a
get
11 22 12 21 1 1 22 12 2
( ) a a a a x b a a b =
Similarly
21 12 22 11 2 1 21 11 2
( ) a a a a x b a a b =
Therefore the linear system of equations
has unique solution if and only if
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 41
11 22 12 21
0 a a a a
We define the determinant of
11 12
21 22
a a
a a
| |
|
\ .
to be
11 22 12 21
a a a a
We write
det
11 12
21 22
a a
a a
| |
|
\ .
11 22 12 21
a a a a
or
11 12
21 22
a a
a a
11 22 12 21
a a a a
=
=
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 42
Let A=
11 12 13
21 22 23
31 32 33
a a a
a a a
a a a
| |
|
|
|
\ .
Then we define the determinant of A,
(denoted by det(A) or )
A
to be det(A)
11
a
23 22
32 33
a a
a a
12
a
23 21
31 33
a a
a a
13
a +
21 22
31 32
a a
a a
=
How to get this? see next slide
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 43
called cofactor
expansion
det A
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 44
cofactor
cofactor
cofactor
Animation slide
Cofactor expansion can be done about any
row or column
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 45
2x2 matrix
Examples
Chew T S MA1506-14 Chapter 5 46
5.5 Determinants and inverse
Animation slide
Cofactor expansion can be used for any
n x n determinant
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 47
2
nd
method (cofactor expansion) finding Inverse
Chew T S MA1506-14 Chapter 5 48
Work out the matrix of cofactor of each entry
Take transpose
Divide by determinant
Chew T S MA1506-14 Chapter 5 49
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 50
=


1
=


1
=
1
det


=
1




Let
Then
5.5 Determinants and inverse
Inverse of 2x2 matrix
Important Properties of Determinants
Chew T S MA1506-14 Chapter 5 51
size of M
5.5 Determinants and inverse
det( ) (det )(det ) det( ) ST S T TS = =
det det
T
M M =
det( ) det
n
cM c M =
If A is upper (lower) triangular, then
det(A)=product of all diagonal entries of A
1 2 4
0 3 5 1 3 6 18
0 0 6
= =
4 0 0
1 5 0 4 5 6 120
2 3 6
= =
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 52

Theorem 2

Chew T S MA1506-14 Chapter 5 53
An nxn matrix A has an inverse if and only if det(A)0
Proof omitted
1 1 1
0 2 3
0 0 3
A
| |
|
=
|
|
\ .
1 1 1
0 0 3
0 0 2
B
| |
|
=
|
|
\ .
det 1 2 3 6 A = =
det 1 0 2 0 B = =
A has an inverse
B does not have an
inverse
5.5 Determinants and inverse

Theorem 3

Chew T S MA1506-14 Chapter 5 54
Let A be an nxn matrix. Then AX=B has a unique solution
if and only if det(A)0
Proof omitted
1
2
3
1 1 1 4
0 2 3 5
0 0 3 6
x
x
x
| || | | |
| | |
=
| | |
| | |
\ .\ . \ .
has a unique solution
1 1 1
det 0 2 3 1 2 3 6 0
0 0 3
| |
|
= =
|
|
\ .
since
5.5 Determinants and inverse
Remark: B can be any n-dim vector

Theorem 4

Chew T S MA1506-14 Chapter 5 55
Let A be nxn matrix. Then AX=0
has nontrivial (nonzero) solutions
if and only if det(A)= 0.
Proof omitted
Note that A0=0.
Hence zero vector 0= is always a solution of AX=0
0
0
0
(
(
(
(
(

Zero vector
5.5 Determinants and inverse
1
2
3
1 1 1 0
0 2 3 0
0 0 3 0
x
x
x
| || | | |
| | |
=
| | |
| | |
\ .\ . \ .
has a unique solution
Then the unique solution should be
1
2
3
0
0
0
x
x
x
| | | |
| |
=
| |
| |
\ . \ .
5.5 Determinants and inverse
Chew T S MA1506-14 Chapter 5 56
Chew T S MA1506-14 Chapter 5 57
Remark 1: AX=0 has nonzero solutions
iff AX=0 has infinitely many
solutions.
Proof:
Suppose AX=0 has nonzero soln u. Then Au=0.
Let c be any real number. Then
A(cu)=cAu=c0=0
Hence cu again is a soln.
Here c is any real number.
So we have infinitely many soln
Now consider the converse.
If AX=0 has infinitely many solns,
then AX=0 certainly has nonzero soln
5.5 Determinants and inverse
5.5 Determinants and inverse
Remark 2: AX=0 has either unique solution
(detA0)
or infinitely many solutions
(detA=0)

Remark 3:If detA =0 , then AX=B, where B 0,
has two cases: infinitely many solns or no
solns

Chew T S MA1506-14 Chapter 5 58
5.6 Leontief Input-Output Model
Chew T S MA1506-14 Chapter 5 59
we use this model to analyze economics of
interdependent sectors
Example ---Oil and Transportation industries
(1) Total output $y of Transportation industry requires

(i) $0.50y gasoline from the oil industry
(ii) $0.20y transportation of equipment from the
transportation industry
We will look at a single oil company and a single
transportation company as a closed system
Chew T S MA1506-14 Chapter 5 60
(2) The total output $x of Oil industry requires

(i) $0.12x transportation of gasoline from the
transportation industry
(ii) $0.32x oil-based fuels for processing from
the oil industry
5.6 Leontief Input-Output Model
Chew T S MA1506-14 Chapter 5 61
(3)Suppose that the demand from the outside
sector of the economy (all consumers outside
of oil and transportation) is:
$15 billion for oil
$1.2 billion for transportation
5.6 Leontief Input-Output Model
$x b = the total output from oil company=oil demand
$y b = the total output from transportation company
=transportation demand


Chew T S MA1506-14 Chapter 5 62
Internal demand External
demand From oil
company
From
transportation
company
Oil demand
x
0.32x 0.50y
d
1
= $15b
Transportation
demand y
0.12x 0.20y
d
2
= $1.2b

5.6 Leontief Input-Output Model
.

Setting up the demand equations
The total output of each company will equal the
sum of the internal and external demands:




Expressed as a matrix equation:
Chew T S MA1506-14 Chapter 5 63
X MX D = +
5.6 Leontief Input-Output Model
1
2
0.32 0.50
0.12 0.20
x x y d
y x y d
= + +

= + +

1
2
0.32 0.50
0.12 0.20
d x x
d y y
( ( ( (
= +
( ( ( (

Solving the demand equations
Solve for X:



In our example:
Chew T S MA1506-14 Chapter 5 64
IX MX D =
called technology
matrix
5.6 Leontief Input-Output Model
X MX D = +
1
( ) X I M D

=
1
2
0.32 0.50
0.12 0.20
d x x
d y y
( ( ( (
= +
( ( ( (

( ) I M X D =
0.32 0.50
0.12 0.20
M
(
=
(

Chew T S MA1506-14 Chapter 5 65
5.6 Leontief Input-Output Model
( )
1
1.65 1.03
0.25 1.40
I M

(
=
(

0.68 0.50
0.12 0.80
I M

(
=
(


The solution
Putting it all together:







In order to meet the demand the companies need
to produce
$26.0 billion of oil
$5.4 billion of transportation
Chew T S MA1506-14 Chapter 5 66
1
2
15
1.2
d
D
d
( (
= =
( (

5.6 Leontief Input-Output Model
( )
1
1.65 1.03 15 26.0
0.25 1.40 1.2 5.4
X I M D

( ( (
= = =
( ( (

Chew T S MA1506-14 Chapter 5 67
0.32 0.50 15
0.12 0.20 1.2
x x y
y x y
= + +

= + +

Can you solve the above without using matrices ?


Sure, you can
However if it involves many variables, then solving
it by matrices is easier.
5.6 Leontief Input-Output Model
End of part I
Chapter 5
PART TWO
Chew T S MA1506-14 Chapter 5 68
In part II, we shall study
Eigenvalues and eigenvectors---very important
concepts
Chew T S MA1506-14 Chapter 5 69
Diagonalization of matrix
Weather forecasting model
Trace of a matrix
parallel
=
=
Vectors are in different
directions
Vectors are in same
direction
Consider
5.7 Eigenvalues and eigenvectors
Vectors are in different
directions
Chew T S MA1506-14 Chapter 5 70
Let T=
T
Then
= =
T
So we are interested in the last case
2 2
2
1 1
( (
=
( (

T
multiplying
2
1
(
(

by
is the same as multiplying
2
1
(
(

by 2
Rewrite
5.7 Eigenvalues and eigenvectors
Chew T S MA1506-14 Chapter 5 71
Eigenvector
Chew T S MA1506-14 Chapter 5 72
After multiplication (transformation),
does not change the direction
eigenvalue eigenvector
u

Tu

Matrix multiplication
is the same as scalar multiplication
which is much easier
T
is nxn matrix
5.7 Eigenvalues and eigenvectors
suppose
We may use
u
u

or
Tu u =

How to find Eigenvalues and Eigenvectors
Chew T S MA1506-14 Chapter 5 73
We want to find nonzero eigenvectors
5.7 Eigenvalues and eigenvectors
Tu u =

How to find eigenvalue and eigenvector u

First note that


0 0 T =
Hence zero vector 0 is always an eigenvector
Chew T S MA1506-14 Chapter 5 74
we want nonzero vector
By Thm 4 in section 5.5, we have
Hence we can find nonzero eigenvalues
using above equation
5.7 Eigenvalues and eigenvectors
T- is
not meaningful
How to find nonzero eigenvectors
First note that
Tu u Iu = =
( ) 0 T I u =
det( ) 0 T I =
Example
Chew T S MA1506-14 Chapter 5 75
Find eigenvalues of
5.7 Eigenvalues and eigenvectors
Cont.
Chew T S MA1506-14 Chapter 5 76
5.7 Eigenvalues and eigenvectors
( ) 0 T I u =
Now we shall find eigenvector
associated to eigenvalue =2
u

(
=
(

Tu u =
1 2 2 0
( 2 )
2 2 2 0
T I

( ( ( (
= =
( ( ( (


1 2
2 2
T
(
=
(


2, 3 =
Chew T S MA1506-14 Chapter 5 77
two equations same
5.7 Eigenvalues and eigenvectors
1 equation 2 unknowns
They are many solutions, i.e. many eiqenvectors
Cont.
Chew T S MA1506-14 Chapter 5 78
choose
Eigenvectors associated to eigenvalue 2 are of
the form
1
1
2 2

( (
( (
=
( (

0
get eigenvector
5.7 Eigenvalues and eigenvectors
need only to choose one
=
All eigenvectors are
parallel i.e. all are
linearly dependent
Cont.

(
(

1 =
1
1
2
(
(
(

Chew T S MA1506-14 Chapter 5 79
eigenvector associated to = -3
two eqs same
5.7 Eigenvalues and eigenvectors
Now find
1 3 2 0
( ( 3) )
2 2 3 0
T I


+
( ( ( (
= =
( ( ( (
+

Cont.
Chew T S MA1506-14 Chapter 5 80
choose get eigenvector
1
2 2

( (
=
( (


eigenvectors associated to =-3 is of the form
0
5.7 Eigenvalues and eigenvectors
need only to choose one
2 0 + =

(
=
(

Cont.
1 =
1
2
(
(


Example
Chew T S MA1506-14 Chapter 5 81
1
0
1
i
i


( (
=
( (


0 i =
0 i =
Two eqs same
( ) 0 T I

(
=
(

5.7 Eigenvalues and eigenvectors
det( ) 0 T I =
T=
consider
i =
Cont.
Chew T S MA1506-14 Chapter 5 82
eigenvector
0 i =
0 i =
Two eqs same
1
i i

( (
=
( (

1
i
(
(

get complex eigenvector choose
1 =
5.7 Eigenvalues and eigenvectors
use 0 i =
cont.
Chew T S MA1506-14 Chapter 5 83
get eigenvector
1
0
1
i
i

( (
=
( (

0 i =
0 i + =
Two eqs same
1
i i


( (
=
( (

choose
get complex
eigenvector
5.7 Eigenvalues and eigenvectors
Now consider second eigenvalue
get
use
0 i + =
i =
1
i
(
(

i =
Chew T S MA1506-14 Chapter 5 84
When rotating through 90 degrees, every
real vector should change direction, so
has NO real eigenvector
1
i
(
(

represents rotation through 90 degrees
are its eigenvectors which are complex
5.7 Eigenvalues and eigenvectors
Recall
So the matrix we just mentioned
cont.
cos sin
( )
sin cos
R

(
=
(

1
i
(
(

We say a matrix A is diagonalizable if
Matrix of eigenvectors
Diagonal matrix of
eigenvalues
ANS: If A is nxn matrix , and it has n non parallel
eigenvectors, then A can be diagonalized.
5.8 Diagonalization
Chew T S MA1506-14 Chapter 5 85
1
A PDP

=
5.8 Diagonalization
When a given matrix A can be diagonalized ?
Example
Chew T S MA1506-14 Chapter 5 86
has eigenvalues 2 and -3
and corresponding eigenvectors
From the first example in section 5.7, we know
Then
2 0
0 3
(
(


1
e

2
e

=
=
5.8 Diagonalization
1 2
2 2
(
(


1
1
2
(
(
(

1
2
(
(


=
=
1 1
1
2
2

5.8 Diagonalization
Next we can verify that
Chew T S MA1506-14 Chapter 5
87
1 2
2 2
(
(


P
2 0
0 3
(
(


1
P

=
Example
Chew T S MA1506-14 Chapter 5 88
has only one eigenvalue since
It has only one eigenvector
Not possible to diagonalize
5.8 Diagonalization
1 tan
0 1

(
(

2
1 tan
det (1 ) 0
0 1

(
= =
(


1
0
(
(

1 tan
0 1

(
(

1 1 1
2
0
0
n
n n
n
M PD P P P


(
= =
(

Finding
n
M
5.8 Diagonalization
Chew T S MA1506-14 Chapter 5 89
Chew T S MA1506-14 Chapter 5 90
| |
1506
1506
cos sin
( )
sin cos
cos(1506 ) sin(1506 )
sin(1506 ) cos(1506 )
R

(
=
(

(
=
(

Some special cases Not used this method
Involutory matrix A
2
A I =
(1)
(2)
Then

=
5.8 Diagonalization
5.9 Model weather forecasting
Today Tomorrow Probability
Rainy Rainy
Sunny
Sunny Rainy
Sunny
Chew T S MA1506-14 Chapter 5 91
60%
70%
30%
40%
We can write the above information in
the following matrix form
Current : R S

Next:
R
columns add to 1
5..9 Model weather forecasting
Chew T S MA1506-14 Chapter 5 92
called transition matrix
0.6 0.3
0.4 0.7
R R S R
M
R S S S

( (
= =
( (


S
Today is sunny, will it be rainy 2 days later?
S
S
R
S
R
S
R
0.7
0.7
0.3
0.3
0.4
0.6
0.39

0.61
0.12
0.18
0.49
0.21
Chew T S MA1506-14 Chapter 5 93
0.6 0.3
0.4 0.7
R R S R
M
R S S S

( (
= =
( (


5..9 Model weather forecasting
Chew T S MA1506-14 Chapter 5 94
In fact
2
0.6 0.3 0.6 0.3
0.4 0.7 0.4 0.7
M
( (
=
( (

0.6 0.6 0.3 0.4 0.3 0.7 0.6 0.3
0.4 0.6 0.7 0.4 0.7 0.7 0.4 0.3
+ +
(
=
(
+ +

Observe that
2 2
2
2 2
R R S R
M
R S S S

(
=
(


2
2
0.48 0.39
0.52 0.61
S R
S S

( (
= =
( (

5..9 Model weather forecasting


Today is sunny, will it be
sunny 2 days later?
Chew T S MA1506-14 Chapter 5 95
Summary of the previous slide
0.6 0.3
0.4 0.7
R R S R
M
R S S S

( (
= =
( (


Today is rainy, will it be
sunny 2 days later?
Probability=0.52
Probability=0.61
2 2
2
2 2
0.48 0.39
0.52 0.61
R R S R
M
R S S S

( (
= =
( (


Today is rainy, will it be
rainy 2 days later?
Probability=0.48
Today is sunny, will it be
rainy 2 days later?
Probability=0.39
5..9 Model weather forecasting
Today is Rainy, will it be rainy 4 days later?
Chew T S MA1506-14 Chapter 5 96
0.6 0.3
0.4 0.7
R R S R
M
R S S S

( (
= =
( (


4 4
4
4 4
R R S R
M
R S S S

(
=
(


4
0.4332 0.4251
0.5668 0.5749
M
(
=
(

The probability that if today is rainy, it will be rainy
4 days later is
0.4332
5..9 Model weather forecasting
Eigenvalues of
Chew T S MA1506-14 Chapter 5 97
0.6 0.3
0.4 0.7
M
(
=
(

are
Corresponding eigenvectors are
1
0.3 =
2
1 =
1
1
(
(


1
4
3
(
(
(

Today is Rainy, will it be rainy 30 days later?
Find
30
M
Should use
30 30 1
M PD P

=
5..9 Model weather forecasting
Chew T S MA1506-14 Chapter 5 98
When use this method?
suggest: n>4
1 1
4
1
3
P
(
(
=
(


1
4 3
7 7
3 3
7 7
P

(
=
(
(
(

30 6
30
0.3 0 2 10 0
0 1 0 1
D

( (

=
( (

6
30 30 1
4 3
1 1
2 10 0
7 7
4
3 3 1
0 1
3
7 7
M PD P

(
(
(

(
=
(
(
(

(

(

3 3
7 7
4 4
7 7
(
(
=
(
(
(

5..9 Model weather forecasting
5.10 Trace of a Matrix
Chew T S MA1506-14 Chapter 5 99
Let M be a square matrix.
The trace of M , denoted Tr (M), is the sum of the
diagonal entries
( ) ( ) Tr MN Tr NM =
1
( ) ( ) ( ) Tr M Tr PDP Tr D

= =
Given matrix
5.10 Trace of a Matrix
Chew T S MA1506-14 Chapter 5 100
For a diagonalizable matrix M,
Tr(M) = Tr(D) =sum of its eigenvalues.
Use this to check your calculations of
eigenvalues and to find the remaining
eigenvalue
Chew T S MA1506-14 Chapter 5 101
0.6 0.3
0.4 0.7
M
(
=
(

eigenvalue
1
0.3 =
Tr(M)=0.6+0.7=1.3
Hence the 2
nd
eigenvalue is
2
1 =
Example 1
Tr(M) = Tr(D) =sum of its eigenvalues.
5.10 Trace of a Matrix
Chew T S MA1506-14 Chapter 5 102
Example 2
5.10 Trace of a Matrix
4 4 matrix A =
entries= {1,2,3...16}
All rows, all columns,
all diagonals
have the same sum
Chew T S MA1506-14 Chapter 5 103
( ) ( )
( ) ( )
Tr T Tr A B
Tr A Tr B


= +
= +
T A B = +
Suppose that
Find
1 2 5 6
A=
3 4 7 8
T
| | | |
=
| |
\ . \ .
| | | |
1 1
( ) ( ) ( ) 5 13 Tr B Tr T Tr A

= =
( ) Tr B
Solution
Tr is linear
We need this
property in
Tutorial 9 Q3
Example 3
5.10 Trace of a Matrix
Chew T S MA1506-14 Chapter 5 104
Remark:
det = det(
1
)
= det(
1
) = det
= product of eigenvalues

0.6 0.3
0.4 0.7
M
(
=
(

1
0.3 =
2
1 =
eigenvalues
End
Chapter 5
5.10 Trace of a Matrix
DetM=(0.3)(1)=0.3
Chew T S MA1506-14 Chapter 5 105
Suppose an object is moving in a circle at
constant angular speed . What is its
acceleration?
depends on t
Appendix
object moving in a circle
cont.
Chew T S MA1506-14 Chapter 5 106
cos
sin ( sin )
d d
dt dt

= =

is constant
Appendix
Composing two shears
Chew T S MA1506-14 Chapter 5 107
S: shear degrees parallel to x axis
S: shear degrees parallel to x axis
Still a shear but note that
Appendix
Chew T S MA1506-14 Chapter 5 108
Rotate 90 degrees (anticlockwise) about z-axis
Rotate 90 degrees (anticlockwise) about x-axis
About z-axis
About x-axis
Rotation in 3D
Appendix
Cont.
Chew T S MA1506-14 Chapter 5 109
Rotate 90 degrees
(anticlockwise) about z-axis
Rotate 90 degrees
(anticlockwise) about x-axis
Appendix
Determinant of Orthogonal Matrix
Chew T S MA1506-14 Chapter 5 110
M
Examples
Appendix
are parallel iff
11 22 12 21
detP P P P P =
11 22 12 21
det 0 P P P P P = =
11 21
12 22
P P
P P
= =
iff
11
21
P
u
P
(
=
(

12
22
P
v
P
(
=
(

12
22
P
v
P

(
= =
(


det 0 P =
not parallel iff
det 0 P
So if not parallel then
1
P

exits
Chew T S MA1506-14 Chapter 5 111
1
P

Hence
Appendix
11 12
21 22
P P
P
P P
(
=
(

, u v

, u v

, u v

exits
Row operations to find inverse
Chew T S MA1506-14 Chapter 5 112
Refer to Textbook Section 3.3 for more details
Remark: 2
nd
method finding inverse see slide 46
Three row operations on a matrix
multiply a constant to a row
switch two rows
add a multiple of another row
(see example)
Appendix
Example
Let
A=
1 4 2
2 8 3
0 1 1
| |
|

|
|
\ .
Suppose that we know that A has an inverse.
Now we shall do the following to get
1
A

Chew T S MA1506-14 Chapter 5 113


Appendix
Cont.
First write
1 4 21 0 0
2 8 30 1 0
0 1 10 0 1
| |
|

|
|
\ .
Try to get zero as many as possible
for the lower triangular part.
1 2
2R R +

1 4 21 0 0
0 0 72 1 0
0 1 10 0 1
| |
|
|
|
\ .
Chew T S MA1506-14 Chapter 5 114
Appendix
Cont.
2 3
R R

1 4 21 0 0
0 1 10 0 1
0 0 72 1 0
| |
|
|
|
\ .
3
1
7
R

1 4 21 0 0
0 1 10 0 1
0 0 12 7 17 0
| |
|
|
|
\ .
3 2
R R +

1 4 21 0 0
0 1 0 2 7 17 1
0 0 12 7 17 0
| |
|

|
|
\ .
Chew T S MA1506-14 Chapter 5 115
Now get 1 on diagonal
Now try to get
zero
as many as
possible
for the upper
triangular part.
Appendix
Cont.
3 1
2R R +

1 4 03 7 2 7 0
0 1 0 2 7 17 1
0 0 12 7 17 0
| |
|

|
|
\ .
2 1
4R R +

1 0 0117 2 7 4
0 1 0 2 7 17 1
0 0 12 7 17 0
| |
|

|
|
\ .
When we reach this step,
we get

Chew T S MA1506-14 Chapter 5 116
1
A

117 2 7 4
2 7 17 1
2 7 17 0

| |
|

|
|
\ .
=
Appendix
Cont.
Consider linear system AX=B where
1 4 2
2 8 3
0 1 1
| |
|

|
|
\ .
A= X=
1
2
3
x
x
x
| |
|
|
|
\ .
B=
2
32
1

| |
|
|
|
\ .
Now the inverse of A exists. Hence we have
Chew T S MA1506-14 Chapter 5 117
AX B =
1 1
A AX A B

=
1
IX A B

=
1
X A B

=
Appendix
Cont.
Therefore
1
2
3
x
x
x
| |
|
|
|
\ .
117 2 7 4
2 7 17 1
2 7 17 0

| |
|

|
|
\ .
2
32
1

| |
|
|
|
\ .
=
2
3
4
| |
|

|
|
\ .
=
(11/7)( 2) (2/7)(32) ( 4)(1) 2 + + =
( 2/7)( 2) ( 1/7)(32) (1)(1) 3 + + =
(2/7)( 2) (1/7)(32) (0)(1) 4 + + =
Chew T S MA1506-14 Chapter 5 118
Appendix
End
of
Chapter 5
Cont.

Das könnte Ihnen auch gefallen