Algorithm Search⌘K

Proofs: Householder tridiagonalization

These are the human proofs of Householder tridiagonalization, at full length.

Householder tridiagonalization returns an orthogonal similarity to tridiagonal form full

This proof shows: correctness, termination.

Exact arithmetic. Notation of the page: AA real symmetric of order nn, Pk=I−βkvkvkTP_k = I - \beta_k v_k v_k^T acting on indices k+1k + 1 to nn, A(0)=AA^{(0)} = A and A(k)A^{(k)} the full symmetric matrix whose lower triangle is stored after the kk-th pass of lines L3 to L8. The rounding error analysis, which gives the backward error ∥E∥F=O(nu)∥A∥F\|E\|_F = O(n u)\|A\|_F from the facts that a computed reflector is within O(u)O(u) of an exact one and that applying it is backward stable, is in Wilkinson (1965, Chapter 3) and GVL Section 5.1 and Section 8.3.1; we do not repeat it.

Lemma 1 (HOUSE). For x∈Rmx \in \mathbb R^m, HOUSE returns (v,β,α)(v, \beta, \alpha) with (I−βvvT)x=αe1(I - \beta v v^T) x = \alpha e_1 and I−βvvTI - \beta v v^T orthogonal and symmetric.

Proof. If ∥x2..m∥2=0\|x_{2..m}\|_2 = 0, then β=0\beta = 0, the matrix is II, and x=x1e1=αe1x = x_1 e_1 = \alpha e_1. Otherwise α=−sign⁡(x1)∥x∥2≠0\alpha = -\operatorname{sign}(x_1)\|x\|_2 \ne 0 and v=x−αe1≠0v = x - \alpha e_1 \ne 0, since its tail is the nonzero x2..mx_{2..m}. Then vTx=∥x∥2−αx1v^T x = \|x\|^2 - \alpha x_1 and vTv=∥x∥2−2αx1+α2=2(∥x∥2−αx1)v^T v = \|x\|^2 - 2\alpha x_1 + \alpha^2 = 2(\|x\|^2 - \alpha x_1), so with β=2/vTv\beta = 2 / v^T v we get βvTx=1\beta v^T x = 1 and (I−βvvT)x=x−v=αe1(I - \beta v v^T) x = x - v = \alpha e_1. The matrix I−βvvTI - \beta v v^T is symmetric, and its square is I−2βvvT+β2(vTv)vvT=II - 2\beta v v^T + \beta^2 (v^T v) v v^T = I because βvTv=2\beta v^T v = 2, so it is orthogonal. □\square

Lemma 2 (the rank-2 update). Let BB be symmetric of order mm, P=I−βvvTP = I - \beta v v^T, p=βBvp = \beta B v and w=p−(βpTv/2)vw = p - (\beta p^T v / 2) v. Then PBP=B−vwT−wvTP B P = B - v w^T - w v^T.

Proof. PBP=B−βvvTB−βBvvT+β2(vTBv)vvTP B P = B - \beta v v^T B - \beta B v v^T + \beta^2 (v^T B v) v v^T. Since BB is symmetric, βvTB=pT\beta v^T B = p^T, and β2vTBv=βpTv\beta^2 v^T B v = \beta p^T v. So PBP=B−vpT−pvT+β(pTv)vvTP B P = B - v p^T - p v^T + \beta (p^T v) v v^T. On the other hand vwT+wvT=vpT+pvT−β(pTv)vvTv w^T + w v^T = v p^T + p v^T - \beta (p^T v) v v^T. The two agree. □\square

Lemma 2 shows that the result of line L7 is symmetric, so computing its lower triangle determines it.

Lemma 3 (the invariant). For k=0,1,…,n−2k = 0, 1, \dots, n - 2, A(k)=Pk⋯P1AP1⋯PkA^{(k)} = P_k \cdots P_1 A P_1 \cdots P_k, and for every j≤kj \le k the column jj of A(k)A^{(k)} is zero in rows j+2j + 2 to nn, and the row jj is zero in columns j+2j + 2 to nn.

Proof. Induction on kk; for k=0k = 0 there is nothing to prove beyond A(0)=AA^{(0)} = A. Assume the claim for k−1k - 1 and write A(k−1)A^{(k-1)} in blocks with the index sets {1..k}\{1..k\} and {k+1..n}\{k+1..n\}:

A(k−1)=(B11B21TB21B22),P~k=(Ik00P),P=I−βkvkvkT.A^{(k-1)} = \begin{pmatrix} B_{11} & B_{21}^T \\ B_{21} & B_{22} \end{pmatrix}, \qquad \tilde P_k = \begin{pmatrix} I_k & 0 \\ 0 & P \end{pmatrix}, \qquad P = I - \beta_k v_k v_k^T.

By the hypothesis applied to the columns j≤k−1j \le k - 1, the block B21B_{21} is zero except in its last column, which is the vector xx of line L3 (column kk, rows k+1k + 1 to nn). Then

P~kA(k−1)P~k=(B11(PB21)TPB21PB22P).\tilde P_k A^{(k-1)} \tilde P_k = \begin{pmatrix} B_{11} & (P B_{21})^T \\ P B_{21} & P B_{22} P \end{pmatrix}.

PB21P B_{21} is zero except in its last column, which is Px=αe1P x = \alpha e_1 by Lemma 1: this is line L8. PB22PP B_{22} P is the result of lines L5 to L7 by Lemma 2. B11B_{11} is not touched. So the stored matrix after the kk-th pass is P~kA(k−1)P~k\tilde P_k A^{(k-1)} \tilde P_k, which with Pk=P~kP_k = \tilde P_k proves the first claim. Column kk is now zero in rows k+2k + 2 to nn; the columns j<kj < k are unchanged in rows 11 to kk and zero in rows k+1k + 1 to nn (for j≤k−1j \le k - 1, row k+1k + 1 is at least j+2j + 2). The claims on rows follow by symmetry. □\square

Lemma 4 (the accumulation). Lines L9 and L10 leave Q=P1P2⋯Pn−2Q = P_1 P_2 \cdots P_{n-2}.

Proof. Let Q(k)Q^{(k)} be the value after the pass with index kk, starting from Q(n−1)=IQ^{(n-1)} = I. We claim Q(k)=Pk⋯Pn−2Q^{(k)} = P_k \cdots P_{n-2} and that Q(k)Q^{(k)} agrees with the identity in its first kk rows and first kk columns. For k=n−1k = n - 1 this is II. Assume it for k+1k + 1. Since Q(k+1)Q^{(k+1)} is the identity in rows and columns 11 to k+1k + 1, the product PkQ(k+1)P_k Q^{(k+1)}, where PkP_k acts on rows k+1k + 1 to nn, changes only rows k+1k + 1 to nn; in those rows the columns 11 to kk of Q(k+1)Q^{(k+1)} are zero and stay zero. So PkQ(k+1)P_k Q^{(k+1)} is obtained by applying I−βkvkvkTI - \beta_k v_k v_k^T to the block Q[k+1..n,k+1..n]Q[k+1..n, k+1..n], which is line L10, and the result is the identity in rows and columns 11 to kk. □\square

Theorem 5 (correctness and termination). The algorithm terminates after n−2n - 2 passes of each loop, and returns dd, ee and an orthogonal QQ with A=QTQTA = Q T Q^T, where TT is the symmetric tridiagonal matrix with diagonal dd and off-diagonal ee, and Qe1=e1Q e_1 = e_1.

Proof. Both loops are counted, so the algorithm stops; for n≤2n \le 2 they are empty, AA is already tridiagonal and Q=IQ = I. By Lemma 3 with k=n−2k = n - 2, A(n−2)=QTAQA^{(n-2)} = Q^T A Q with Q=P1⋯Pn−2Q = P_1 \cdots P_{n-2}, since each PkP_k is symmetric. All its columns j≤n−2j \le n - 2 are zero below the subdiagonal, and columns n−1n - 1 and nn have no entries below row j+1j + 1 to check, so A(n−2)A^{(n-2)} is upper Hessenberg and symmetric, that is, tridiagonal, and it equals TT. QQ is orthogonal as a product of orthogonal matrices (Lemma 1), and by Lemma 4 it is what lines L9 and L10 return. Since no PkP_k touches index 1, Qe1=e1Q e_1 = e_1. Then A=QTQTA = Q T Q^T. ■\blacksquare

Remark (the flop count). At step kk with m=n−km = n - k, line L5 costs 2m22m^2 flops for the symmetric product, line L6 O(m)O(m), and line L7 updates m(m+1)/2m(m+1)/2 entries at 4 flops each. The total is ∑m=2n−1(4m2+O(m))=4n3/3+O(n2)\sum_{m=2}^{n-1} (4m^2 + O(m)) = 4n^3/3 + O(n^2). Line L10 costs 4m24m^2 at step kk, again 4n3/3+O(n2)4n^3/3 + O(n^2) in all.

Back to Householder tridiagonalization