24.4  The Power Method

Chapter 19 computed a Perron vector three times and each time stopped at the same place. Section 4 bracketed ρ(A) by the ratios of Ax to x and observed: “the iteration x↦Ax is the power method, and Chapter 24 studies how fast it converges.” Section 8 said the same of PageRank — “Chapter 24 studies it for general matrices, where the rate is governed by the ratio of the two largest eigenvalue moduli” — and Section 9’s ledger listed “the power method, the algorithm that computes a Perron vector at the size of the web” among the debts. Chapter 17 §01 and Chapter 20 §06 each promised, in the same words, that “Chapter 24 builds an iteration on” the Rayleigh quotient.

This section pays all five. It is about one idea used three times: multiply by a matrix repeatedly and the largest eigenvalue takes over. Applied to A itself, the idea finds the eigenvalue of largest modulus. Applied to (A−μI)−1, it finds the eigenvalue nearest μ — any eigenvalue we choose to aim at. Applied to (A−μI)−1 with μ refreshed at every step from the Rayleigh quotient, it converges cubically, and that is the iteration Chapters 17 and 20 promised.

Throughout, F=R or F=C, matrices are in Mn(F) read inside Mn(C), and ‖⋅‖=‖⋅‖2. Iteration indices are superscripts in parentheses, so that subscripts stay free for coordinates.

24.4.1. Multiplying by the matrix

Take A diagonalizable with eigenbasis v1,…,vn and eigenvalues λ1,…,λn, and expand a starting vector:

x=c1v1+⋯+cnvn⟹Akx=c1λ1kv1+⋯+cnλnkvn.

Divide by λ1k, and suppose |λ1| is strictly the largest. Every coefficient except the first is multiplied by (λi/λ1)k, a number of modulus less than 1 raised to the k-th power. So the sum collapses onto its first term. Nothing here needs to be discovered; it needs to be named, and its rate measured.

The power method is: multiply, rescale, repeat, and read off the dominant eigenvector.

Definition 24.4.1 (Power Iteration)

Let A∈Mn(F) and let x(0)∈Fn with ‖x(0)‖=1. The power iteration generated by A and x(0) is the sequence defined for k≥0 by x(k+1)=Ax(k)‖Ax(k)‖, which is defined as long as Ax(k)≠0, together with the eigenvalue estimates μk=(x(k))∗Ax(k).

Clause by clause. The vectors are unit vectors: the normalization has no mathematical content, since x(k) spans the same line as Akx(0), and its only purpose is to stop the entries from growing or shrinking like λ1k until the arithmetic can no longer hold them. The iteration is partial: if Ax(k)=0 the sequence stops, and it stops exactly when x(k)∈nul(A) — which, as we shall see, a good starting vector avoids. The estimate μk is the natural number to attach to a unit vector x that is nearly an eigenvector: if Ax=λx exactly then x∗Ax=λ. For Hermitian A it is the Rayleigh quotient RA(x(k)) of Definition 17.1.1, whose denominator is 1 here; for a general A the book reserves that name for the Hermitian case, so we write the quadratic form out.

Examples.

  • The identity. A=I: every unit vector is fixed, x(k)=x(0) for all k, and μk=1. The degenerate case is worth a glance, because it shows that the method converges to an eigenvector, never to a distinguished one.
  • A diagonal matrix. A=diag(3,1) and x(0)=12(1,1): then Akx(0)∝(3k,1), and the normalized vector runs to e1 with second coordinate 3−k. The rate 3−k is |λ2/λ1|k.
  • A stochastic matrix. For the Google matrix G of Chapter 19 §08, λ1=1 and every other eigenvalue has modulus at most α (Theorem 19.8.2), so the iteration xk+1=Gxk of Proposition 19.8.3 is a power iteration with rate at most α. Chapter 19 proved the rate directly from stochasticity, with no hypothesis on G beyond that; the theorem below proves it from the eigenvalues, for any diagonalizable matrix.

Nonexample by minimal change. Replace diag(3,1) by diag(3,−3). The eigenvalues now have equal modulus, the collapse never happens, and from x(0)=12(1,1) the iterates alternate between 12(1,1) and 12(1,−1) forever. One clause of the hypothesis has been dropped — strictness in |λ1|>|λ2| — and the conclusion is gone with it.

Here is the theorem, with the rate.

Theorem 24.4.1 (The Power Method)

Let A∈Mn(F) be diagonalizable, with a basis v1,…,vn of eigenvectors, Avi=λivi, ordered by modulus so that |λ1|>|λ2|≥⋯≥|λn|. Let x(0)=c1v1+⋯+cnvn be a unit vector with c1≠0, and put ρ=|λ2/λ1|<1, q1=v1/‖v1‖ and C=1‖v1‖∑i≥2|cic1|‖vi‖. Then the power iteration of Definition 24.4.1 is defined for every k, and for every k with Cρk≤12 there is a scalar ωk of modulus 1 with

  • (a) ‖ωkx(k)−q1‖≤4Cρk;
  • (b) |μk−λ1|≤8‖A‖Cρk.

In particular μk→λ1, and the iterates approach the eigenline span(v1) in the sense of (a), both at the rate ρk.

Idea. The whole content is the display at the head of this subsection: divide Akx(0) by c1λ1k and what is left is v1 plus a tail of size ρk. Two pieces of bookkeeping then stand between that and the statement. First, normalizing: a bound on y−v1 is not yet a bound on y/‖y‖−v1/‖v1‖, and the conversion costs a factor 2 and the hypothesis Cρk≤12, which only says that we are past the point where the tail could swamp v1. Second, phases: over C the scalar c1λ1k has a modulus and an argument, and normalizing kills the modulus but not the argument. That argument is the ωk. It cancels out of μk, because a quadratic form does not see it.

