Docsity

MATLAB Lab for Math 526: Finding Eigenvalues and Eigenvectors, Lab Reports of Mathematics

Toggle sidebar
bg1
MATLAB Lab for Math 526 Lab J
Eigenvalues and Eigenvectors
Kamala Diefenthaler ([email protected])
Department of Mathematics
Overview
Use the MATLAB tools for finding eigenvalues and eigenvectors.
Activities
For a square matrix A,
d=eig(A)
returns a vector that contains the eigenvalues of A.
[S, Lambda]=eig(A)
returns the diagonal matrix Lambda with the eigenvalues of A. The columns of the
matrix Srepresent the corresponding eigenvectors, but they have been normalized so
that each column represents a unit vector.
Test this by finding the eigenvalues and their corresponding eigenvectors of A=
1 1 −1 0
0 2 1 0
0−310
4 5 −3 2
, and then check them by computing Axand λxfor each of the four
sets of eigenvalues and eigenvectors. In this, you will also see how Matlab handles
complex numbers.
Assignments (Due 5pm March 6, Friday)
If A=1
4
492 83 −214 0 46 9
−290 −36 108 −12 −21 10
970 164 −422 0 91 18
216 51 −114 −14 27 21
−450 −100 232 24 −53 −38
1662 293 −740 −12 161 45
, limk→∞ Ak
−3
3
−3
−1
15
−12
=
0
2
0
2
−4
2
,
limk→∞ Ak
3
4
7
12
−10
18
=
0
0
0
0
0
0
, and limk→∞ Ak
−2
4
−1
2
11
−7
does not exist. (In the last one, four
of the entries go to plus or minus infinity, but two approach finite values.) It can be
difficult to estimate these limits by telling Matlab to compute Akbfor large values of k
because of the accumulated round-off error in applying Aseveral times. Indeed, for the
second limit, when kis greater than about 25, applying Aagain makes the vector move
April 2, 2009
pf2

Partial preview of the text

Download MATLAB Lab for Math 526: Finding Eigenvalues and Eigenvectors and more Lab Reports Mathematics in PDF only on Docsity!

MATLAB Lab for Math 526 Lab J

Eigenvalues and Eigenvectors

Kamala Diefenthaler ([email protected])

Department of Mathematics

Overview

Use the MATLAB tools for finding eigenvalues and eigenvectors.

Activities

For a square matrix A,

d=eig(A)

returns a vector that contains the eigenvalues of A.

[S, Lambda]=eig(A)

returns the diagonal matrix Lambda with the eigenvalues of A. The columns of the

matrix S represent the corresponding eigenvectors, but they have been normalized so

that each column represents a unit vector.

 Test this by finding the eigenvalues and their corresponding eigenvectors of^ A^ =

, and then check them by computing Ax and λx for each of the four

sets of eigenvalues and eigenvectors. In this, you will also see how Matlab handles

complex numbers.

Assignments (Due 5pm March 6, Friday)

If A =

1 4

, limk→∞ A

k

limk→∞ A

k

, and limk→∞ A

k

does not exist. (In the last one, four

of the entries go to plus or minus infinity, but two approach finite values.) It can be

difficult to estimate these limits by telling Matlab to compute A

k b for large values of k

because of the accumulated round-off error in applying A several times. Indeed, for the

second limit, when k is greater than about 25, applying A again makes the vector move

April 2, 2009

MATLAB Lab for Math 526 Lab J

away from zero, not towards it. Using the diagonalized form SΛ

k S

− 1 b accumulates less

round-off error and is more accurate for larger k, but it still has the same problems

eventually.

To understand the behavior of A

k b for large values of k, it is very helpful to examine

the eigenvalues and corresponding eigenvectors of A.

(a) What are the eigenvalues of A? Do they tell you why limk−→∞ A

k b could be the

zero vector, a nonzero finite vector, or not exist? Not all matrices have this property.

Repeated applications of some matrices will grow unbounded for all b, but for other

matrices, it will go to 0 for all b.

(b) Use the eigenvalues and eigenvectors of A to aid you in evaluating limk→∞ A

k

(HINT: There are integer eigenvectors. Remember that the six eigenvectors you will

find form a basis for R

6 .)

(c) Give conditions on b that will ensure that limk→∞ A

k b exists.

(d) Give conditions on b that will ensure that limk→∞ A

k b = 0.

April 2, 2009