Vous êtes sur la page 1sur 44

Matrix Methods for

Coupled Systems
Matrices Review
What is a Matrix?
CM3900: Mathematics 3 2
A Matrix is a table of numbers (with
arithmetic operations defined)
2 3 1
. .
4 0 1
e g

| |
=
|
\ .
A
A has 2 rows, 3 columns, Dimension: 2 x 3
Elements (lower case with subscripts):
1,1 1,2 1,3 2,1 2,2 2,3
2; 3; 1; 4; 0; 1 a a a a a a = = = = = =
Componentwise Arithmetic
CM3900: Mathematics 3 3
If matrices have identical dimensions,
they can be added and subtracted
e.g. Addition:
( )
( )
2 3 1 1 2 2
4 0 1 2 5 3
2 1 3 2 1 2 3 1 1
4 2 0 5 1 3 6 5 2

| | | |
+
| |

\ . \ .
| | + + +
| |
= =
|
|
+ + +
\ .
\ .
CM3900: Mathematics 3 4
( )
( )
2 3 1 1 2 2
4 0 1 2 5 3
2 1 3 2 1 2 1 5 3
4 2 0 5 1 3 2 5 4

| | | |

| |

\ . \ .
| |
| |
= =
|
|

\ .
\ .
Similarly, subtraction:
Scalar Multiplication
2 4 6 12
3
2 3 6 9
| | | |
=
| |

\ . \ .
Matrix Multiplication
CM3900: Mathematics 3 5
Column x Row is like dot product
e.g.
( ) ( )
( ) ( )
2
3 4 2 5 3 2 4 5 2 1
1
6 20 2 16

| |
|
= + +
|
|
\ .
= + + =
Matrix Multiplication (2)
Matrices can only be multiplied if the first matrix has the
same number of columns as the second has rows
The result has one element for every pair of row from
first and column from second, multiplied as in previous
slide
Dimensions follow pattern:
(M x N) x (N x P) = M x P
E.g. Previous slide
(1 x 3) x (3 x 1) = (1 x 1)
CM3900: Mathematics 3 6
Multiplication Example
CM3900: Mathematics 3 7
( )
( ) ( ) ( )
4 2
3 1 2 7
2 4 1 2
2 1
2 1
3
0
3 0 2 2 1 7
3 4 ( 1) 2 3 3 1 0 3 2 1 7
6 11
14 9 1
6
| || |
| |

\ .\ .
| | + + +
=
|
+ + +
\ .
| |
=
|

\ .
Dimensions: (2 x 2) x (2 x 3) = 2 x 3
Order Matters!
For two matrices A and B
It is possible that :
Both AB and BA exist
Neither AB nor BA exists
One product exists, but the other does not
If both products exist, they are not generally equal
CM3900: Mathematics 3 8
= AB BA
CM3900: Mathematics 3 9
Matrix of a System of Equations
5 2
1 3
3
7
x y
x y +
=
=
E.G.
5
7
2
1 3
3 x
y
| || | | |
=
| | |
\ .\ . \ .

AX B =
Square Matrices & Identity
With the same number of equations as variables we get
a square matrix i.e. n x n
Two square matrices of the same dimension can be
multiplied in either direction to get another n x n matrix
We can define the (n x n) identity matrix I as having the
property
IA = AI = A
A is any n x n matrix
CM3900: Mathematics 3 10
1 0 0
1 0
2: ; 3 : 0 1 0
0 1
0 0 1
n n
| |
| |
|
= = = =
|
|
\ .
|
\ .
I I
CM3900: Mathematics 3 11
Matrix Inverses
We cannot divide by a matrix
Next best thing is to multiply by matrix inverse
Inverse A
-1
of a square matrix A is defined by
A
-1
A = AA
-1
= I
E.g. to solve AX = B
A
-1
AX = A
-1
B
X = A
-1
B
Can only do this if A
-1
exists
CM3900: Mathematics 3 12
2 x 2 Inverse
Let
a b
c d
| |
=
|
\ .
A
Then, provided that det 0 ad bc = = A
1
1
det
d b
c a


| |
=
|