Proof. The iterates are defined, and what they are. Since c1λ1k≠0, the vector Akx(0)=∑iciλikvi has a nonzero coefficient on v1, so Akx(0)≠0 for every k, the eigenvectors being a basis. An induction on k then gives x(k)=Akx(0)/‖Akx(0)‖: true at k=0, and if it holds at k then Ax(k) is a positive multiple of Ak+1x(0)≠0, so normalizing it gives the same unit vector as normalizing Ak+1x(0).

The tail. Put yk=Akx(0)c1λ1k=v1+ek,ek=∑i≥2cic1(λiλ1)kvi. Since |λi/λ1|≤ρ for i≥2, the triangle inequality (Corollary 11.1.6) gives ‖ek‖≤ρk∑i≥2|cic1|‖vi‖=Cρk‖v1‖.

Normalizing. Let ωk=σk―, where σk=c1λ1k/|c1λ1k| has modulus 1. Then Akx(0)=|c1λ1k|σkyk, so x(k)=σkyk/‖yk‖ and ωkx(k)=yk/‖yk‖. For any nonzero a,b, a‖a‖−b‖b‖=a−b‖a‖+b(1‖a‖−1‖b‖),|1‖a‖−1‖b‖|‖b‖=|‖b‖−‖a‖|‖a‖≤‖a−b‖‖a‖, the last step by the reverse triangle inequality (Lemma 16.1.1). Hence ‖a/‖a‖−b/‖b‖‖≤2‖a−b‖/‖a‖. Apply this with a=yk and b=v1. If Cρk≤12 then ‖ek‖≤12‖v1‖, so ‖yk‖≥‖v1‖−‖ek‖≥12‖v1‖, and ‖ωkx(k)−q1‖≤2‖ek‖‖yk‖≤4‖ek‖‖v1‖≤4Cρk, which is (a).

The estimates. Write z=ωkx(k), a unit vector, and note μk=(x(k))∗Ax(k)=z∗Az because ωk―ωk=1. Since Aq1=λ1q1 and ‖q1‖=1, we have q1∗Aq1=λ1, so μk−λ1=z∗A(z−q1)+(z−q1)∗Aq1. By Cauchy–Schwarz (Theorem 11.1.5) and Theorem 16.3.2 (a), each term is at most ‖A‖‖z−q1‖, so |μk−λ1|≤2‖A‖‖z−q1‖≤8‖A‖Cρk by (a). This proves the theorem.

Aftermath. One matrix–vector product per step: 2n2 flops for a dense A, and far fewer when A is sparse — for the hyperlink matrix of Chapter 19 §08, one operation per link. Nothing is factorized and nothing is stored but a vector, which is why the method survives at sizes where the matrix itself could never be written down. What it buys with that cheapness is a linear rate: to gain one decimal digit takes 1/log10⁡(1/ρ) steps, and for ρ=0.99 that is 230 of them.

Example (Every iterate exactly)

Let A=(2112) and x(0)=e1. Compute Ake1, the estimates μk, and the errors, in closed form.

Solution. A has eigenvectors (1,1) and (1,−1) with eigenvalues 3 and 1, so ρ=13. Writing e1=12(1,1)+12(1,−1), Ake1=123k(1,1)+12(1,−1)=(3k+12, 3k−12). So the iterates are proportional to (1,0),(2,1),(5,4),(14,13),(41,40),(122,121),…, visibly running to the direction (1,1). Put t=3k and x=(a,b) with a=(t+1)/2, b=(t−1)/2. Then a2+b2=(t2+1)/2 and ab=(t2−1)/4, so μk=2a2+2ab+2b2a2+b2=(t2+1)+12(t2−1)12(t2+1)=3t2+1t2+1=3−29k+1. The values are 2, 145, 12241, 1094365, 98423281, with errors 1, 15, 141, 1365, 13281 — falling by factors 5, 8.2, 8.9, 9.0, so by about a ninth in the limit, not a third.

The eigenvector error tells the other half. The component of x=(a,b) orthogonal to (1,1) is 12(a−b)(1,−1), of length |a−b|/2=1/2, and ‖x‖=(t2+1)/2, so the sine of the angle between x(k) and (1,1) is (9k+1)−1/2, which does shrink like 3−k=ρk. Exactly: 3−μk=29k+1=2sin2⁡θk. The eigenvector converges at rate ρk and the eigenvalue estimate at rate ρ2k, and the second is the square of the first. That is not an accident of this matrix.

The corollary explains it, and pays Chapter 17 §01 in its own words.

Corollary 24.4.2 (Hermitian Matrices: the Rayleigh Quotient Converges Twice as Fast)

Let A∈Mn(F) be Hermitian, with an orthonormal basis q1,…,qn of eigenvectors, Aqi=λiqi, ordered by modulus so that |λ1|>|λ2|≥⋯≥|λn|. Let x(0)=∑iciqi be a unit vector with c1≠0, and put ρ=|λ2/λ1|. Then for every k, |RA(x(k))−λ1| ≤ Dρ2k,D=1|c1|2∑i≥2|ci|2|λi−λ1|.

Idea. The Rayleigh quotient is unchanged by scaling, so evaluate it at the unnormalized Akx(0), where the coefficients are just ciλik. Both the numerator and the denominator are then sums of nonnegative multiples of λi2k — the exponent is even, which is the whole point — so the denominator is bounded below by its first term alone, and the numerator, after λ1 is subtracted, loses its first term entirely. What is left is λi2k against λ12k: one factor of ρ2 per step.

