Algorithm Search⌘K

Proofs: Subspace iteration

These are the human proofs of Subspace iteration, at full length.

Subspace iteration returns a small symmetric backward error and its subspace converges at the rate |λ_(p+1)/λ_p| full

This proof shows: correctness, termination.

Exact arithmetic throughout, except that Lemma 3 holds for any computed block that satisfies its hypotheses. Notation of the page: A∈Rn×nA \in \mathbb R^{n \times n} symmetric with eigenvalues ordered by modulus, ∣λ1∣≥⋯≥∣λn∣|\lambda_1| \ge \dots \ge |\lambda_n|, orthonormal eigenvectors viv_i, Vp=[v1,…,vp]V_p = [v_1, \dots, v_p], V⊥=[vp+1,…,vn]V_\perp = [v_{p+1}, \dots, v_n], Λ1=diag⁡(λ1,…,λp)\Lambda_1 = \operatorname{diag}(\lambda_1, \dots, \lambda_p), Λ2=diag⁡(λp+1,…,λn)\Lambda_2 = \operatorname{diag}(\lambda_{p+1}, \dots, \lambda_n), Vp=span⁡Vp\mathcal V_p = \operatorname{span} V_p. QkQ_{k} is the basis QQ at the start of step k+1k + 1 (so Q0Q_0 comes from line L1), and line L10 computes an exact orthonormal basis of the span of WW. For subspaces S\mathcal S, T\mathcal T of equal dimension with orthogonal projectors PSP_{\mathcal S}, PTP_{\mathcal T}, θ(S,T)\theta(\mathcal S, \mathcal T) is the largest principal angle and sin⁡θ(S,T)=∥(I−PT)PS∥2=∥(I−PS)PT∥2\sin\theta(\mathcal S, \mathcal T) = \|(I - P_{\mathcal T}) P_{\mathcal S}\|_2 = \|(I - P_{\mathcal S}) P_{\mathcal T}\|_2. Write ϱ=∣λp+1/λp∣\varrho = |\lambda_{p+1} / \lambda_p| and θk=θ(span⁡Qk,Vp)\theta_k = \theta(\operatorname{span} Q_k, \mathcal V_p).

Lemma 1 (the Rayleigh-Ritz step keeps the span). At every step, YY is orthogonal, X=QYX = QY has orthonormal columns with span⁡X=span⁡Q\operatorname{span} X = \operatorname{span} Q, and W=AXW = AX, so span⁡W=Aspan⁡Q\operatorname{span} W = A \operatorname{span} Q.

Proof. H=QTAQH = Q^T A Q is symmetric, so line L5 gives an orthogonal YY and a diagonal Θ\Theta with H=YΘYTH = Y \Theta Y^T (reordering the columns keeps YY orthogonal). Then XTX=YTQTQY=IX^T X = Y^T Q^T Q Y = I, and since YY is invertible, span⁡QY=span⁡Q\operatorname{span} QY = \operatorname{span} Q. Finally W=ZY=AQY=AXW = ZY = AQY = AX, and span⁡AX=Aspan⁡X=Aspan⁡Q\operatorname{span} AX = A \operatorname{span} X = A \operatorname{span} Q. □\square

Lemma 2 (the subspace is AkS0A^k \mathcal S_0). Let S0=span⁡X0\mathcal S_0 = \operatorname{span} X_0 have dimension pp, and suppose VpTX0V_p^T X_0 is nonsingular and λp≠0\lambda_p \ne 0. Then for every kk reached, AkX0A^k X_0 has rank pp and span⁡Qk=AkS0\operatorname{span} Q_k = A^k \mathcal S_0.

Proof. VpTAkX0=Λ1kVpTX0V_p^T A^k X_0 = \Lambda_1^k V_p^T X_0 because VpTA=Λ1VpTV_p^T A = \Lambda_1 V_p^T. Both factors are nonsingular (∣λi∣≥∣λp∣>0|\lambda_i| \ge |\lambda_p| > 0 for i≤pi \le p), so AkX0A^k X_0 has rank pp. For the span, induction on kk: span⁡Q0=S0\operatorname{span} Q_0 = \mathcal S_0 by line L1, and if span⁡Qk−1=Ak−1S0\operatorname{span} Q_{k-1} = A^{k-1} \mathcal S_0, then by Lemma 1 the matrix WW of step kk spans AkS0A^k \mathcal S_0, which has dimension pp, so line L10 returns QkQ_k with that span. □\square

