Algorithm Search⌘K

Proofs: Divide-and-conquer eigensolver

These are the human proofs of Divide-and-conquer eigensolver, at full length.

Tearing, deflation, the secular equation and Loewner's formula give the eigendecomposition full

This proof shows: correctness, termination.

Notation of the page. TT is symmetric tridiagonal, T=diag⁡(T1,T2)+ρvvTT = \operatorname{diag}(T_1, T_2) + \rho v v^T with v=em+em+1v = e_m + e_{m+1}, and Ti=QiDiQiTT_i = Q_i D_i Q_i^T. Exact arithmetic unless stated.

Lemma 1 (tearing). T=diag⁡(T1,T2)+ρvvTT = \operatorname{diag}(T_1, T_2) + \rho v v^T and T=Q(D+ρzzT)QTT = Q (D + \rho z z^T) Q^T with Q=diag⁡(Q1,Q2)Q = \operatorname{diag}(Q_1, Q_2) and z=QTvz = Q^T v.

Proof. ρvvT\rho v v^T has ρ\rho in positions (m,m)(m, m), (m,m+1)(m, m+1), (m+1,m)(m+1, m) and (m+1,m+1)(m+1, m+1). Adding it to diag⁡(T1,T2)\operatorname{diag}(T_1, T_2) restores ama_m and am+1a_{m+1} and puts bm=ρb_m = \rho in the two off-diagonal positions. Then QTTQ=D+ρ(QTv)(QTv)TQ^T T Q = D + \rho (Q^T v)(Q^T v)^T. z=QTvz = Q^T v is Q1TemQ_1^T e_m stacked on Q2Te1Q_2^T e_1: the last row of Q1Q_1 and the first row of Q2Q_2. □\square

Lemma 2 (deflation). (a) If zi=0z_i = 0, then (D+ρzzT)ei=diei(D + \rho z z^T) e_i = d_i e_i. (b) If di=djd_i = d_j with i≠ji \ne j, let GG be the rotation in the (i,j)(i, j) plane with (Gz)j=0(G z)_j = 0. Then GDGT=DG D G^T = D, so G(D+ρzzT)GT=D+ρz^z^TG (D + \rho z z^T) G^T = D + \rho \hat z \hat z^T with z^j=0\hat z_j = 0, and (a) applies. (c) In the inexact case of line L5, the dropped quantities are ρzi\rho z_i or cs(di−dj)c s (d_i - d_j), each at most the tolerance τ=8umax⁡(max⁡∣d∣,ρ)\tau = 8u \max(\max |d|, \rho).

Proof. (a) (D+ρzzT)ei=diei+ρzzi=diei(D + \rho z z^T) e_i = d_i e_i + \rho z z_i = d_i e_i. (b) In the (i,j)(i, j) plane DD is diId_i I, which commutes with GG. (c) For a small ziz_i, replacing ziz_i by 0 changes the matrix by ρ(zzT−z′z′T)\rho (z z^T - z' z'^T), whose norm is at most 2ρ∣zi∣∥z∥≤2τ2 \rho |z_i| \|z\| \le 2\tau for ∥z∥=1\|z\| = 1. For a rotation with di≠djd_i \ne d_j, GDGTG D G^T differs from a diagonal matrix only by the off-diagonal entry cs(dj−di)c s (d_j - d_i) in positions (i,j)(i, j) and (j,i)(j, i); dropping it is a symmetric perturbation of norm at most τ\tau. □\square

Lemma 3 (secular equation). Let d1<⋯<dKd_1 < \dots < d_K, every zj≠0z_j \ne 0, and ρ≠0\rho \ne 0. Then (a) no djd_j is an eigenvalue of M=D+ρzzTM = D + \rho z z^T; (b) λ\lambda is an eigenvalue of MM exactly when f(λ)=1+ρ∑jzj2/(dj−λ)=0f(\lambda) = 1 + \rho \sum_j z_j^2 / (d_j - \lambda) = 0, with eigenvector (D−λI)−1z(D - \lambda I)^{-1} z; (c) for ρ>0\rho > 0, ff has exactly one root in each interval (di,di+1)(d_i, d_{i+1}) and one in (dK,dK+ρ∥z∥22](d_K, d_K + \rho \|z\|_2^2].

Proof. (a) If Mx=djxM x = d_j x, row jj gives ρzj(zTx)=0\rho z_j (z^T x) = 0, so zTx=0z^T x = 0, and then (D−djI)x=0(D - d_j I) x = 0 forces xx to be a multiple of eje_j; but zTej=zj≠0z^T e_j = z_j \ne 0, a contradiction. (b) For λ\lambda not a pole, Mx=λxM x = \lambda x means (D−λI)x=−ρz(zTx)(D - \lambda I) x = -\rho z (z^T x). If zTx=0z^T x = 0, then x=0x = 0; otherwise xx is a multiple of (D−λI)−1z(D - \lambda I)^{-1} z, and taking the inner product with zz gives zTx=−ρ(zTx)∑jzj2/(dj−λ)z^T x = -\rho (z^T x) \sum_j z_j^2 / (d_j - \lambda), which is f(λ)=0f(\lambda) = 0. Conversely, a root gives an eigenvector this way. (c) f′(λ)=ρ∑jzj2/(dj−λ)2>0f'(\lambda) = \rho \sum_j z_j^2 / (d_j - \lambda)^2 > 0, so ff increases on each interval between poles. On (di,di+1)(d_i, d_{i+1}) it goes from −∞-\infty to +∞+\infty, so it has exactly one root there. On (dK,∞)(d_K, \infty) it goes from −∞-\infty to 1. At λ=dK+ρ∥z∥2\lambda = d_K + \rho \|z\|^2 each term ρzj2/(dj−λ)\rho z_j^2 / (d_j - \lambda) is at least −zj2/∥z∥2-z_j^2 / \|z\|^2, so f(λ)≥0f(\lambda) \ge 0. That gives KK roots for KK eigenvalues. □\square