Proof. Write y=Akx(0)=∑iciλikqi. Since c1λ1k≠0, y≠0, and x(k) is a scalar multiple of y as in the proof of Theorem 24.4.1, so RA(x(k))=RA(y) by the scale-invariance of the Rayleigh quotient (Definition 17.1.1). The basis is orthonormal and Ay=∑iciλik+1qi, so by Theorem 11.2.1 (b) and (c), RA(y)=⟨Ay,y⟩⟨y,y⟩=∑i|ci|2λi2k+1∑i|ci|2λi2k, all the λi being real (Proposition 11.6.7). Subtract λ1, which is the same as subtracting λ1 times the denominator from the numerator; the term i=1 cancels, leaving RA(y)−λ1=∑i≥2|ci|2λi2k(λi−λ1)∑i|ci|2λi2k. Every λi2k is nonnegative, so the denominator is at least its first term |c1|2λ12k=|c1|2|λ1|2k, and the numerator is at most |λ2|2k∑i≥2|ci|2|λi−λ1| in modulus, since |λi|≤|λ2| for i≥2. Dividing gives the stated bound with ρ2k=(|λ2|/|λ1|)2k. This proves the corollary.

This is the “second-order accuracy” of Chapter 17 §01, seen along an iteration: the eigenvector error is ρk and the eigenvalue error is its square. Theorem 20.6.2 says the same thing structurally and without any iteration — a residual of size ε yields an eigenvalue error of at most ε2 divided by the gap — and the corollary above is that estimate made explicit for the particular unit vectors the power method produces.

Quick check. In Example (Every iterate exactly) the estimates μk increase towards 3 and never overshoot. Which earlier result says that they cannot?

Solution. Proposition 17.1.1: for a Hermitian A, the values of RA fill exactly the interval [λn(A),λ1(A)] between the smallest and largest eigenvalues. Here A=(2112) has eigenvalues 3 and 1, so every μk=RA(x(k)) lies in [1,3] and no estimate can exceed 3. The power method on a Hermitian matrix with λ1>0 dominant therefore produces a sequence of certified lower bounds for λ1, which is what Chapter 19 §04’s brackets were doing by hand.

Example (The method that never converges)

Let P∈M3(R) be the cyclic permutation matrix of Example (The Cyclic Permutation), with columns e2,e3,e1, so that P(x1,x2,x3)=(x3,x1,x2). Run the power iteration from x(0)=e1 and from x(0)=114(1,2,3).

Solution. By Example (The Cyclic Permutation) the eigenvalues of P are the three cube roots of unity, all of modulus 1: the hypothesis |λ1|>|λ2| fails as badly as it can. Every Pk is a permutation matrix, so no normalization is needed, and P3=I. From e1 the iterates are e1→e2→e3→e1→… and from 114(1,2,3) they are 114 times (1,2,3),(3,1,2),(2,3,1),(1,2,3),…. In both cases the sequence takes three distinct values over and over, so neither it nor the line it spans has a limit. The estimates behave worse than that: they are constant, μk=0 for every k in the first case and μk=1114 in the second, so they converge perfectly well — to a number that is not an eigenvalue of P at all. Yet P does have the eigenvalue 1, with eigenvector 1, and the method never finds it.

The failure is exactly the one Chapter 19 §04 warned of for the swap (0110), whose brackets “never improve”. It is not a defect of the arithmetic and no amount of care repairs it: the hypothesis of Theorem 24.4.1 is false, and its conclusion is false too.

Warning. Two hypotheses, two different kinds of failure. If |λ1|=|λ2|, as in Example (The method that never converges), the method fails permanently and no starting vector helps. If instead c1=0 — the starting vector happens to miss the dominant eigendirection — the method converges, but to the wrong eigenvector. The second failure is fragile and the first is not: a starting vector with c1=0 lies in a proper subspace, and in the arithmetic of Definition 24.1.1 the first rounding error generally puts a small nonzero c1 back, after which Theorem 24.4.1 takes over, only C being large. This is the one situation in the chapter where rounding helps, and it is not a reason to rely on it: a starting vector chosen without regard to A is a better plan than a lucky rounding.

24.4.2. Shifting and inverting

The power method finds the eigenvalue of largest modulus, and that is usually not the one anybody wants. The repair is a change of matrix. If μ is not an eigenvalue of A, then A−μI is invertible, and the eigenvalues of its inverse are the numbers (λi−μ)−1 — large exactly for the λi close to μ. Multiplying repeatedly by (A−μI)−1 therefore singles out the eigenvalue nearest to μ, and μ is ours to choose.

Definition 24.4.2 (Inverse Iteration)

Let A∈Mn(F), let μ∈F be not an eigenvalue of A, and let x(0) be a unit vector. Inverse iteration with shift μ is the power iteration of Definition 24.4.1 generated by (A−μI)−1 and x(0); that is, (A−μI)z(k)=x(k),x(k+1)=z(k)‖z(k)‖. The eigenvalue estimates are taken from A itself: μk=(x(k))∗Ax(k).

The shifted matrix is never inverted. One factorization of A−μI by elimination with pivoting is computed once, at a cost of 23n3 flops (Section 2), and each step then costs two triangular solves, 2n2 flops — the same price per step as the power method, after a one-off payment.

Theorem 24.4.3 (Inverse Iteration Converges to the Nearest Eigenvector)

Let A∈Mn(F) be diagonalizable with eigenbasis v1,…,vn and eigenvalues λ1,…,λn, and let μ∈F be not an eigenvalue of A. Suppose there is an index j with |λj−μ|<|λi−μ|for every i≠j, so that λj is the unique eigenvalue nearest μ. Let x(0) be a unit vector whose vj-coefficient is nonzero. Then inverse iteration with shift μ is defined for every k, the iterates approach the eigenline span(vj) in the sense of Theorem 24.4.1 (a), and μk→λj, both at the rate ρμk, where ρμ=|λj−μ|mini≠j|λi−μ|<1.

