Algorithm Search⌘K

Proofs: Golub-Kahan SVD algorithm

These are the human proofs of Golub-Kahan SVD algorithm, at full length.

The Golub-Kahan step is an implicit QR step on B^T B, and the algorithm returns an SVD full

This proof shows: correctness, termination.

Notation of the page. A∈Rm×nA \in \mathbb{R}^{m \times n}, m≥nm \ge n. BB is n×nn \times n upper bidiagonal with diagonal did_i and superdiagonal eie_i. Exact arithmetic unless stated.

Lemma 1 (bidiagonalization). Line L1 produces B=UBTAVBB = U_B^T A V_B with orthogonal UBU_B (its first nn columns are kept) and VBV_B, BB upper bidiagonal, and VBe1=e1V_B e_1 = e_1.

Proof. Induction on kk. Assume rows and columns 1,…,k−11, \dots, k - 1 are in bidiagonal form. The left reflector PkP_k acts on rows k,…,mk, \dots, m and maps column kk, rows kk to mm, to a multiple of e1e_1; rows 1,…,k−11, \dots, k - 1 do not change, and columns 1,…,k−11, \dots, k - 1 are zero in rows k,…,mk, \dots, m, so they stay zero. The right reflector QkQ_k acts on columns k+1,…,nk + 1, \dots, n and maps row kk, columns k+1k + 1 to nn, to a multiple of e1e_1; columns 1,…,k1, \dots, k do not change, so column kk keeps its zeros below the diagonal. Rows 1,…,k−11, \dots, k - 1 are zero in columns k+1,…,nk + 1, \dots, n except bk−1,kb_{k-1,k}, which is in column kk and is untouched. Every QkQ_k fixes e1e_1, so VBe1=e1V_B e_1 = e_1. Products of reflectors are orthogonal. □\square

Lemma 2 (singular values are kept). For orthogonal WW, ZZ, the matrices BB and WTBZW^T B Z have the same singular values, and A=UBBVBTA = U_B B V_B^T.

Proof. If B=XΣYTB = X \Sigma Y^T is an SVD, then WTBZ=(WTX)Σ(ZTY)TW^T B Z = (W^T X) \Sigma (Z^T Y)^T is one. □\square

Lemma 3 (the step keeps bidiagonal form). Let BB be the unreduced block p..qp..q, renumbered 1..r1..r. After lines L6 to L10, Bˉ=WTBZ\bar B = W^T B Z is upper bidiagonal, where Z=G1G2⋯Gr−1Z = G_1 G_2 \cdots G_{r-1} is the product of the right rotations and WW that of the left rotations.

Proof. The claim after the right rotation GkG_k: the only entry outside the bidiagonal pattern is at (k+1,k)(k + 1, k). After the left rotation at step kk: the only one is at (k,k+2)(k, k + 2) (for k<r−1k < r - 1; none for k=r−1k = r - 1). For k=1k = 1, G1G_1 mixes columns 1 and 2. Rows 1 and 2 have entries there, and row 2 gains (2,1)=s d2≠0(2, 1) = s\, d_2 \ne 0 in general. The left rotation on rows 1 and 2 with (y,z)=(b11,b21)(y, z) = (b_{11}, b_{21}) zeros (2,1)(2, 1); row 1 gains column 3 from row 2, the entry (1,3)(1, 3). For k≥2k \ge 2, (y,z)=(bk−1,k,bk−1,k+1)(y, z) = (b_{k-1,k}, b_{k-1,k+1}) and GkG_k on columns k,k+1k, k + 1 zeros (k−1,k+1)(k - 1, k + 1). Rows kk and k+1k + 1 have entries in these columns, and (k+1,k)(k + 1, k) becomes nonzero; nothing else changes the pattern, because column k+1k + 1 has nonzeros only in rows kk and k+1k + 1. The left rotation on rows kk, k+1k + 1 then zeros (k+1,k)(k + 1, k), and row kk gains column k+2k + 2 from row k+1k + 1 when k+2≤rk + 2 \le r. At k=r−1k = r - 1 there is no column r+1r + 1, so the result is bidiagonal. □\square

Lemma 4 (first column). Ze1Z e_1 is parallel to (BTB−μI)e1(B^T B - \mu I) e_1.

Proof. T=BTBT = B^T B is symmetric tridiagonal with t11=d12t_{11} = d_1^2 and t21=d1e1t_{21} = d_1 e_1. So (T−μI)e1=(d12−μ,d1e1,0,… )T(T - \mu I) e_1 = (d_1^2 - \mu, d_1 e_1, 0, \dots)^T, which is (y,z,0,… )(y, z, 0, \dots) of line L6. The rotation G1G_1 has first column (c,s,0,… )T=(y,z,0,… )T/r(c, s, 0, \dots)^T = (y, z, 0, \dots)^T / r, and GkG_k for k≥2k \ge 2 fixes e1e_1. Hence Ze1=G1e1Z e_1 = G_1 e_1. □\square

