Algorithm Search⌘K

Proofs: Bisection for tridiagonal eigenvalues

These are the human proofs of Bisection for tridiagonal eigenvalues, at full length.

Sturm counts are exact for a nearby matrix, and bisection keeps the k-th eigenvalue bracketed full

This proof shows: correctness, termination.

Notation of the page: TT is real symmetric tridiagonal of order nn with diagonal a1,…,ana_1, \dots, a_n and off-diagonal b1,…,bn−1b_1, \dots, b_{n-1}; its eigenvalues in increasing order are μ1≤⋯≤μn\mu_1 \le \dots \le \mu_n (so μk=λn+1−k\mu_k = \lambda_{n+1-k} in the decreasing order of the area); c(x)=#{i:μi<x}c(x) = \#\{i : \mu_i < x\}. The pivots are d1=a1−xd_1 = a_1 - x and di=(ai−x)−bi−12/di−1d_i = (a_i - x) - b_{i-1}^2 / d_{i-1}.

Lemma 1 (pivots and minors). Let p0=1p_0 = 1 and pi(x)=det⁡(Ti−xI)p_i(x) = \det(T_i - x I) for the leading i×ii \times i block TiT_i. Then pi=(ai−x)pi−1−bi−12pi−2p_i = (a_i - x) p_{i-1} - b_{i-1}^2 p_{i-2}, and if p1,…,pi−1≠0p_1, \dots, p_{i-1} \ne 0, then di=pi/pi−1d_i = p_i / p_{i-1}.

Proof. Expanding det⁡(Ti−xI)\det(T_i - xI) along the last row gives the recurrence. Then pi/pi−1=(ai−x)−bi−12pi−2/pi−1=(ai−x)−bi−12/di−1p_i / p_{i-1} = (a_i - x) - b_{i-1}^2 p_{i-2}/p_{i-1} = (a_i - x) - b_{i-1}^2 / d_{i-1} by induction. □\square

Theorem 1 (the count). If all pivots d1,…,dnd_1, \dots, d_n are nonzero, then the number of negative pivots equals c(x)c(x).

Proof. When all di≠0d_i \ne 0, Gaussian elimination without pivoting gives T−xI=LDLTT - xI = L D L^T with LL unit lower bidiagonal (li+1,i=bi/dil_{i+1,i} = b_i / d_i) and D=diag⁡(d1,…,dn)D = \operatorname{diag}(d_1, \dots, d_n), which is checked entry by entry: the (i+1,i)(i+1, i) entry is li+1,idi=bil_{i+1,i} d_i = b_i and the (i+1,i+1)(i+1, i+1) entry is li+1,i2di+di+1=bi2/di+di+1=ai+1−xl_{i+1,i}^2 d_i + d_{i+1} = b_i^2/d_i + d_{i+1} = a_{i+1} - x. By Sylvester's law of inertia, T−xIT - xI and DD have the same number of negative eigenvalues. The eigenvalues of T−xIT - xI are μi−x\mu_i - x, so that number is c(x)c(x). □\square

If xx is not an eigenvalue of any leading block, all pivots are nonzero. The implementation replaces a pivot with ∣di∣<πmin⁡|d_i| < \pi_{\min} by −πmin⁡-\pi_{\min}, where πmin⁡=SAFMIN⋅max⁡(1,max⁡ibi2)\pi_{\min} = \text{SAFMIN} \cdot \max(1, \max_i b_i^2). In exact arithmetic this is the count for xx replaced by a point within a distance of order πmin⁡\pi_{\min}, and it keeps bi2/dib_i^2 / d_i finite: bi2/πmin⁡≤1/SAFMINb_i^2 / \pi_{\min} \le 1 / \text{SAFMIN} does not overflow.

Theorem 2 (floating point, Kahan 1966). In IEEE arithmetic, the computed count at xx is the exact count c~(x)\tilde c(x) of a matrix T~\tilde T with the same diagonal and off-diagonal entries b~i=bi(1+ηi)\tilde b_i = b_i (1 + \eta_i), ∣ηi∣≤2.5u+O(u2)|\eta_i| \le 2.5 u + O(u^2), up to the replacement of tiny pivots described above.

Proof. Write ϵj\epsilon_j for rounding errors with ∣ϵj∣≤u|\epsilon_j| \le u. Step ii computes t=(ai−x)(1+ϵ1)t = (a_i - x)(1 + \epsilon_1), s=bi−12(1+ϵ2)s = b_{i-1}^2 (1 + \epsilon_2), q=(s/d^i−1)(1+ϵ3)q = (s / \hat d_{i-1})(1 + \epsilon_3) and d^i=(t−q)(1+ϵ4)\hat d_i = (t - q)(1 + \epsilon_4). Define the scaled pivots di′=d^i/((1+ϵ1)(1+ϵ4))d'_i = \hat d_i / ((1 + \epsilon_1)(1 + \epsilon_4)), which have the signs of d^i\hat d_i. Then d^i−1=di−1′(1+ϵ1′)(1+ϵ4′)\hat d_{i-1} = d'_{i-1} (1 + \epsilon'_1)(1 + \epsilon'_4) with the errors of step i−1i - 1, and