Idea. There is nothing to prove that Theorem 24.4.1 has not proved. The only work is to check that (A−μI)−1 satisfies its hypotheses — same eigenvectors, reciprocal shifted eigenvalues, a strict winner in modulus — and to read off what the ratio ρ of that theorem becomes after the reciprocals are taken: dividing by the largest reciprocal is multiplying by the smallest difference, so the ratio turns upside down.

Proof. Let V=(v1∣⋯∣vn), invertible because its columns are a basis, and Λ=diag(λ1,…,λn), so that A=VΛV−1 (Theorem 9.4.1). Then A−μI=V(Λ−μI)V−1, and Λ−μI is invertible because no λi equals μ. Hence B:=(A−μI)−1=V(Λ−μI)−1V−1 is diagonalizable, with the same eigenvectors vi and eigenvalues βi=(λi−μ)−1.

Their moduli are |βi|=1/|λi−μ|, so the hypothesis on j says exactly that |βj|>|βi| for every i≠j: the eigenvalue βj is strictly dominant. Relabeling so that j comes first, the second largest modulus is maxi≠j|βi|=1/mini≠j|λi−μ|, so the ratio of Theorem 24.4.1 is maxi≠j|βi||βj|=|λj−μ|mini≠j|λi−μ|=ρμ. Since the vj-coefficient of x(0) is nonzero, Theorem 24.4.1 applies to B and x(0) and gives unimodular ωk with ‖ωkx(k)−qj‖≤4Cρμk, where qj=vj/‖vj‖ and C is that theorem’s constant for B and x(0). That is the convergence of the line.

For the estimates, repeat the last paragraph of the proof of Theorem 24.4.1 with A in place of B: with z=ωkx(k) we have μk=z∗Az and qj∗Aqj=λj, so |μk−λj|≤2‖A‖‖z−qj‖≤8‖A‖Cρμk. This proves the theorem.

Example (Aiming at the smaller eigenvalue)

Let A=(2112) again, and take the shift μ=34, which is nearer to the eigenvalue 1 than to 3. Run inverse iteration from x(0)=e1, and compare with Example (Every iterate exactly).

Solution. A−34I=(5/4115/4) has determinant 2516−1=916, so (A−34I)−1=169(5/4−1−15/4)=19(20−16−1620). Ignoring positive scalars, each step is (a,b)↦(5a−4b, −4a+5b), so the iterates are (1,0)→(5,−4)→(41,−40)→(365,−364)→(3281,−3280)→…, running to the direction (1,−1) — the eigenvector of the eigenvalue 1. In closed form: the eigenvalues of (A−34I)−1 are (3−34)−1=49 and (1−34)−1=4, so expanding e1=12(1,1)+12(1,−1) gives (A−34I)−ke1=12(49)k(1,1)+124k(1,−1) ∝ (9k+1, −(9k−1)), the last step on multiplying by 2(9/4)k. Halving, this is the list above. Writing x=(a,b) with a+b=1, we have 2ab=1−(a2+b2) and so μk=2a2+2ab+2b2a2+b2=1+1a2+b2=1+281k+1, since a2+b2=12(81k+1). The errors are 1,141,13281,1265721,121523361,…, each about 181 of the last, while the sine of the angle to (1,−1) is (81k+1)−1/2, shrinking by 19 per step. The theorem predicts exactly that: ρμ=|1−34||3−34|=1/49/4=19, with the estimates again going at the squared rate ρμ2k=81−k, as in Example (Every iterate exactly) and for the same reason. Compare that example, where the same matrix and the same starting vector gave rate 13 towards the other eigenvector: one well-chosen shift has both redirected the method and made it gain twice as many digits per step.

The objection, and the answer. If μ is close to λj, then A−μI is close to singular and κ2(A−μI) is enormous. For normal A=UDU∗ (Corollary 12.4.3) we have A−μI=U(D−μI)U∗, whose singular values are the numbers |λi−μ|, so by Proposition 16.8.2 (d) κ2(A−μI)=maxi|λi−μ||λj−μ|, which grows without bound as μ→λj. Section 3 spent its length on how much a large condition number costs. And the better the shift, the worse the conditioning: the method is deliberately solving an ill-conditioned system, and it does so on purpose.

It does no harm, and here is why. Suppose the linear solve is backward stable in the sense of Definition 24.1.3, so that the computed z^ is the exact solution of (A−μI+Δ)z^=x,‖Δ‖≤cu‖A−μI‖, for a unit x. The computed z^ may be wrong in every digit — the forward error is bounded only by κ2(A−μI)cu, which may exceed 1. But rearrange the same equation as a residual: (A−μI)z^−x=−Δz^, so the normalized vector q^=z^/‖z^‖ satisfies ‖Aq^−μq^‖ ≤ 1‖z^‖+cu‖A−μI‖. The first term is small when ‖z^‖ is large, and that takes an argument and a hypothesis. Near-singularity alone will not supply it: for A=diag(1,2), μ=1+10−10, and x=e2, the matrix A−μI is as near singular as one pleases and yet z=(A−μI)−1x has norm 1 to ten digits. What is needed is that x see the near-singular direction.

Take A normal with orthonormal eigenbasis q1,…,qn (Corollary 12.4.3), so that A∗qj=λj―qj and hence qj∗(A−μI)=(λj−μ)qj∗. Multiplying the perturbed equation by qj∗ gives qj∗x=(λj−μ)qj∗z^+qj∗Δz^, so by Cauchy–Schwarz (Theorem 11.1.5) and Theorem 16.3.2 (a),

‖z^‖ ≥ |qj∗x||λj−μ|+‖Δ‖.