Lemma 3 (backward error). Let X∈Rn×pX \in \mathbb R^{n \times p} with XTX=IX^T X = I, let Θ\Theta be diagonal, R=AX−XΘR = AX - X\Theta, and suppose XTR=0X^T R = 0. Then E=−(RXT+XRT)E = -(R X^T + X R^T) is symmetric, (A+E)X=XΘ(A + E) X = X \Theta, and ∥E∥2=∥R∥2≤pmax⁡i∥ri∥2\|E\|_2 = \|R\|_2 \le \sqrt p \max_i \|r_i\|_2. At line L8 the hypotheses hold, so on CONVERGED ∥E∥2≤p tolmax⁡j∣θj∣≤p tol ∥A∥2\|E\|_2 \le \sqrt p \, \mathrm{tol} \max_j |\theta_j| \le \sqrt p \, \mathrm{tol} \, \|A\|_2.

Proof. EE is symmetric by construction. EX=−R(XTX)−X(RTX)=−RE X = -R (X^T X) - X (R^T X) = -R, since RTX=(XTR)T=0R^T X = (X^T R)^T = 0. So (A+E)X=AX−R=XΘ(A + E) X = AX - R = X\Theta. For the norm, E2=RXTRXT+RXTXRT+XRTRXT+XRTXRT=RRT+X(RTR)XTE^2 = R X^T R X^T + R X^T X R^T + X R^T R X^T + X R^T X R^T = R R^T + X (R^T R) X^T, because XTR=0X^T R = 0 kills the first and last terms. The two terms act on the orthogonal subspaces span⁡R\operatorname{span} R and span⁡X\operatorname{span} X (they are orthogonal because XTR=0X^T R = 0), so ∥E∥22=∥E2∥2=max⁡(∥RRT∥2,∥RTR∥2)=∥R∥22\|E\|_2^2 = \|E^2\|_2 = \max(\|R R^T\|_2, \|R^T R\|_2) = \|R\|_2^2. Also ∥R∥2≤∥R∥F≤pmax⁡i∥ri∥2\|R\|_2 \le \|R\|_F \le \sqrt p \max_i \|r_i\|_2. At line L8, XTR=YTQTAQY−YTQTQYΘ=YTHY−Θ=0X^T R = Y^T Q^T A Q Y - Y^T Q^T Q Y \Theta = Y^T H Y - \Theta = 0. Each Ritz value is a Rayleigh quotient xiTAxix_i^T A x_i of a unit vector, so ∣θj∣≤∥A∥2|\theta_j| \le \|A\|_2. □\square

Lemma 4 (tangent of a graph). Let F∈R(n−p)×pF \in \mathbb R^{(n-p) \times p} and S=span⁡(Vp+V⊥F)\mathcal S = \operatorname{span} \left( V_p + V_\perp F \right). Then tan⁡θ(S,Vp)=∥F∥2\tan\theta(\mathcal S, \mathcal V_p) = \|F\|_2.

Proof. B=(Vp+V⊥F)(I+FTF)−1/2B = (V_p + V_\perp F)(I + F^T F)^{-1/2} has orthonormal columns and spans S\mathcal S. The cosines of the principal angles between S\mathcal S and Vp\mathcal V_p are the singular values of VpTB=(I+FTF)−1/2V_p^T B = (I + F^T F)^{-1/2}, namely 1/1+σi21/\sqrt{1 + \sigma_i^2} for the singular values σi\sigma_i of FF. The largest angle has cos⁡θ=1/1+σmax⁡2\cos\theta = 1/\sqrt{1 + \sigma_{\max}^2}, so tan⁡θ=σmax⁡=∥F∥2\tan\theta = \sigma_{\max} = \|F\|_2. □\square

