We can apply the w:power method to find the largest eigenvalue and the w:inverse power method to find the smallest eigenvalue of a given matrix. We can also find the middle eigenvalue by the shifted inverse power method. Before explaining this method, I'd like to introduce some theorems which are very necessary to understand it.
Suppose that λ and a nonzero vector V are an eigenpair of A. If α is any constant, then λ- α and V are an eigenpair of the matrix .
Suppose that λ and a nonzero vector V are an eigenpair of A. If λ is not equal to α, then 1/(λ -α) and V are an eigenpair of the matrix .
Assume that the n×n matrix A has distinct w:eigenvalues
, ,....
and consider the eigenvalue
.
Then a constant α can be chosen so that
- =1 / ( - α)
is the dominant eigenvalue of
.
Furthermore, if
, which is the initial guess vector, is chosen appropriately , then the sequences
defined by
and
defined by
- (w:Rayleigh quotient)
will converge to the dominant eigenpair
,
will converge to the corresponding eigenvector
of the matrix
.
Therefore, the corresponding eigenvalue for the matrix A is given by
- .
Use the shifted inverse power method to find the eigenpairs of the matrix
.
Use the fact that the eigenvalues of A are
=4,
=2,
=1,
and select an appropriate α and starting vector for each case.
Case1: For the eigenvalue
=4,
we select α=4.2 and the starting vector
.
First we can get
and then we can apply the shifted inverse power method
=.
Therefore,
= .
Solving this system of equations, we get
.
Next we can compute
= ,
so
=-15.606060605.
Since
,
it implies
.
We continue doing the second iteration:
= .
Thus
.
It implies
=-5.326069
and
.
We should continue the iteration and finally we got the sequence
will converge to
,
which is the dominant eigenvalue of
,
and the sequences
converges to
after 9 iterations. We can get the eigenvalue
of A by the formula:
= 1 / + α= 1/(-5) + 4.2 =4.
We can apply the same approach to find another two eigenvalues of the given matrix A.
Use the shifted inverse power method to find the eigenvalue
=2
for the same matrix A as the example above, given the starting vector
,
α=2.1.
For the eigenvalue
=2,
we select α=2.1 and the starting vector
.
First we can get
.
Therefore,
= .
So
and
It implies
.
After 7 iterations,we got
and
.
Doing some computation, We got
= 1 / + α= 1/(-10) + 2.1 =2.
Use w:Matlab to do the shifted inverse power method to find the eigenvalue
=5.1433
for the given matrix
.
The starting vector is
,
α=6.
First we can get
.
Then we can apply the method mentioned above to find the middle eigenvalue of the matrix. Below is the Matlab code for this question.
for i=1:7
y=linsolve(A,x);
e=(y'*x)/(x'*x);
x=y/norm(y);
end
We can find that the sequence
will converge to
after 7 iterations.
Doing some computation, We got
= 1 / + α= 1/(-1.167238857441354) + 6 = 5.143277321839636
which is approximately equal to 5.1433, the middle eigenvalue of the matrix.