So a shift close to λj does force ‖z^‖ to be large, provided the component qj∗x is not small — which is the hypothesis Theorem 24.4.3 already makes on the starting vector. Granting it, the first term of the residual bound is small, and the second is at the rounding level. The residual of the normalized answer is small even though the answer itself is inaccurate, and a small residual is all that an eigenvector approximation has to have.

For Hermitian A one can say precisely how much it buys. Let q^ be a unit vector, μ^=RA(q^) its Rayleigh quotient, and ε=‖Aq^−μ^q^‖ its residual. Expand q^=∑idiqi in an orthonormal eigenbasis (Corollary 12.4.3); by Theorem 11.2.1 (c), ε2=∑i|di|2(λi−μ^)2. If λj is the only eigenvalue within distance g of μ^, every term with i≠j has (λi−μ^)2≥g2, so ∑i≠j|di|2≤ε2/g2 and the sine of the angle between q^ and qj is at most ε/g. Together with Theorem 20.6.1, which puts an eigenvalue of A within ε of μ^, and Theorem 20.6.2, which improves that to ε2/g, the small residual certifies both halves of the answer.

Warning. “Ill-conditioned” is a statement about the wrong question. The system (A−μI)z=x is indeed almost unsolvable if what is wanted is z. What is wanted is the direction of z, and the direction is precisely the part the ill-conditioning leaves alone: the huge factor 1/(λj−μ) multiplies the component along vj, which is the component being sought, and dividing by ‖z^‖ removes it. The residual estimate above is the rigorous form of that sentence. The same reasoning does not license inverse iteration when the eigenvalue is not simple or two eigenvalues are nearly equal: then g is small, the bound ε/g says nothing, and the computed direction really is unreliable.

24.4.3. The shift that improves itself

Inverse iteration needs a shift, and a better shift converges faster. But the iteration is manufacturing better and better approximations to λj as it goes, in the estimates μk. Use them.

Definition 24.4.3 (Rayleigh Quotient Iteration)

Let A∈Mn(F) be Hermitian and let x(0) be a unit vector. Rayleigh quotient iteration is the sequence defined for k≥0 by μk=RA(x(k))=(x(k))∗Ax(k),(A−μkI)z(k)=x(k),x(k+1)=z(k)‖z(k)‖, the step being undefined, and the iteration stopped, when μk is an eigenvalue of A — in which case μk is the answer, exactly.

It is inverse iteration with the shift refreshed at every step, and it is what Chapter 17 §01 and Chapter 20 §06 both promised. The price is a new factorization of A−μkI at every step, 23n3 flops instead of 2n2. What is bought is the following rate.

Theorem 24.4.4 (Rayleigh Quotient Iteration Converges Cubically)

Let A∈Mn(F) be Hermitian with an orthonormal basis q1,…,qn of eigenvectors, Aqi=λiqi, and fix an index j whose eigenvalue is simple. Put g=mini≠j|λi−λj|>0,D=maxi≠j|λi−λj|, and for a unit vector x write s(x)=‖x−qjqj∗x‖, the length of the part of x orthogonal to qj.

Let x=x(k) be a unit iterate with s=s(x) satisfying s≤12 and Ds2≤g2. Then |μk−λj|≤Ds2, and either μk=λj — the iteration has found the eigenvalue exactly — or the next iterate is defined and s(x(k+1)) ≤ 4Dgs3. Consequently, if s0=s(x(0)) satisfies s0≤12 and s02≤g/(8D), then ak:=4D/gs(x(k)) satisfies ak≤a03k with a0≤1/2, so s(x(k))→0 and μk→λj.

Idea. Two facts, multiplied together. The Rayleigh quotient is accurate to second order in the eigenvector error, so a shift built from an iterate at distance s is wrong by only Ds2 — that is Corollary 24.4.2’s squaring again, in its noniterative form. And one step of inverse iteration with a shift wrong by δ multiplies the error by about δ/g. Put δ=Ds2 and the step multiplies s by Ds2/g: a factor s2 per step, which is one cube. Everything else is the arithmetic of keeping the shift far enough from the other eigenvalues for g to survive, and that is what the two smallness hypotheses are for.

Proof. Expand x=∑iciqi with ∑i|ci|2=1 (Theorem 11.2.1 (c)). Then qjqj∗x=cjqj, so s2=∑i≠j|ci|2,|cj|2=1−s2.

Step 1: the shift is accurate to second order. By Theorem 11.2.1 (b), μk=x∗Ax=∑i|ci|2λi, and since the weights sum to 1, μk−λj=∑i≠j|ci|2(λi−λj),|μk−λj|≤D∑i≠j|ci|2=Ds2.

Step 2: the shift stays away from the other eigenvalues. By hypothesis Ds2≤g/2, so |μk−λj|≤g/2 and, for i≠j, |λi−μk|≥|λi−λj|−|λj−μk|≥g−g2=g2>0. In particular the only eigenvalue μk can equal is λj. If it does, the iteration stops with the exact answer. Otherwise A−μkI is invertible and the step is defined.

Step 3: one step. Since Aqi=λiqi, z(k)=(A−μkI)−1x=∑iciλi−μkqi. The quantity s(⋅) is unchanged by scaling, so s(x(k+1))=s(z(k)/‖z(k)‖) is the ratio of the length of the part of z(k) orthogonal to qj to the length of z(k): s(x(k+1))2=∑i≠j|ci|2|λi−μk|2∑i|ci|2|λi−μk|2. Bound the numerator above using Step 2, and the denominator below by its i=j term alone: s(x(k+1))2 ≤ (2/g)2s2|cj|2/|λj−μk|2 = 4s2|λj−μk|2g2(1−s2) ≤ 4s2D2s4g2(1−s2), using Step 1 at the end. Taking square roots and using s≤12, so that 1−s2≥32≥12, s(x(k+1)) ≤ 2Ds3g1−s2 ≤ 4Dgs3.