Theorem 5 (convergence of the subspace). Suppose ∣λp∣>∣λp+1∣|\lambda_p| > |\lambda_{p+1}| and C=VpTX0C = V_p^T X_0 is nonsingular. Then for every k≥0k \ge 0 reached,

tan⁡θk≤ϱktan⁡θ0.\tan\theta_k \le \varrho^k \tan\theta_0 .

Proof. Write X0=VpC+V⊥DX_0 = V_p C + V_\perp D with D=V⊥TX0D = V_\perp^T X_0. Then S0=span⁡X0C−1=span⁡(Vp+V⊥F0)\mathcal S_0 = \operatorname{span} X_0 C^{-1} = \operatorname{span}(V_p + V_\perp F_0) with F0=DC−1F_0 = D C^{-1}, and tan⁡θ0=∥F0∥2\tan\theta_0 = \|F_0\|_2 by Lemma 4. Since AVp=VpΛ1A V_p = V_p \Lambda_1 and AV⊥=V⊥Λ2A V_\perp = V_\perp \Lambda_2, AkX0=VpΛ1kC+V⊥Λ2kDA^k X_0 = V_p \Lambda_1^k C + V_\perp \Lambda_2^k D. Multiplying on the right by the nonsingular C−1Λ1−kC^{-1} \Lambda_1^{-k} does not change the span, so by Lemma 2

span⁡Qk=AkS0=span⁡(Vp+V⊥Λ2kF0Λ1−k).\operatorname{span} Q_k = A^k \mathcal S_0 = \operatorname{span}\left(V_p + V_\perp \Lambda_2^k F_0 \Lambda_1^{-k}\right).

By Lemma 4, tan⁡θk=∥Λ2kF0Λ1−k∥2≤∥Λ2∥2k ∥F0∥2 ∥Λ1−1∥2k=∣λp+1∣k tan⁡θ0 / ∣λp∣k\tan\theta_k = \|\Lambda_2^k F_0 \Lambda_1^{-k}\|_2 \le \|\Lambda_2\|_2^k \, \|F_0\|_2 \, \|\Lambda_1^{-1}\|_2^k = |\lambda_{p+1}|^k \, \tan\theta_0 \, / \, |\lambda_p|^k. □\square

Lemma 6 (residual and size of the block). Let QQ have orthonormal columns, P=QQTP = Q Q^T, H=QTAQH = Q^T A Q, s=sin⁡θ(span⁡Q,Vp)s = \sin\theta(\operatorname{span} Q, \mathcal V_p) and c=cos⁡θ(span⁡Q,Vp)c = \cos\theta(\operatorname{span} Q, \mathcal V_p). Then ∥AQ−QH∥2≤2∥A∥2 s\|AQ - QH\|_2 \le 2 \|A\|_2 \, s and ∥H∥2≥∣λp∣ c−3∥A∥2 s\|H\|_2 \ge |\lambda_p| \, c - 3 \|A\|_2 \, s.

Proof. Let PV=VpVpTP_V = V_p V_p^T; it commutes with AA. AQ−QH=(I−P)AQ=(I−P)APVQ+(I−P)A(I−PV)QAQ - QH = (I - P) A Q = (I - P) A P_V Q + (I - P) A (I - P_V) Q. In the first term, APV=PVAPVA P_V = P_V A P_V, and ∥(I−P)PV∥2=s\|(I - P) P_V\|_2 = s by the definition of the angle, so its norm is at most ∥A∥2s\|A\|_2 s. In the second term, ∥(I−PV)Q∥2=∥(I−PV)P∥2=s\|(I - P_V) Q\|_2 = \|(I - P_V) P\|_2 = s, so its norm is at most ∥A∥2s\|A\|_2 s. This gives the first bound. For the second, ∥H∥2=∥QTAQ∥2=∥PAQ∥2≥∥AQ∥2−∥(I−P)AQ∥2≥∥AQ∥2−2∥A∥2s\|H\|_2 = \|Q^T A Q\|_2 = \|P A Q\|_2 \ge \|AQ\|_2 - \|(I - P) A Q\|_2 \ge \|AQ\|_2 - 2 \|A\|_2 s, and ∥AQ∥2≥∥APVQ∥2−∥A(I−PV)Q∥2≥∥VpΛ1VpTQ∥2−∥A∥2s\|AQ\|_2 \ge \|A P_V Q\|_2 - \|A (I - P_V) Q\|_2 \ge \|V_p \Lambda_1 V_p^T Q\|_2 - \|A\|_2 s. The smallest singular value of VpTQV_p^T Q is cc (the cosines of the principal angles are its singular values), and ∥Λ1M∥2≥∣λp∣ ∥M∥2\|\Lambda_1 M\|_2 \ge |\lambda_p| \, \|M\|_2 for any MM, so ∥VpΛ1VpTQ∥2≥∣λp∣ c\|V_p \Lambda_1 V_p^T Q\|_2 \ge |\lambda_p| \, c. □\square

