Professional Documents
Culture Documents
Eigenvectors and Eigenvalues in M: Atlab Objectives
Eigenvectors and Eigenvalues in M: Atlab Objectives
Objectives
1. To learn how to compute eigenvalues and eigenvectors using MATLAB's builtin functions.
2. To investigate properties of eigenvalues, eigenvectors.
Prerequisites
1. Fundamentals of matrices and their properties, including determinants, rowreduction, and solving systems of equations.
2. Basic concepts for eigenvalues and eigenvectors and diagonalization.
Background
For A, an nxn matrix, the real number is called an eigenvalue of A if there
exists a nonzero vector x in Rn such that Ax = x. The vector x is called an
eigenvector belonging to . The equation Ax = x is equivalent to (A- I)x = 0, so
all of the following are equivalent:
1. is an eigenvalue of A.
2. (A- I)x = 0 has a nontrivial solution.
3. A- I is singular.
4. det(A- I) = 0.
The eigenvectors for are the nonzero solutions x to (A- I)x=0. These vectors
together with the 0 vector is called the eigenspace corresponding to eigenvalue .
The expression det(A- I) is a polynomial in
of degree n, called the
characteristic polynomial. By property 4, the eigenvalues are the roots of the
characteristic equation det(A- I) = 0.
Determining eigenvalues and eigenvectors with MATLAB:
In MATLAB we can find the characteristic polynomial of a matrix A by entering
poly(A). If A is an nxn matrix, poly(A) is a row vector with n+1 elements that
are the coefficients of the characteristic polynomial. The command roots(C)
computes the roots of the polynomial whose coefficients are the elements of the
vector C. Thus, roots(poly(A)) returns the eigenvalues of A in a column vector.
To find the eigenvectors corresponding to each eigenvalue found above, we
need to find the nonzero solutions x to (A- I)x = 0. One way of doing this in
MATLAB is to compute rref(A- I) and then use Gauss-Jordan elimination as in
Sections 2.2 and 5.3 to find the general solution. (Eigenvectors corresponding to
a particular eigenvalue are not unique.)
3
1
A = [3 2 -2; -3 -1 3; 1 2 0]
A=
3
-3
1
2
1
2
2
3
0
Enter matrix A.
2 -2
-1 3
2 0
roots(poly(A))
ans =
2.0000
1.0000
-1.0000
rref(A-2 eye(3))
ans =
1 0
0 1
0 0
0
-1
0
rref(A-1 eye(3))
ans =
1 0
0 1
0 0
-1
0
0
rref(A-(-1) eye(3))
ans =
1 0
0 1
0 0
-1
1
0
The reduced echelon form for A-2I gives the general solution to (A-2I)x=0 as
0
0
x
r
r 1 , the form for eigenvectors corresponding to = 2.
r
1
eig(A)
ans =
-1.0000
1.0000
2.0000
[V D] = eig(A)
V=
-0.5774 0.7071 0.0000
0.5774 0.0000 0.7071
-0.5774 0.7071 0.7071
D=
-1.0000
0
0
0 1.0000
0
0
0 2.0000
From the above we get the same result as before. Note that the eigenvectors
returned in the columns of V are normalized to have length 1 (i.e., norm of each
column is 1), and the general eigenvectors are scalar multiples of these.
For = - 1, r
.5774
.5774 or equivalently r
.5774
1
1 (since r is any real number 0) ;
1
.7071
1
For = 1, s
0 or equivalently s 0
.7071
1
0
0
For = 2, t .7071 or equivalently t 1
.7071
1
6
1. 5
7
9
3
10.5
18
7.5
12 for
3
-3
=3
b) Choose any random scalars a, b, and c and verify that ax is an eigenvector for
= -1; and that by, cz, and by + cz are all eigenvectors for = 3 (using A, x,
y, and z from part a). Write down the property of eigenvectors and
eigenvalues that is demonstrated.
b) A
c) A
5 4
1 2
1 0
2 5
2 4
30
26
14
14
14
10
rank(V) ________
b)
rank(V) ________
c)
rank(V) ________
If diagonalizable, V-1AV
If diagonalizable, V-1AV
If diagonalizable, V-1AV