15.2. AUTOMATION WITH MATLAB 417
for the eigenvector and eigenvalue. In fact, this is exactly correct.
Example 15.2.2 Consider the symmetric matrix A =
1 2 32 1 43 4 2
. Find the middle
eigenvalue and an eigenvector which goes with it.
Since A is symmetric, it follows it has three real eigenvalues which are solutions to
p(λ ) = det
λ
1 0 00 1 00 0 1
− 1 2 3
2 1 43 4 2
= λ3−4λ
2−24λ −17 = 0
If you use your graphing calculator to graph this polynomial, you find there is an eigenvaluesomewhere between −.9 and −.8 and that this is the middle eigenvalue. Using −.8 as thenumber close to the eigenvalue desired, after 7 iterations, you get
u=
1−.5878−.2271
, λ =−.8569
Note that 1 2 3
2 1 43 4 2
− (−.8569)
1 0 00 1 00 0 1
1−.5878−.2271
=
2.5244×10−29
1.1418×10−4
−1.99×10−6
There is an easy to use trick which will eliminate some of the fuss and bother in using
the shifted inverse power method. If you have
(A−αI)−1x= µx
then multiplying through by (A−αI) , one finds that x will be an eigenvector for A witheigenvalue α+µ−1. Hence you could simply take (A−αI)−1 to a high power and multiplyby a vector to get a vector which points in the direction of an eigenvalue of A. Then divideby the largest entry and identify the eigenvalue directly by multiplying the eigenvector byA. This is illustrated in the next example.
Example 15.2.3 Find the eigenvalue near −1.2 along with an eigenvector.
A =
2 1 32 1 13 2 1
.