di′=(ai−x)−bi−12(1+ϵ2)(1+ϵ3)(1+ϵ1)(1+ϵ1′)(1+ϵ4′)⋅1di−1′.d'_i = (a_i - x) - \frac{b_{i-1}^2 (1 + \epsilon_2)(1 + \epsilon_3)}{(1 + \epsilon_1)(1 + \epsilon'_1)(1 + \epsilon'_4)} \cdot \frac{1}{d'_{i-1}}.

So the di′d'_i are the exact pivots of the matrix with the same diagonal and b~i−12=bi−12⋅(1+ϵ2)(1+ϵ3)/((1+ϵ1)(1+ϵ1′)(1+ϵ4′))\tilde b_{i-1}^2 = b_{i-1}^2 \cdot (1 + \epsilon_2)(1 + \epsilon_3) / ((1 + \epsilon_1)(1 + \epsilon'_1)(1 + \epsilon'_4)). This is five factors of the form 1+O(u)1 + O(u), so b~i−1=bi−1(1+ηi−1)\tilde b_{i-1} = b_{i-1}(1 + \eta_{i-1}) with ∣ηi−1∣≤2.5u+O(u2)|\eta_{i-1}| \le 2.5 u + O(u^2). The computed and the exact pivots have the same signs, so the counts agree (Kahan 1966; Demmel, Section 5.3.4). □\square

By Weyl's inequality, ∣μ~k−μk∣≤∥T~−T∥2≤2⋅2.5umax⁡i∣bi∣+O(u2)|\tilde\mu_k - \mu_k| \le \|\tilde T - T\|_2 \le 2 \cdot 2.5 u \max_i |b_i| + O(u^2), an absolute error of order u∥T∥2u \|T\|_2. For classes of matrices whose eigenvalues are determined to high relative accuracy by relative changes of the bib_i (for example zero diagonal, the case of a bidiagonal SVD), the eigenvalues of T~\tilde T are relatively close to those of TT and bisection gives high relative accuracy (Demmel and Kahan 1990). In IEEE arithmetic the computed count is also a monotone function of xx (Demmel, Dhillon and Ren 1995), which the bracketing argument below uses.

Theorem 3 (bisection invariant). Let the loop start with c(ℓ)<k≤c(h)c(\ell) < k \le c(h) for ℓ<h\ell < h. If each step sets h←xh \leftarrow x when c(x)≥kc(x) \ge k and ℓ←x\ell \leftarrow x otherwise, then c(ℓ)<k≤c(h)c(\ell) < k \le c(h) holds after each step, and so μk∈[ℓ,h)\mu_k \in [\ell, h).

Proof. The update keeps the two inequalities by construction. c(ℓ)<kc(\ell) < k means fewer than kk eigenvalues lie below ℓ\ell, so μk≥ℓ\mu_k \ge \ell. c(h)≥kc(h) \ge k means at least kk eigenvalues lie below hh, so μk<h\mu_k < h. □\square

The start. By the Gershgorin theorem, every eigenvalue lies in [gℓ,gh][g_\ell, g_h] with gℓ=min⁡i(ai−∣bi−1∣−∣bi∣)g_\ell = \min_i (a_i - |b_{i-1}| - |b_i|) and gh=max⁡i(ai+∣bi−1∣+∣bi∣)g_h = \max_i (a_i + |b_{i-1}| + |b_i|). The code widens this interval by 2numax⁡(∣gℓ∣,∣gh∣)+2πmin⁡2 n u \max(|g_\ell|, |g_h|) + 2\pi_{\min}, which covers the perturbations of Theorem 2 and the pivot replacement, so that the computed counts satisfy c(ℓ)=0<k≤n=c(h)c(\ell) = 0 < k \le n = c(h).

Termination and the result. Each step halves h−ℓh - \ell, as long as the midpoint is a floating-point number strictly between ℓ\ell and hh. So after ss steps h−ℓ=2−s(h0−ℓ0)h - \ell = 2^{-s}(h_0 - \ell_0), and the loop stops after at most ⌈log⁡2((h0−ℓ0)/τ)⌉\lceil \log_2((h_0 - \ell_0)/\tau) \rceil steps for an absolute tolerance τ>0\tau > 0. With τ=0\tau = 0 it stops when the relative width reaches 2u2u or no floating-point number lies strictly between ℓ\ell and hh, which happens after at most about 21002100 steps (the exponent range plus the 53 binary digits of the significand). The returned midpoint is within (h−ℓ)/2(h - \ell)/2 of the kk-th eigenvalue of the matrix T~\tilde T of Theorem 2.

Back to Bisection for tridiagonal eigenvalues