\ .
A
A
CM3900: Mathematics 3 13
2 x 2 Inverse Example
3 1
Let
2 1

| |
=
|
\ .
A
1
1 1 0.2 0.2
1
5 2 3 0.4 0.6

| | | |
= =
| |

\ . \ .
A
( )
det 3 1 1 2 5 = = A
CM3900: Mathematics 3 14
Determinants
Recall that det(A) is the determinant of a matrix A
(sometimes written )
For a 2 x 2 matrix
For a 3 x 3 matrix
A
a b a b
det ad bc
c d c d
| |
= =
|
\ .
1,1 1,2 1,3
2,2 2,3 2,1 2,3 2,1 2,2
2,1 2,2 2,3 1,1 1,2 1,3
3,2 3,3 3,1 3,3 3,1 3,2
3,1 3,2 3,3
a a a
a a a a a a
a a a a a a
a a a a a a
a a a
= +
CM3900: Mathematics 3 15
Determinant Examples
5 3
5 2 3 4 10 12 2
4 2
= = =
4 2
4 1 ( 2) ( 2) 4 4 0
2 1

= = =

Singular
Matrix
4 2 2 2 2 4
2 4 2
5 1 6 1 6
2 1 3
2 1
5
5 1
3
6

= +

( ) ( ) ( )
14 10 2 1 3 34 120 = + =
Inverses & Systems of Eqns
We can also calculate inverses of larger square matrices
Tedious by hand
Inverse exists if and only if determinant is non-zero
N x N systems of equations have a unique solution if the
corresponding determinant is non-zero
Otherwise, the system either has no solutions or an
infinite number of solutions
CM3900: Mathematics 3 16
CM3900: Mathematics 3 17
Solution of System of Equations
5
7
2
1 3
3 x
y
| || | | |
=
| | |
\ .\ . \ .

AX B =
( )
1
3 2 3 2
1 1
3 5 2 1 1 5 17 1 5

| | | |
= =
| |

\ . \ .
A
1
3 2 3 23
1 1
17 1 5 7 17 32
23 32
;
17 17
x
y
x y

| | | || | | |
= = = =
| | | |

\ . \ .\ . \ .
= =
X A B
CM3900: Mathematics 3 18
Eigenvalues and Eigenvectors
Given a square matrix A, the Eigenvalue Equation for
A is the matrix equation
where x is a column vector and is a scalar
s which satisfy the equation are eigenvalues of A
xs which satisfy the equation are eigenvectors of A
x Ax =
CM3900: Mathematics 3 19
Example
has an eigenvector with eigenvalue 3
since
and an eigenvector with eigenvalue 2
since
| |
|
\ .
1 2
3 0
1
1
| |
|
\ .
1 1 1 2 3
3 0 3
3
1 1
| | | |
= =
| |
| | | |
| |
\ . \ \ \ . . .
2
3
| |
|

\ .
2 2
2
0 3 3
1 2 4
3 6

| | | |
= =
| |
| | | |
| |

\ . \

\ . . . \
CM3900: Mathematics 3 20
Finding Eigenvalues
Given a square matrix A, the Eigenvalue Equation for
A is the matrix equation
or, alternatively:
where I is the appropriate identity matrix and 0 is the
zero vector.
x Ax =
( ) 0 x I A =
CM3900: Mathematics 3 21
Eigenvalues and Eigenvectors
Since
is a homogeneous equation, it will have non-trivial solutions
provided
This is also sometimes called the Characteristic Equation
of the matrix A.
If A is an n x n matrix,
is a polynomial in of degree n called the Characteristic
Polynomial of A and so has n (possibly complex) roots
(counting repetitions).
( )
= A I x 0
( )
det 0 = = A I A I
p( ) = A I
CM3900: Mathematics 3 22
Eigenvalues and Eigenvectors
The numbers which satisfy the equation
are the Eigenvalues of the matrix A.
For each eigenvalue
i
, the non-zero vector u
i
which
satisfies the eigenvalue equation
is the Eigenvector of A corresponding to the eigenvalue

