Algorithm Search⌘K

Proofs: Francis double-shift QR step

These are the human proofs of Francis double-shift QR step, at full length.

The Francis step equals an explicit double-shift QR step and keeps Hessenberg form full

This proof shows: correctness, termination.

Notation of the page: H∈Rp×pH \in \mathbb{R}^{p \times p} is the window of the algorithm, renumbered 1,…,p1, \dots, p, upper Hessenberg and unreduced, p≥3p \ge 3. M=H2−sH+tI=(H−μ1I)(H−μ2I)M = H^2 - s H + t I = (H - \mu_1 I)(H - \mu_2 I) with s=μ1+μ2s = \mu_1 + \mu_2 and t=μ1μ2t = \mu_1 \mu_2 real. Exact arithmetic unless stated.

Lemma 1 (first column of MM). Me1=(x,y,z,0,…,0)TM e_1 = (x, y, z, 0, \dots, 0)^T with xx, yy and zz as in line L1.

Proof. He1=(h11,h21,0,… )TH e_1 = (h_{11}, h_{21}, 0, \dots)^T since HH is Hessenberg. Then H2e1=h11He1+h21He2H^2 e_1 = h_{11} H e_1 + h_{21} H e_2 and He2=(h12,h22,h32,0,… )TH e_2 = (h_{12}, h_{22}, h_{32}, 0, \dots)^T, so H2e1=(h112+h21h12, h21(h11+h22), h21h32, 0,… )TH^2 e_1 = (h_{11}^2 + h_{21} h_{12},\ h_{21} (h_{11} + h_{22}),\ h_{21} h_{32},\ 0, \dots)^T. Subtract sHe1s H e_1 and add te1t e_1. □\square

Lemma 2 (the bulge chase keeps Hessenberg form). Let P1P_1 be the reflector of line L3 at k=1k = 1, acting on coordinates 1,2,31, 2, 3, and PkP_k for k=2,…,p−2k = 2, \dots, p - 2 act on coordinates k,k+1,k+2k, k + 1, k + 2, and Pp−1P_{p-1} on p−1,pp - 1, p, chosen as in lines L3 and L6 from column k−1k - 1 of the current matrix. Then H′=ZTHZH' = Z^T H Z with Z=P1⋯Pp−1Z = P_1 \cdots P_{p-1} is upper Hessenberg.

Proof. Write H(k)H^{(k)} for the matrix after P1,…,PkP_1, \dots, P_k. Claim: for 1≤k≤p−21 \le k \le p - 2, H(k)H^{(k)} is upper Hessenberg except for the entries (k+2,k)(k + 2, k), (k+3,k)(k + 3, k) and (k+3,k+1)(k + 3, k + 1) (those that exist), the bulge. For k=1k = 1: P1HP_1 H mixes rows 1 to 3, so it is Hessenberg except that row 3 may be nonzero in column 1. Then (P1H)P1(P_1 H) P_1 mixes columns 1 to 3; rows 1 to 4 can be nonzero there, since h43≠0h_{43} \ne 0 enters columns 1 and 2. So the nonzeros below the subdiagonal are at (3,1)(3, 1), (4,1)(4, 1) and (4,2)(4, 2). For the step k−1→kk - 1 \to k with 2≤k≤p−22 \le k \le p - 2, line L5 takes (x,y,z)(x, y, z) from column k−1k - 1, rows kk, k+1k + 1, k+2k + 2. PkP_k maps this vector to a multiple of e1e_1 in its coordinates, so in PkH(k−1)P_k H^{(k-1)} column k−1k - 1 has zeros in rows k+1k + 1 and k+2k + 2; rows outside k,k+1,k+2k, k + 1, k + 2 do not change. Right multiplication by PkP_k mixes columns kk, k+1k + 1, k+2k + 2, which does not touch column k−1k - 1, and it creates nonzeros in rows up to k+3k + 3, because hk+3,k+2≠0h_{k+3,k+2} \ne 0. So the bulge is now at (k+2,k)(k + 2, k), (k+3,k)(k + 3, k) and (k+3,k+1)(k + 3, k + 1). At k=p−2k = p - 2 there is no row p+1p + 1, so the bulge is only the entry (p,p−2)(p, p - 2). Finally Pp−1P_{p-1} from line L6 zeros (p,p−2)(p, p - 2) using rows p−1p - 1 and pp, and right multiplication mixes columns p−1p - 1 and pp, which keeps the Hessenberg form. □\square