Step 4: the iteration. Put C=4D/g and ak=Cs(x(k)). The hypotheses s0≤12 and s02≤g/(8D) give a02=Cs02≤12, so a0≤1/2<1, and also Ds02≤g/2. Whenever the hypotheses hold at step k, Step 3 gives ak+1≤CCsk3=ak3, so ak+1≤ak3≤ak≤a0; hence sk+1≤sk≤s0≤12 and Dsk+12≤Ds02≤g/2, and the hypotheses hold again. By induction ak≤a03k for every k. Since a0<1, ak→0 and so s(x(k))→0; by Step 1, |μk−λj|≤Dsk2→0. This proves the theorem.

Cubic convergence is a different animal from the linear convergence of Theorem 24.4.1. Each step roughly triples the number of correct digits, so an iterate with two correct digits has six after one step and eighteen after two — which is more than the arithmetic holds. In practice the iteration is over in three or four steps from any reasonable start, and the cost is dominated by those three or four factorizations.

Example (Three steps, exactly)

Run Rayleigh quotient iteration on A=(2112) from x(0)∝(2,1), in exact arithmetic.

Solution. Write each iterate as an integer vector, scaling being irrelevant. Take qj=12(1,1), so λj=3, and here g=D=2, giving 4D/g=4.

Step 0. x∝(2,1). Then μ0=(2⋅22+2⋅2⋅1+2⋅12)/5=145, and A−145I=(−4/511−4/5) has determinant −925. Solving gives z∝(13,14).

Step 1. x∝(13,14), μ1=1094365, and 3−μ1=1365. Solving again gives z∝(9842,9841).

Step 2. μ2=581130734193710245, with 3−μ2=1193710245.

Step 3. x∝(3812798742493, 3812798742494) and 3−μ3=129074868501520029845195085.

The eigenvalue errors are 2⋅10−1,2.7⋅10−3,5.2⋅10−9,3.4⋅10−26, and the eigenvector errors sk are 3.16⋅10−1,3.70⋅10−2,5.08⋅10−5,1.31⋅10−13. Check the theorem: s1/s03=1.17, s2/s13=1.00, s3/s23=1.00, all comfortably below the predicted constant 4D/g=4. Four steps have produced twenty-five correct digits from a starting vector accurate to none.

Remark. The non-Hermitian rate is quadratic, and we do not prove it. For a general diagonalizable A, with μk taken to be (x(k))∗Ax(k), the same iteration converges locally at a quadratic rate rather than a cubic one. The reason is visible in Step 1 above: it used that μk is a weighted average of the eigenvalues with weights |ci|2, so that the first-order term in s is absent — and that identity is exactly the Hermitian spectral theorem at work. Without it the shift is accurate only to first order, |μk−λj|=O(s), and the step multiplies s by O(s). The general statement is classical and is not proved here, and nothing in this book depends on it.

24.4.4. Deflation, and what comes next

One eigenpair is rarely enough. For Hermitian A, once a unit eigenvector q1 and its eigenvalue λ1 are known, the next one can be reached by removing the first: put

A′=A−λ1q1q1∗.

Let q1,…,qn be an orthonormal eigenbasis (Corollary 12.4.3). Then A′q1=λ1q1−λ1q1(q1∗q1)=0, and for i≠1, A′qi=λiqi−λ1q1(q1∗qi)=λiqi by orthonormality. So A′ is Hermitian with the same eigenvectors and the eigenvalue list 0,λ2,…,λn: the power method applied to A′ finds λ2, provided λ2 is now dominant in modulus.

Warning. Deflation is exact only with an exact eigenvector. If the computed q^1 differs from q1 by an angle η, then the matrix actually formed differs from the intended A′ by λ1(q1q1∗−q^1q^1∗), of norm of order |λ1|η, and by the perturbation bounds of Chapters 17 and 20 that error is inherited by every eigenvalue and eigenvector computed afterwards. Deflating n−1 times accumulates n−1 such errors. For one or two extreme eigenvalues deflation is the right tool; for the whole spectrum it is not, and the next section builds the algorithm that is.

Everything in this section has been a single vector chasing a single eigenvector. The next section iterates on a whole basis at once, and the result — the QR algorithm — turns out to be the power method in disguise, its accumulated factors furnishing a QR factorization of Ak, with the shifts of this section reappearing as the device that makes it fast.

24.4.5. Exercises

A. Check your understanding

Exercise (A1)
  • (a) State the two hypotheses of Theorem 24.4.1 on the eigenvalues and on the starting vector, and say what the rate ρ is.
  • (b) For a Hermitian A, at what rate does the eigenvector converge and at what rate does the Rayleigh quotient? Which earlier result explains the relation between the two?
  • (c) Explain in one sentence why inverse iteration with shift μ finds the eigenvalue nearest μ.
  • (d) True or false: “the shifted matrix in inverse iteration is nearly singular, so the method is unreliable”. Justify your answer.
  • (e) Give the per-step cost of the power method, of inverse iteration, and of Rayleigh quotient iteration, for a dense n×n matrix.