i.
0 = I A
( )
i i
= A I u 0
CM3900: Mathematics 3 23
2 x 2 Case
The 2 x 2 identity matrix is
If
then
So
1 0
0 1
| |
=
|
\ .
I
a b
c d
| |
=
|
\ .
A
a b
c d

| |
=
|

\ .
A I
2
a b
det( ) det
c d
(a )(d ) bc
(a d) (ad bc)

| |
=
|

\ .
=
= + +
A I
CM3900: Mathematics 3 24
Example
Determine the eigenvalues and eigenvectors of
Solution:
2
det(A I) 0
3 2
i.e. det (3 )( ) ( 2)
1
3 2
( 2)( 1) 0
2 or 1
=

| |
=
|

\ .
= +
= =
= =
3 2
1 0
| |
=
|

\ .
A
CM3900: Mathematics 3 25
Examples
The eigenvalues are 2 and 1
To find an eigenvector associated with eigenvalue 2 solve
Thus
( 2 ) = A I v 0
3 2 2 x 1 2 x 0

1 0 2 y 1 2 y 0
x 2y 0
x 2y 0
x 2y

| || | | || | | |
= =
| | | | |

\ .\ . \ .\ . \ .
+ =

=
=
CM3900: Mathematics 3 26
Examples
We cannot solve uniquely for x and y and we have a
degree of choice equivalent to choosing the length of the
eigenvector v
A vector of the form where
is an eigenvector with eigenvalue 2,
e.g. choosing o = 1 shows is an eigenvector with
eigenvalue 2
2 o
| |
=
|
o
\ .
v 0 o =
2
1

| |
|
\ .
CM3900: Mathematics 3 27
Examples
To find an eigenvector associated with eigenvalue 1 solve
( 1 ) = A I u 0
3 1 2 x 2 2 x 0
1 0 1 y 1 1 y 0
2x 2y 0
x y
x y 0

| || | | || | | |
= =
| | | | |

\ .\ . \ .\ . \ .
+ =
=
=
CM3900: Mathematics 3 28
Examples
Again we cannot solve uniquely for x and y and we have a
degree of choice equivalent to choosing the length of the
eigenvector
A vector of the form where is an
eigenvector with eigenvalue 1
e.g. choosing | = 1 shows that is an eigenvector
with eigenvalue 1
|
| |
=
|
|
\ .
u
0 | =
1
1
| |
|

\ .
CM3900: Mathematics 3 29
Not an Eigenvalue?
Note: If we try to use an incorrect eigenvalue then trying to
solve for an eigenvector will result in an inconsistency,
e.g. if we had incorrectly concluded that = 3 was also an
eigenvalue of
we would spot our mistake after trying to find the
eigenvector, i.e. trying to solve
3 2
1 0
| |
=
|

\ .
A
( 3 ) = A I w 0
3 3 2 x 0 2 x 0
1 0 3 y 1 3 y 0
2y 0
x 0, y 0
x 3y 0

| || | | || | | |
= =
| | | | |

\ .\ . \ .\ . \ .
=
= =
=
CM3900: Mathematics 3 30
Contradiction
This tries to suggest that is an eigenvector.
This cannot be the case because part of the definition of an
eigenvector is that it must be non-zero, so = 3 must have
been incorrect.
| |
|
\ .
0
0
CM3900: Mathematics 3 31
3 x 3 Example
Has eigenvalues 0, 1, -1
And eigenvectors
0 1 1
1 0 1
1 1 0
| |
|
|
|

\ .
1 1 1
1 ; 1 ; 0
1 0 1
| | | | | |
| | |
| | |
| | |

\ . \ . \ .
CM3900: Mathematics 3 32
Note
The 3 x 3 square matrix had 3 eigenvalues and 3
eigenvectors of length 3
In general, an n x n square matrix has
n eigenvalues (not necessarily distinct)
Eigenvectors of length n
n eigenvectors if eigenvalues are distinct
CM3900: Mathematics 3 33
Repeated Eigenvalues
Repeated eigenvalues are possible:
e.g. if
then = 1 and = 2 are the eigenvalues of A but = 2
has algebraic multiplicity 2 because it is repeated.
Depending on the form of the matrix A, = 2 might
have a set of two independent eigenvectors in its
eigenspace.
2
A I (2 ) (1 ) 0 = =
CM3900: Mathematics 3 34
Additional Examples (1)
7 6
15 12