Lemma 3 (Ze1Z e_1 is parallel to Me1M e_1). Ze1=P1e1=±Me1/∥Me1∥2Z e_1 = P_1 e_1 = \pm M e_1 / \|M e_1\|_2.

Proof. For k≥2k \ge 2, PkP_k acts on coordinates kk and higher, so Pke1=e1P_k e_1 = e_1. Hence Ze1=P1P2⋯Pp−1e1=P1e1Z e_1 = P_1 P_2 \cdots P_{p-1} e_1 = P_1 e_1. A Householder reflector is symmetric and orthogonal, so P1w=αe1P_1 w = \alpha e_1 with w=Me1w = M e_1 and ∣α∣=∥w∥2|\alpha| = \|w\|_2 gives P1e1=w/αP_1 e_1 = w / \alpha. By Lemma 1, Me1M e_1 has nonzeros only in the first three positions, so the reflector of order 3 suffices. Me1≠0M e_1 \ne 0 because z=h21h32≠0z = h_{21} h_{32} \ne 0 in an unreduced HH. □\square

Theorem 1 (implicit Q theorem). Let ZZ and WW be orthogonal with Ze1=We1Z e_1 = W e_1, and suppose G=ZTHZG = Z^T H Z and F=WTHWF = W^T H W are upper Hessenberg and FF is unreduced. Then Zej=±WejZ e_j = \pm W e_j for all jj, and ∣gij∣=∣fij∣|g_{ij}| = |f_{ij}|.

Proof. Let V=WTZV = W^T Z, orthogonal with Ve1=e1V e_1 = e_1, and FV=WTHZ=VGF V = W^T H Z = V G. Compare column jj: Fvj=∑i≤j+1gijviF v_j = \sum_{i \le j + 1} g_{ij} v_i, so gj+1,jvj+1=Fvj−∑i≤jgijvig_{j+1,j} v_{j+1} = F v_j - \sum_{i \le j} g_{ij} v_i. By induction, v1,…,vj∈span⁡(e1,…,ej)v_1, \dots, v_j \in \operatorname{span}(e_1, \dots, e_j), and since FF is Hessenberg, Fvj∈span⁡(e1,…,ej+1)F v_j \in \operatorname{span}(e_1, \dots, e_{j+1}), so gj+1,jvj+1∈span⁡(e1,…,ej+1)g_{j+1,j} v_{j+1} \in \operatorname{span}(e_1, \dots, e_{j+1}). Also vj+1⊥v1,…,vjv_{j+1} \perp v_1, \dots, v_j, which span span⁡(e1,…,ej)\operatorname{span}(e_1, \dots, e_j), so gj+1,jvj+1g_{j+1,j} v_{j+1} is a multiple of ej+1e_{j+1}. It is nonzero: its ej+1e_{j+1} component is ej+1TFvj=fj+1,j(ejTvj)e_{j+1}^T F v_j = f_{j+1,j} (e_j^T v_j), and ejTvj=±1e_j^T v_j = \pm 1 by induction, while fj+1,j≠0f_{j+1,j} \ne 0. Hence vj+1=±ej+1v_{j+1} = \pm e_{j+1} and V=DV = D is diagonal with entries ±1\pm 1. Then G=DFDG = D F D. □\square

Theorem 2 (the step is the explicit double step). Let M=WRM = W R be a QR factorization. Then WTHWW^T H W is upper Hessenberg, We1=±Me1/∥Me1∥2W e_1 = \pm M e_1 / \|M e_1\|_2, and if WTHWW^T H W is unreduced, the Francis step gives ZTHZ=D(WTHW)DZ^T H Z = D (W^T H W) D with D=diag⁡(±1)D = \operatorname{diag}(\pm 1).

