Power iteration finds only the dominant eigenvalue. We next show that it can be adapted to find any eigenvalue, provided you start with a reasonably good estimate of it. Some simple linear algebra is all that is needed.
Consider first part 2 of the theorem with s=0, and suppose that A has a smallest eigenvalue,
and A−1 has a dominant eigenvalue. Hence power iteration on A−1 can be used to find the eigenvalue of A closest to zero. For nonzero values of s, then we suppose there is an ordering
As always, we do not want to explicitly find the inverse of a matrix. Instead we should write this step as the solution of a linear system.
Note that in Algorithm 8.2.1, we used yk,m/xk,m as an estimate of the dominant eigenvalue of A. Here, that ratio is an estimate of (λ1−s)−1, and solving for λ1 gives the βk in Algorithm 8.3.1.
Each pass of inverse iteration requires the solution of a linear system of equations with the matrix B=A−sI. This solution might use methods we consider later in this chapter. Here, we use (sparse) PLU factorization and hope for the best. Since the matrix B is constant, the factorization needs to be done only once for all iterations. The details are in Function 8.3.2.
with the eigenvalues ordered as in (8.3.3). Thus, the convergence is best when the shift s is close to the target eigenvalue λ1, specifically when it is much closer to that eigenvalue than to any other.
There is a clear opportunity for positive feedback in Algorithm 8.3.1. The convergence rate of inverse iteration improves as the shift gets closer to the true eigenvalue—and the algorithm computes improving eigenvalue estimates! If we update the shift to s=βk after each iteration, the convergence accelerates. You are asked to implement this algorithm in Exercise 6.
Let’s analyze the resulting convergence. If the eigenvalues are ordered by distance to s, then the convergence is linear with rate ∣λ1−s∣/∣λ2−s∣. As s→λ1, the change in the denominator is negligible. So if the error (λ1−s) is ε, then the error in the next estimate is reduced by a factor O(ϵ). That is, ε becomes O(ϵ2), which is quadratic convergence.
There is a price to pay for this improvement. The matrix of the linear system to be solved, (A−sI), now changes with each iteration. That means that we can no longer do just one LU factorization for the entire iteration. The speedup in convergence usually makes this tradeoff worthwhile, however.
In practice power and inverse iteration are not as effective as the algorithms used by eigs and based on the mathematics described in the rest of this chapter. However, inverse iteration can be useful for turning an eigenvalue estimate into an eigenvector estimate.
⌨ Use Function 8.3.2 to perform 10 iterations for the given matrix and shift. Compare the results quantitatively to the convergence given by (8.3.7).
(a)A=[1.1012.1],s=1(b)A=[1.1012.1],s=2
(c)A=[1.1012.1],s=1.6(d)A=[2110],s=−0.33
(e)A=⎣⎡654543432⎦⎤,s=0.1
✍ Let A=[1.1012.1]. Given the starting vector x1=[1,1], find the vector x2 for the following shifts.
(a)s=1(b)s=2(c)s=1.6
✍ Why is it a bad idea to use unshifted inverse iteration with the matrix [0−110]? Does the shift s=−1 improve matters?
✍ When the shift s is very close to an eigenvalue of A, the matrix A−sI is close to a singular matrix. But then (8.3.6) is a linear system with a badly conditioned matrix, which should create a lot of error in the numerical solution for yk. However, it happens that the error is mostly in the direction of the eigenvector we are looking for, as the following toy example illustrates.
Prove that [1010] has an eigenvalue at zero with associated eigenvector v=[−1,1]T. Suppose this matrix is perturbed slightly to A=[101ϵ], and that xk=[1,1] in (8.3.6). Show that once yk is normalized by its infinity norm, the result is within ε of a multiple of v.
⌨ (Continuation of Exercise 8.2.3.) This exercise concerns the n2×n2 sparse matrix defined by FNC.poisson(n) for integer n. It represents a lumped model of a vibrating square membrane held fixed around the edges.
(a) The eigenvalues of A closest to zero are approximately squares of the frequencies of vibration for the membrane. Using eigs, find the eigenvalue λm closest to zero for n=10,15,20,25.
(b) For each n in part (a), apply 50 steps of Function 8.3.2 with zero shift. On one graph, plot the four convergence curves ∣βk−λm∣ using a semi-log scale.
(c) Let v be the eigenvector (second output) found by Function 8.3.2 for n=25. Make a surface plot of the vibration mode by reshaping v into an n×n matrix.
⌨ This problem explores the use of dynamic shifting to accelerate the inverse iteration.
(a) Modify Function 8.3.2 to change the value of the shift s to be the most recently computed value in the vector β. Note that the matrix B must also change with each iteration, and the LU factorization cannot be done just once.
(b) Define a 100×100 matrix with values k2 for k=1,…,100 on the main diagonal and random values uniformly distributed between 0 and 1 on the first superdiagonal. (Since this matrix is triangular, the diagonal values are its eigenvalues.) Using an initial shift of s=920, apply the dynamic inverse iteration. Determine which eigenvalue was found and make a table of the log10 of the errors in the iteration as a function of iteration number. (These should approximately double, until machine precision is reached, due to quadratic convergence.)
(c) Repeat part (b) using a different initial shift of your choice.