Solution.

  • (a) The dominant eigenvalue must be strictly dominant in modulus, |λ1|>|λ2|, and the starting vector must have a nonzero coefficient c1 on the corresponding eigenvector. The rate is ρ=|λ2/λ1|, the ratio of the two largest moduli.

  • (b) The eigenvector converges at rate ρk (Theorem 24.4.1 (a)) and the Rayleigh quotient at rate ρ2k (Corollary 24.4.2). The relation is the second-order accuracy of the Rayleigh quotient at a Hermitian matrix, quantified by Theorem 20.6.2: a residual of size ε gives an eigenvalue error of at most ε2 divided by the gap.

  • (c) Because (A−μI)−1 has the same eigenvectors as A and the eigenvalues (λi−μ)−1, whose moduli are largest precisely for the λi nearest μ (Theorem 24.4.3).

  • (d) False. The forward error in z(k) is indeed large, but only its direction is used, and normalizing removes the part of the error that the ill-conditioning creates; the residual ‖Aq^−μq^‖ of the normalized answer is small, and that is what certifies an eigenvector. The method is unreliable for a different reason — a small gap g — as the warning after Theorem 24.4.3 says.

  • (e) Power method: one matrix–vector product, 2n2 flops. Inverse iteration: one factorization of A−μI by elimination with pivoting, 23n3, computed once, then 2n2 per step. Rayleigh quotient iteration: a new factorization every step, 23n3 per step — paid for by the cubic rate, which needs only three or four steps.

B. Practice

Exercise (B1: A rate, read off the spectrum)

Let A=(4123).

  • (a) Find the eigenvalues and eigenvectors of A, and the rate ρ of the power method.
  • (b) Starting from x(0)=e1, compute Ake1 in closed form and verify that the direction converges at rate ρk.
  • (c) How many steps are needed to gain six decimal digits?

Solution.

  • (a) trA=7 and detA=10, so the eigenvalues are 5 and 2. For λ=5: (A−5I)v=0 reads −v1+v2=0, giving v1=(1,1). For λ=2: 2v1+v2=0, giving v2=(1,−2). Hence ρ=25.

  • (b) e1=23(1,1)+13(1,−2), as one checks by adding. So Ake1=235k(1,1)+132k(1,−2). Dividing by 235k gives (1,1)+12(25)k(1,−2), so the distance from the direction (1,1) is a constant times (25)k=ρk, as Theorem 24.4.1 says.

  • (c) Each step multiplies the error by ρ=0.4, that is by 10−log10⁡(2.5)=10−0.398. Six digits need 6/0.398=15.1 steps, so sixteen (and indeed ρ15=1.1⋅10−6, ρ16=4.3⋅10−7).

Exercise (B2: Choosing a shift)

Let A=diag(10,3,1).

  • (a) What is the rate of the plain power method?
  • (b) Find the rate of inverse iteration with shift μ=0, and say which eigenvector it finds.
  • (c) Find the rate of inverse iteration with shift μ=52, and say which eigenvector it finds.
  • (d) Which shift would you choose to compute the middle eigenvalue as fast as possible, and what rate does it give? Explain why no shift gives a rate of 0.

Solution.

  • (a) By Theorem 24.4.1, ρ=|3/10|=0.3, and the iterates converge to e1.

  • (b) With μ=0 the eigenvalue nearest 0 is 1, at distance 1; the next nearest is 3, at distance 3. So ρμ=13, and the method finds e3. (Inverse iteration with shift 0 is the power method on A−1.)

  • (c) Distances from 52 are 7.5, 0.5, 1.5. The nearest eigenvalue is 3, the next nearest 1, so ρμ=0.5/1.5=13, and the method finds e2, the middle eigenvector — which the plain power method can never reach.

  • (d) Take μ=3+δ with 0<δ<1: the distances are 7−δ, δ, 2+δ, so ρμ=δ/(2+δ)→0 as δ→0. Any μ very close to 3 is excellent. No shift gives rate exactly 0, because μ=3 is an eigenvalue and Definition 24.4.2 then does not apply: A−3I is singular and there is nothing to solve with. The limiting case is not a fast method but no method — which is why Rayleigh quotient iteration, which walks the shift towards the eigenvalue, stops the moment it arrives.

Exercise (B3: Deflating a symmetric matrix)

Let A=(2112).

  • (a) Write down A′=A−3q1q1⊤ for the unit eigenvector q1 of the eigenvalue 3, and verify its eigenvalues directly.
  • (b) What does the power method of Theorem 24.4.1, applied to A′ from x(0)=e1, produce, and at what rate?
  • (c) Explain why the answer to (b) makes deflation look better than it is.

Solution.

  • (a) q1=12(1,1) and q1q1⊤=12(1111), so A′=(2112)−32(1111)=12(1−1−11). Then A′(1,1)=0 and A′(1,−1)=(1,−1): the eigenvalues are 0 and 1, as predicted, with the same eigenvectors.

  • (b) A′e1=12(1,−1), which is already an eigenvector, so the power iteration of Definition 24.4.1 gives x(1)=12(1,−1) and every later iterate equals it: it converges in one step, with μ1=1 exactly.

  • (c) Because the deflation was exact. The eigenvector q1=12(1,1) was known in closed form, so A′ had the eigenvalue 0 exactly and the remaining eigenvector survived untouched. In a computation q1 is known only to within the accuracy of the first run, and by the warning after the deflation formula the error in q1 enters A′ as a perturbation of size about |λ1|η, which every later eigenpair inherits. One clean step here is not evidence about n−1 dirty ones.

C. Going deeper

Exercise (C1: What the squaring really needs)

Let A∈Mn(F) be Hermitian with orthonormal eigenbasis q1,…,qn, and let x be a unit vector with s=‖x−q1q1∗x‖.

  • (a) Prove that |RA(x)−λ1|≤s2maxi≠1|λi−λ1|.
  • (b) Show by example that the corresponding statement for a non-Hermitian A is false: exhibit A∈M2(C), an eigenvalue λ1 with unit eigenvector q1, and unit vectors x with s→0 for which |x∗Ax−λ1| is not O(s2).
  • (c) Hence say which hypothesis of Theorem 24.4.4 the example violates, and which step of the proof breaks.