The case ρ<0\rho < 0 reduces to ρ>0\rho > 0 by D+ρzzT=−((−D)+∣ρ∣zzT)D + \rho z z^T = -((-D) + |\rho| z z^T), which is what the implementation does.

Lemma 4 (Loewner's formula). Let d1<⋯<dKd_1 < \dots < d_K, ρ>0\rho > 0, and let λ1,…,λK\lambda_1, \dots, \lambda_K satisfy di<λi<di+1d_i < \lambda_i < d_{i+1} for i<Ki < K and dK<λKd_K < \lambda_K. Then

z^j2=∏i(λi−dj)ρ∏i≠j(di−dj)\hat z_j^2 = \frac{\prod_{i} (\lambda_i - d_j)}{\rho \prod_{i \ne j} (d_i - d_j)}

is positive, and D+ρz^z^TD + \rho \hat z \hat z^T has the eigenvalues λ1,…,λK\lambda_1, \dots, \lambda_K.

Proof. Signs: λi−dj<0\lambda_i - d_j < 0 for i<ji < j and >0> 0 for i≥ji \ge j, so the numerator has sign (−1)j−1(-1)^{j-1}. In the denominator, di−dj<0d_i - d_j < 0 for i<ji < j, also j−1j - 1 factors, so z^j2>0\hat z_j^2 > 0. For any z^\hat z, det⁡(D+ρz^z^T−λI)=∏i(di−λ)⋅f^(λ)\det(D + \rho \hat z \hat z^T - \lambda I) = \prod_i (d_i - \lambda) \cdot \hat f(\lambda) by the matrix determinant lemma, where f^\hat f is the secular function of z^\hat z. So the characteristic polynomial is p(λ)=∏i(di−λ)+ρ∑jz^j2∏i≠j(di−λ)p(\lambda) = \prod_i (d_i - \lambda) + \rho \sum_j \hat z_j^2 \prod_{i \ne j} (d_i - \lambda). Put q(λ)=∏i(λi−λ)q(\lambda) = \prod_i (\lambda_i - \lambda), monic up to the sign (−1)K(-1)^K like pp. Both p−qp - q and the interpolation below have degree at most K−1K - 1, and at λ=dj\lambda = d_j, p(dj)=ρz^j2∏i≠j(di−dj)=∏i(λi−dj)=q(dj)p(d_j) = \rho \hat z_j^2 \prod_{i \ne j} (d_i - d_j) = \prod_i (\lambda_i - d_j) = q(d_j). So p−qp - q vanishes at KK distinct points and has degree at most K−1K - 1; hence p=qp = q. □\square

Theorem 1 (merge). In exact arithmetic, with the deflation of Lemma 2 and the exact roots of Lemma 3, lines L6 to L9 give z^=±z\hat z = \pm z componentwise and orthonormal eigenvectors, and Q[S,Idefl]Q [S, I_{\text{defl}}] is an orthogonal matrix of eigenvectors of TT.

Proof. By Lemma 3 the exact roots strictly interlace, so Lemma 4 applies, and the polynomial identity of Lemma 4 for zz itself shows zj2=z^j2z_j^2 = \hat z_j^2. The vectors si=(D−λiI)−1z^s_i = (D - \lambda_i I)^{-1} \hat z are eigenvectors of the symmetric D+ρz^z^TD + \rho \hat z \hat z^T for distinct eigenvalues, so they are orthogonal; line L8 normalizes them. The deflated unit vectors eie_i are eigenvectors and are orthogonal to the others because the reduced problem lives on the complementary coordinates. Multiplying by the orthogonal QQ of Lemma 1 (and the deflation rotations) gives eigenvectors of TT. □\square

Theorem 2 (correctness and termination). DC-EIG returns the eigenvalues of TT and an orthogonal matrix of eigenvectors; it terminates.

Proof. Induction on nn. For n=1n = 1, line L1 is correct. For n≥2n \ge 2, 1≤m<n1 \le m < n, so both halves are smaller, and the induction hypothesis gives their decompositions; Lemma 1 and Theorem 1 finish the merge. Each recursive call works on a strictly smaller matrix, so the recursion has depth ⌈log⁡2n⌉\lceil \log_2 n \rceil. Each root search runs at most 200 steps, and each step either takes a model point inside the bracket or bisects it. □\square

Floating point (statements). The computed roots satisfy ∣f(λ^i)∣≤8Ku(1+ρ∑j∣zj2/(dj−λ^i)∣)|f(\hat \lambda_i)| \le 8 K u (1 + \rho \sum_j |z_j^2 / (d_j - \hat \lambda_i)|), the stopping test, or the bracket has collapsed to rounding level. Gu and Eisenstat (1995, Section 3) show that, with the differences dj−λ^id_j - \hat \lambda_i computed relative to the nearer pole, z^\hat z from Lemma 4 is close to zz in a normwise sense, and the computed eigenvectors are orthogonal to O(Ku)O(K u) and are exact for D+ρz^z^TD + \rho \hat z \hat z^T to working accuracy. With the deflation bound of Lemma 2(c), the whole method is backward stable: T+E=Q~Λ^Q~TT + E = \tilde Q \hat \Lambda \tilde Q^T for an exactly orthogonal Q~\tilde Q with ∥Q~−Q^∥2=O(nu)\|\tilde Q - \hat Q\|_2 = O(n u) and ∥E∥2=O(nu∥T∥2)\|E\|_2 = O(n u \|T\|_2), where Q^\hat Q and Λ^\hat \Lambda are the computed factors.

Back to Divide-and-conquer eigensolver