Skip to article frontmatterSkip to article content

Inverse iteration

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=0s=0, and suppose that A\mathbf{A} has a smallest eigenvalue,

λnλn1>λ1.|\lambda_n| \ge |\lambda_{n-1}| \ge \cdots > |\lambda_1|.

Then clearly

λ11>λ21λn1,|\lambda_1^{-1}| > |\lambda_{2}^{-1}| \ge \cdots \ge |\lambda_n^{-1}|,

and A1\mathbf{A}^{-1} has a dominant eigenvalue. Hence power iteration on A1\mathbf{A}^{-1} can be used to find the eigenvalue of A\mathbf{A} closest to zero. For nonzero values of ss, then we suppose there is an ordering

λnsλ2s>λ1s.|\lambda_n-s| \ge \cdots \ge |\lambda_2-s| > |\lambda_1-s|.

Then it follows that

λ1s1>λ2s1λns1,|\lambda_1-s|^{-1} > |\lambda_{2}-s|^{-1} \ge \cdots \ge |\lambda_n-s|^{-1},

and power iteration on the matrix (AsI)1(\mathbf{A}-s\mathbf{I})^{-1} converges to (λ1s)1(\lambda_1-s)^{-1}, which is easily solved for λ1\lambda_1 itself.

8.3.1Algorithm

A literal application of Algorithm 8.2.1 would include the step

yk=(AsI)1xk.\mathbf{y}_k = (\mathbf{A}-s\mathbf{I})^{-1} \mathbf{x}_k.

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,my_{k,m}/x_{k,m} as an estimate of the dominant eigenvalue of A\mathbf{A}. Here, that ratio is an estimate of (λ1s)1(\lambda_1-s)^{-1}, and solving for λ1\lambda_1 gives the βk\beta_k in Algorithm 8.3.1.

Each pass of inverse iteration requires the solution of a linear system of equations with the matrix B=AsI\mathbf{B}=\mathbf{A}-s\mathbf{I}. 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\mathbf{B} is constant, the factorization needs to be done only once for all iterations. The details are in Function 8.3.2.

8.3.2Convergence

The convergence is linear, at a rate found by reinterpreting (8.2.10) with (AsI)1(\mathbf{A}-s\mathbf{I})^{-1} in place of A\mathbf{A}:

βk+1λ1βkλ1λ1sλ2s as k,\frac{\beta_{k+1} - \lambda_1}{\beta_{k} - \lambda_1} \rightarrow \frac{ \lambda_1 - s } {\lambda_2 - s}\quad \text{ as } \quad k\rightarrow \infty,

with the eigenvalues ordered as in (8.3.3). Thus, the convergence is best when the shift ss is close to the target eigenvalue λ1\lambda_1, specifically when it is much closer to that eigenvalue than to any other.

8.3.3Dynamic shifting

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=βks=\beta_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 ss, then the convergence is linear with rate λ1s/λ2s|\lambda_1-s|/|\lambda_2-s|. As sλ1s\to\lambda_1, the change in the denominator is negligible. So if the error (λ1s)(\lambda_1-s) is ε, then the error in the next estimate is reduced by a factor O(ϵ)O(\epsilon). That is, ε becomes O(ϵ2)O(\epsilon^2), which is quadratic convergence.

There is a price to pay for this improvement. The matrix of the linear system to be solved, (AsI)(\mathbf{A}-s\mathbf{I}), 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.

8.3.4Exercises

  1. ⌨ 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.1102.1],  s=1\mathbf{A} = \begin{bmatrix} 1.1 & 1 \\ 0 & 2.1 \end{bmatrix}, \; s = 1 \qquad (b) A=[1.1102.1],  s=2\mathbf{A} = \begin{bmatrix} 1.1 & 1 \\ 0 & 2.1 \end{bmatrix}, \; s = 2\qquad

    (c) A=[1.1102.1],  s=1.6\mathbf{A} = \begin{bmatrix} 1.1 & 1 \\ 0 & 2.1 \end{bmatrix}, \; s = 1.6\qquad (d) A=[2110],  s=0.33\mathbf{A} = \begin{bmatrix} 2 & 1 \\ 1 & 0 \end{bmatrix}, \; s = -0.33 \qquad

    (e) A=[654543432],  s=0.1\mathbf{A} = \begin{bmatrix} 6 & 5 & 4 \\ 5 & 4 & 3 \\ 4 & 3 & 2 \end{bmatrix}, \; s = 0.1

  2. ✍ Let A=[1.1102.1].\mathbf{A} = \displaystyle \begin{bmatrix} 1.1 & 1 \\ 0 & 2.1 \end{bmatrix}. Given the starting vector x1=[1,1]\mathbf{x}_1=[1,1], find the vector x2\mathbf{x}_2 for the following shifts.

    (a) s=1s=1\quad (b) s=2s=2\quad (c) s=1.6s=1.6

  3. ✍ Why is it a bad idea to use unshifted inverse iteration with the matrix [0110]\displaystyle \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}? Does the shift s=1s=-1 improve matters?

  4. ✍ When the shift ss is very close to an eigenvalue of A\mathbf{A}, the matrix AsI\mathbf{A}-s\mathbf{I} 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\mathbf{y}_k. 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 [1100]\displaystyle \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix} has an eigenvalue at zero with associated eigenvector v=[1,1]T\mathbf{v}=[-1,1]^T. Suppose this matrix is perturbed slightly to A=[110ϵ]\displaystyle \mathbf{A} = \begin{bmatrix} 1 & 1 \\ 0 & \epsilon \end{bmatrix}, and that xk=[1,1]\mathbf{x}_k=[1,1] in (8.3.6). Show that once yk\mathbf{y}_k is normalized by its infinity norm, the result is within ε of a multiple of v\mathbf{v}.

  1. ⌨ (Continuation of Exercise 8.2.3.) This exercise concerns the n2×n2n^2\times n^2 sparse matrix defined by FNC.poisson(n) for integer nn. It represents a lumped model of a vibrating square membrane held fixed around the edges.

    (a) The eigenvalues of A\mathbf{A} closest to zero are approximately squares of the frequencies of vibration for the membrane. Using eigs, find the eigenvalue λm\lambda_m closest to zero for n=10,15,20,25n=10,15,20,25.

    (b) For each nn in part (a), apply 50 steps of Function 8.3.2 with zero shift. On one graph, plot the four convergence curves βkλm|\beta_k-\lambda_m| using a semi-log scale.

    (c) Let v be the eigenvector (second output) found by Function 8.3.2 for n=25n=25. Make a surface plot of the vibration mode by reshaping v into an n×nn\times n matrix.

  1. ⌨ 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 ss 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×100100\times 100 matrix with values k2k^2 for k=1,,100k=1,\ldots,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=920s=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.