Proof. We1=Me1/r11W e_1 = M e_1 / r_{11} from the first column of M=WRM = WR. MM commutes with HH, so WTHW=WTHMR−1=WTMHR−1=RHR−1W^T H W = W^T H M R^{-1} = W^T M H R^{-1} = R H R^{-1} when MM is nonsingular; a triangular times Hessenberg times triangular matrix is Hessenberg. (If MM is singular, that is, a shift is an eigenvalue, the same holds by a limit argument or by the direct construction in GVL Section 7.5.) By Lemmas 2 and 3, ZZ has the same first column up to sign and ZTHZZ^T H Z is Hessenberg. Theorem 1 gives the claim. □\square

Theorem 3 (equal to two single steps). For complex shifts, let H−μ1I=W1R1H - \mu_1 I = W_1 R_1, H1=W1∗HW1H_1 = W_1^* H W_1, H1−μ2I=W2R2H_1 - \mu_2 I = W_2 R_2, H2=W2∗H1W2H_2 = W_2^* H_1 W_2. Then (W1W2)(R2R1)=M(W_1 W_2)(R_2 R_1) = M, so H2H_2 is the explicit double step with W=W1W2W = W_1 W_2 up to a unitary diagonal factor.

Proof. W1W2R2R1=W1(H1−μ2I)R1=(H−μ2I)W1R1=(H−μ2I)(H−μ1I)=MW_1 W_2 R_2 R_1 = W_1 (H_1 - \mu_2 I) R_1 = (H - \mu_2 I) W_1 R_1 = (H - \mu_2 I)(H - \mu_1 I) = M, using W1H1=HW1W_1 H_1 = H W_1. QR factorizations are unique up to a unitary diagonal factor when MM is nonsingular. □\square

Theorem 4 (deflation and termination). Setting hl,l−1=0h_{l,l-1} = 0 in line L8 is an exact similarity of H+EH + E with ∥E∥2≤u(∣hl−1,l−1∣+∣hll∣)≤2u∥H∥2\|E\|_2 \le u (|h_{l-1,l-1}| + |h_{ll}|) \le 2u \|H\|_2. The algorithm terminates.

Proof. The change is one entry of the stated size. For termination: each Francis step is a finite sequence of operations. Line L9 removes one or two rows from the active part each time it applies, and it applies at least once every 30 steps, or the implementation stops with an error. The number of rows is nn, so at most 30n30n steps run. □\square

Convergence (statements). Theorem 3 makes each Francis step two shifted QR steps, so the convergence theory of the shifted QR algorithm applies: the QR iteration is subspace iteration with MM on nested subspaces, and inverse subspace iteration on the trailing ones. When the shifts are the eigenvalues of the trailing 2×22 \times 2 block and that block converges to one with simple eigenvalues distinct from the rest of the spectrum, hp−1,p−2h_{p-1,p-2} converges to zero quadratically (Watkins and Elsner 1991; GVL Section 7.5). Global convergence is not proved. The cyclic permutation matrix is a fixed point up to signs of the step with the shifts 0,00, 0, which is why line L10 uses exceptional shifts.

Floating point (statement). Each reflector is applied backward stably, and Hessenberg structure is enforced by setting entries known to be zero to zero. Wilkinson's analysis of sequences of Householder similarities gives T^=Q^T(A+E)Q^\hat T = \hat Q^T (A + E) \hat Q with Q^\hat Q exactly orthogonal, ∥E∥2≤c(n) u ∥A∥2\|E\|_2 \le c(n)\, u\, \|A\|_2 for a modest c(n)c(n), and a computed QQ within c(n)uc(n) u of Q^\hat Q (GVL Section 7.5; Wilkinson 1965, Chapter 8).

Back to Francis double-shift QR step