| |
|
\ .
( )( ) ( )
( )( )
2 2
7 6
det 7 12 6 15
15 12
5 84 90 5 6 2 3

| |
=
|

\ .
= + = + =
1 2
2; 3 = =
CM3900: Mathematics 3 35
Eigenvectors
1
2: =
7 2 6 0
15 12 2 0
x
y

| || | | |
=
| | |

\ .\ . \ .
9 6 0 9 6 0
15 10 0 15 10 0
x x y
y x y
=
| || | | |
=

| | |
+ =
\ .\ . \ .
1
3 2
2
3
x y
v
=
o
| |
=
|
o
\ .
3
2
NB
Not
o
| |
|
o
\ .
CM3900: Mathematics 3 36
Eigenvectors
2
3: =
7 3 6 0
15 12 3 0
x
y

| || | | |
=
| | |

\ .\ . \ .
10 6 0 10 6 0
15 9 0 15 9 0
x x y
y x y
=
| || | | |
=

| | |
+ =
\ .\ . \ .
2
5 3
3
5
x y
v
=
|
| |
=
|
|
\ .
CM3900: Mathematics 3 37
Additional Examples (2)
0 3
4 0
| |
|
\ .
2
3
det 12
4

| |
=
|

\ .
1 2
12; 12 = =
CM3900: Mathematics 3 38
Eigenvectors
1
12 : = 12 3 0
0
4 12
x
y
| |
| | | |
=
|
| |
|
\ . \ .
\ .
1
12 3
3
12
x y
v
=
o
| |
=
|
o
\ .
12
12 3 0
3
4 4 12 12
4 12 0
12 3
12
y x
x y
x y
y x x x

+ =

+ =

= = =

CM3900: Mathematics 3 39
Eigenvectors
2
12 : =
12 3 0
0
4 12
x
y
| |
| | | |
=
|
| |
|
\ . \ .
\ .
2
12 3
3
12
x y
v
=
o
| |
=
|
o
\ .
12
12 3 0
3
4 4 12 12
4 12 0
12 3
12
y x
x y
x y
y x x x

+ =

= = =

CM3900: Mathematics 3 40
Additional Examples (3)
2 1
0 2
| |
|
\ .
( ) ( )
2 2
2 1
det 2 0 2
0 2

| |
= =
|

\ .
2 =
Repeated Eigenvalue
CM3900: Mathematics 3 41
Eigenvectors
2: = 2 2 1 0
0 2 2 0
x
y

| || | | |
=
| | |

\ .\ . \ .
0 1 0
0 0 0
x
y
| || | | |
=
| | |
\ .\ . \ .
0
0
0 0
y
y
=

0
v
o
| |
=
|
\ .
CM3900: Mathematics 3 42
Additional Examples (4)
6 4
3 2
| |
|

\ .
( )( ) ( )
( )( )
2 2
5 4
det 5 7 8 4
8 7
2 35 32 2 3 1 3

| |
=
|

\ .
= + = = +
1 2
1; 3 = =
CM3900: Mathematics 3 43
Eigenvectors
1
1: =
5 1 4 0
8 7 1 0
x
y
+
| || | | |
=
| | |
+
\ .\ . \ .
4 4 0 4 4 0
8 8 0 8 8 0
x x y
y x y
+ =
| || | | |
=

| | |
+ =
\ .\ . \ .
1
x y
v
=
o
| |
=
|
o
\ .
CM3900: Mathematics 3 44
Eigenvectors
2
3: =
5 3 4 0
8 7 3 0
x
y

| || | | |
=
| | |

\ .\ . \ .
8 4 0 8 4 0
8 4 0 8 4 0
x x y
y x y
+ =
| || | | |
=

| | |
+ =
\ .\ . \ .
1
2
2
x y
v
=
|
| |
=
|
|
\ .

Vous aimerez peut-être aussi