Theorem 1 (implicit QR on BTBB^T B). Let T=BTBT = B^T B with BB unreduced and di≠0d_i \ne 0, and let T−μI=QRT - \mu I = Q R be a QR factorization with T′=QTTQT' = Q^T T Q. Then BˉTBˉ=DT′D\bar B^T \bar B = D T' D for a diagonal DD with entries ±1\pm 1, provided T′T' is unreduced.

Proof. BˉTBˉ=ZTBTWWTBZ=ZTTZ\bar B^T \bar B = Z^T B^T W W^T B Z = Z^T T Z, which is tridiagonal by Lemma 3 (the product of a lower and an upper bidiagonal matrix). TT is unreduced since ti+1,i=diei≠0t_{i+1,i} = d_i e_i \ne 0. Both ZTTZZ^T T Z and QTTQQ^T T Q are tridiagonal, and Ze1=±Qe1Z e_1 = \pm Q e_1 by Lemma 4 and the first column of T−μI=QRT - \mu I = QR. The implicit Q theorem for symmetric tridiagonal matrices (proved as Theorem 1 of the Francis double-shift QR proof, for Hessenberg matrices) gives Z=QDZ = Q D when QTTQQ^T T Q is unreduced. □\square

Lemma 5 (zero diagonal). If dk=0d_k = 0 with k<qk < q, the rotations of line L4 on rows (k+1,k),…,(q,k)(k + 1, k), \dots, (q, k) make row kk zero and keep the bidiagonal form; if dq=0d_q = 0, the rotations on columns (q−1,q),…,(p,q)(q - 1, q), \dots, (p, q) make column qq zero.

Proof. Case k<qk < q. Before rotation jj (for j=k+1,…,qj = k + 1, \dots, q), row kk has a single nonzero at column jj, starting with eke_k at j=k+1j = k + 1. The rotation of rows jj and kk with c=bjj/rc = b_{jj}/r, s=bkj/rs = b_{kj}/r zeros bkjb_{kj}, and it sets bk,j+1=−s bj,j+1b_{k,j+1} = -s\, b_{j,j+1}. Row jj keeps its pattern, because row kk has no other nonzeros. After j=qj = q, row kk is zero; the divisions are safe because r≥∣bkj∣>0r \ge |b_{kj}| > 0 when a rotation is needed. Case dq=0d_q = 0 is the transpose of this argument. In both cases eke_k or eq−1e_{q-1} becomes zero and the block splits. □\square

Theorem 2 (correctness). If the algorithm stops at line L11, it returns UU, σ\sigma and VV with A=Udiag⁡(σ)VTA = U \operatorname{diag}(\sigma) V^T, orthonormal columns and σ1≥⋯≥σn≥0\sigma_1 \ge \dots \ge \sigma_n \ge 0.

Proof. Every operation is an orthogonal transformation from the left or the right, applied to BB and accumulated into UU or VV, so A=UBVTA = U B V^T holds throughout (Lemmas 1 and 2). Line L3 goes to L11 only when every ei=0e_i = 0, and then B=diag⁡(d)B = \operatorname{diag}(d). Negating column ii of VV together with did_i keeps UBVTU B V^T. Sorting the triplets by the same permutation keeps it too. □\square

Theorem 3 (termination). The algorithm terminates.

Proof. Each sweep of line L4 makes some eie_i zero, and zeros are never undone, so there are at most n−1n - 1 such sweeps. Golub-Kahan steps are bounded by the cap of 40n40n in the implementation, after which it stops with an error. □\square

Convergence (statements). By Theorem 1, the steps on a block are symmetric tridiagonal QR steps on BTBB^T B. The shift μ\mu is the Wilkinson shift of BTBB^T B. For the Wilkinson-shifted symmetric tridiagonal QR algorithm, tr,r−1→0t_{r,r-1} \to 0 for every starting matrix, and the convergence is at least quadratic and generically cubic (Wilkinson 1968; Parlett, The Symmetric Eigenvalue Problem, Chapter 8). Since tr,r−1=dr−1er−1t_{r,r-1} = d_{r-1} e_{r-1}, with dr−1d_{r-1} bounded away from zero, er−1e_{r-1} converges at the same rate. The count of about two steps per singular value is observed, not proved.

Floating point (statement). Each rotation and reflector is applied backward stably. The computed B^\hat B and accumulated U^\hat U, V^\hat V satisfy U^0T(A+E)V^0=B^\hat U_0^T (A + E) \hat V_0 = \hat B for exactly orthogonal U^0\hat U_0, V^0\hat V_0 within c(m,n)uc(m, n) u of the computed ones, and ∥E∥2≤c(m,n) u ∥A∥2\|E\|_2 \le c(m, n)\, u\, \|A\|_2. Setting a negligible eie_i or dkd_k to zero is a perturbation of the same size. Weyl's inequality for singular values, ∣σi(A+E)−σi(A)∣≤∥E∥2|\sigma_i(A + E) - \sigma_i(A)| \le \|E\|_2, then bounds the error in every computed singular value by c(m,n) u σ1c(m, n)\, u\, \sigma_1 (GVL Section 8.6; Demmel Section 5.4).

Back to Golub-Kahan SVD algorithm