Theorem 7 (correctness and termination). The algorithm returns after at most maxit\mathrm{maxit} steps. Whenever it returns CONVERGED, the output is a block of exact eigenpairs of a symmetric matrix A+EA + E with ∥E∥2≤p tol ∥A∥2\|E\|_2 \le \sqrt p \, \mathrm{tol} \, \|A\|_2. If moreover ∣λp∣>∣λp+1∣|\lambda_p| > |\lambda_{p+1}|, VpTX0V_p^T X_0 is nonsingular and tol>0\mathrm{tol} > 0, it returns CONVERGED at the first step kk with 2∥A∥2sin⁡θk−1≤tol (∣λp∣cos⁡θk−1−3∥A∥2sin⁡θk−1)2 \|A\|_2 \sin\theta_{k-1} \le \mathrm{tol} \, (|\lambda_p| \cos\theta_{k-1} - 3 \|A\|_2 \sin\theta_{k-1}) or earlier, and such a kk exists; so it returns CONVERGED whenever maxit\mathrm{maxit} is at least that kk.

Proof. The loop of line L2 runs at most maxit\mathrm{maxit} times, and line L9 returns on the last one, so the algorithm terminates. The backward error statement is Lemma 3. For the rest, at step kk the basis is Qk−1Q_{k-1}. By Lemma 1, R=(AQk−1−Qk−1H)YR = (AQ_{k-1} - Q_{k-1} H) Y, so max⁡i∥ri∥2≤∥R∥2=∥AQk−1−Qk−1H∥2≤2∥A∥2sin⁡θk−1\max_i \|r_i\|_2 \le \|R\|_2 = \|A Q_{k-1} - Q_{k-1} H\|_2 \le 2 \|A\|_2 \sin\theta_{k-1} by Lemma 6. The Ritz values are the eigenvalues of the symmetric HH, so max⁡j∣θj∣=∥H∥2≥∣λp∣cos⁡θk−1−3∥A∥2sin⁡θk−1\max_j |\theta_j| = \|H\|_2 \ge |\lambda_p| \cos\theta_{k-1} - 3 \|A\|_2 \sin\theta_{k-1}. Hence the test of line L8 holds at any step where the displayed inequality holds. By Theorem 5, sin⁡θk≤tan⁡θk≤ϱktan⁡θ0→0\sin\theta_{k} \le \tan\theta_{k} \le \varrho^{k} \tan\theta_0 \to 0 and cos⁡θk→1\cos\theta_k \to 1, while ∣λp∣>0|\lambda_p| > 0 and tol>0\mathrm{tol} > 0, so the inequality holds for all large kk. □\square

Remark (what is not proved here). The faster rates of the individual Ritz values, ∣θi(k)−λi∣=O(∣λp+1/λi∣2k)|\theta_i^{(k)} - \lambda_i| = O(|\lambda_{p+1}/\lambda_i|^{2k}), are proved in Parlett, The Symmetric Eigenvalue Problem, Chapter 14, and Saad 2011, Chapter 5; the tests measure them. The implementation's replacement of a column that loses almost all of its norm in Gram-Schmidt is a guard for rank-deficient blocks; under the hypotheses of Lemma 2 the blocks have full rank, and the proofs above assume that line L10 is an exact orthonormalization.

Back to Subspace iteration