Solution.

  • (a) This is Step 1 of the proof of Theorem 24.4.4 with j=1. Expanding x=∑iciqi with ∑i|ci|2=1, we get s2=∑i≠1|ci|2 and, by Theorem 11.2.1 (b), RA(x)=∑i|ci|2λi. Since the weights sum to 1, RA(x)−λ1=∑i≠1|ci|2(λi−λ1), whose modulus is at most s2maxi≠1|λi−λ1|.

  • (b) Take A=(0100), the standard nondiagonalizable example, with λ1=0 and q1=e1. Let x=(1−s2,s) for small s>0, a unit vector whose part orthogonal to e1 has length exactly s. Then x∗Ax=x1―x2=s1−s2, which is s+O(s3): first order in s, not second. So no bound of the form Cs2 can hold as s→0.

  • (c) The example violates the hypothesis that A be Hermitian. The step that breaks is Step 1: for a Hermitian A the quantity x∗Ax is the weighted average ∑i|ci|2λi of the eigenvalues, in which only the squared moduli of the coefficients appear and the first-order term is therefore absent. For a general A the cross terms ci―ckqi∗Aqk with i≠k survive, and they are of first order in the small coefficients. With Step 1 weakened to O(s), Step 3 multiplies s by O(s) and the rate is quadratic, not cubic — which is the remark after Theorem 24.4.4.

Exercise (C2: Two eigenvalues of equal modulus, over the reals)

Let A∈M2(R) be the rotation matrix (0−110).

  • (a) Find the eigenvalues of A and explain why Theorem 24.4.1 does not apply.
  • (b) Describe the power iteration from an arbitrary unit x(0)∈R2, and show that no line is a limit.
  • (c) Now take the shift μ=12 and run inverse iteration over C. Does the theorem apply? Compute ρμ. Hint: the eigenvalues of A are ±i.
  • (d) Deduce a one-sentence moral about which of the two failures of Example (The method that never converges) a shift can repair.

Solution.

  • (a) pA(x)=x2+1, so the eigenvalues are i and −i, both of modulus 1. The hypothesis |λ1|>|λ2| fails.

  • (b) A is orthogonal, so ‖Ax‖=‖x‖ and no normalization is needed: x(k)=Akx(0). Since A2=−I, the iterates are x(0),Ax(0),−x(0),−Ax(0),x(0),…, of period 4, and the lines they span alternate between span(x(0)) and span(Ax(0)), which are distinct because A has no real eigenvector. A sequence taking two distinct values infinitely often has no limit.

  • (c) Over C the matrix is diagonalizable, with eigenvectors (1,i) and (1,−i). The shift μ=12 is not an eigenvalue, and the distances are |i−12|=|−i−12|=5/2 — equal. So there is no unique nearest eigenvalue and Theorem 24.4.3 still does not apply; ρμ=1. Any real shift fails in the same way, by symmetry in the conjugate pair; a shift such as μ=i2 does work, with distances 12 and 32 and ρμ=13.

  • (d) A shift repairs a bad rate and a wrong target, by moving the origin from which moduli are measured; it cannot repair a tie, and over R a conjugate pair of eigenvalues is a tie that no real shift can break.

Exercise (C3: A small residual certifies an eigenpair)

Let A∈Mn(C) be Hermitian with orthonormal eigenbasis q1,…,qn, let q^ be a unit vector, let μ^=RA(q^) and ε=‖Aq^−μ^q^‖. Suppose λj is the only eigenvalue of A in the interval (μ^−g,μ^+g).

  • (a) Prove that ‖q^−qjqj∗q^‖≤ε/g, assuming ε<g.
  • (b) Deduce a bound on |μ^−λj| from Theorem 20.6.2, and compare it with the bound from Theorem 20.6.1.
  • (c) In the inverse iteration of Definition 24.4.2 with a backward stable solve, ε is about 1/‖z^‖+cu‖A−μI‖. Explain what (a) then says about the computed direction, and in particular why the accuracy improves as the shift improves.

Solution.

  • (a) Expand q^=∑idiqi with ∑i|di|2=1. Then Aq^−μ^q^=∑idi(λi−μ^)qi, so by Theorem 11.2.1 (c), ε2=∑i|di|2(λi−μ^)2 ≥ ∑i≠j|di|2(λi−μ^)2 ≥ g2∑i≠j|di|2, because every λi with i≠j lies outside (μ^−g,μ^+g). Since ‖q^−qjqj∗q^‖2=∑i≠j|di|2, taking square roots gives the bound.

  • (b) Theorem 20.6.1 gives an eigenvalue within ε of μ^, and by hypothesis the only candidate in that range (once ε<g) is λj, so |μ^−λj|≤ε. Theorem 20.6.2, applied with α=μ^−g and β=μ^+g, improves this to |μ^−λj|≤ε2g, which is smaller by a factor ε/g — the quadratic gain of the Rayleigh quotient once more.

  • (c) It says that the direction of the computed z^ is within ε/g of qj, whatever the relative error in z^ itself. As the shift μ approaches λj, the matrix A−μI becomes more nearly singular, and — provided the right-hand side x(k) has a component along qj that is not small, by the bound ‖z^‖≥|qj∗x(k)|/(|λj−μ|+‖Δ‖) established in the discussion following Theorem 24.4.3 — ‖z^‖ grows like 1/|λj−μ|. So the first part of ε shrinks in proportion, and the second part is already at the rounding level. A worse-conditioned system gives a better answer, because the quantity that grows is the one in the denominator. What the bound never forgives is a small g: two nearby eigenvalues leave ε/g large no matter how good the shift is.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.