AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 21: Overview of Iterative Methods
Total Page:16
File Type:pdf, Size:1020Kb
AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 21: Overview of Iterative Methods Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Numerical Analysis I 1 / 9 Direct vs. Iterative Methods Direct methods, or noniterative methods, compute the exact solution after a finite number of steps (in exact arithmetic) I Example: Gaussian elimination, QR factorization Iterative methods produce a sequence of approximations x(1); x(2);::: that hopefully converge to the true solution I Example: Jacobi, Conjugate Gradient (CG), GMRES, BiCG, etc. Caution: The boundary between direct and iterative methods is vague sometimes Why use iterative methods (instead of direct methods)? I may be faster than direct methods I produce useful intermediate results I handle sparse matrices more easily (needs only matrix-vector product) I often are easier to implement on parallel computers Question: When not to use iterative methods? Xiangmin Jiao Numerical Analysis I 2 / 9 Two Classes of Iterative Methods Stationary methods find a splitting A = M − K and iterates x(k+1) = M−1(Kx(k) + b) I Examples: Jacobi (for linear systems, not the Jacobi iterations for eigenvalues), Gauss-Seidel, Successive Over-Relaxation (SOR) etc. Krylov subspace methods find optimal solution in Krylov subspace fb; Ab; A2b; ··· Ak bg I Build subspace successively I Example: Conjugate Gradient (CG), Generalized Minimum Residual (GMRES), BiCG, etc. I We will focus on Krylov subspace methods Xiangmin Jiao Numerical Analysis I 3 / 9 Krylov Subspace Methods Given A and b, Krylov subspace fb; Ab; A2b;:::; Ak−1bg linear systems eigenvalue problems Hermitian CG Lanczos Nonhermitian GMRES, BiCG, etc. Arnoldi Xiangmin Jiao Numerical Analysis I 4 / 9 Arnoldi Iteration The Arnoldi iteration reduces a general, nonsymmetric matrix A to Hessenberg form by similarity transformation A = QHQ∗ Analogous to Gram-Schmidt-style iteration instead of Householder reflections Let Qn = [q1 j q2 j · j qn] be m × n matrix with first n columns of Q and H~ n be (n + 1) × n upper-left section of H Consider first n columns of AQ = QH, or AQn = Qn+1H~ n 2 3 2 3 2 3 2 h ··· h 3 11 1n h 6 7 6 7 6 7 6 21 7 6 7 6 7 6 7 6 . 7 6 A 7 6 q ··· q 7 = 6 q ··· q 7 6 . 7 6 7 6 1 n 7 6 1 n+1 7 6 . 7 4 5 4 5 4 5 6 7 4 5 hn+1;n Xiangmin Jiao Numerical Analysis I 5 / 9 Arnoldi Algorithm ~ Start by picking a random q1 and then determine q2 and H1 The nth columns of AQn = Qn+1H~ n can be written as Aqn = h1nq1 + ··· + hnnqn + hn+1;nqn+1 Algorithm: Arnoldi Iteration given random nonzero b, let q1 = b=kbk for n = 1 to 1; 2; 3;::: v = Aqn for j = 1 to n ∗ hjn = qj v v = v − hjnqj hn+1;n = kvk qn+1 = v=hn+1;n Question: What if q1 happens to be an eigenvector? Xiangmin Jiao Numerical Analysis I 6 / 9 QR Factorization of Krylov Matrix The vector qj from Arnoldi are orthonormal bases of successive Krylov subspaces n−1 m Kn = b; Ab;:::; A b = hq1; q2;:::; qni ⊆ C Qn is reduced QR factorization K n = QnRn of Krylov matrix 2 3 6 7 6 n−1 7 K n = 6 b Ab ··· A b 7 6 7 4 5 The projection of A onto this space gives n × n Hessenberg matrix ∗ ~ Hn = QnAQn = H1:n;1:n Eigenvalues of Hn (known as Ritz values) produce good approximations of those of A Xiangmin Jiao Numerical Analysis I 7 / 9 Lanczos Iteration for Symmetric Matrices For symmetric A, H~ n and Hn are tridiagonal, denoted by T~ n and T n, respectively. AQn = Qn+1H~ n can be written as three-term recurrence Aqn = βn−1qn−1 + αnqn + βnqn+1 where αi are diagonal entries and βi are sub-diagonal entries of T~ n Algorithm: Lanczos Iteration β0 = 0, q0 = 0 given random b, let q1 = b=kbk for n = 1 to 1; 2; 3;::: v = Aqn αn = qnv v = v − βn−1qn−1 − αnqn βn = kvk qn+1 = v/βn Eigenvalues of T n (known as Ritz values) converge to eigenvalues of A, and extreme eigenvalues converge faster Xiangmin Jiao Numerical Analysis I 8 / 9 Properties of Arnoldi and Lanczos Iterations Eigenvalues of Hn (or T n in Lanczos iterations) are called Ritz values. When m = n, Ritz values are eigenvalues. Even for n m, Ritz values are often accurate approximations to eigenvalues of A! For symmetric matrices with evenly spaced eigenvalues, Ritz values tend to first convert to extreme eigenvalue. With rounding errors, Lanczos iteration can suffer from loss of orthogonality and can in turn lead to spurious “ghost” eigenvalues. Xiangmin Jiao Numerical Analysis I 9 / 9.