Classical iterative methods for linear systems

Similar documents
9.1 Preconditioned Krylov Subspace Methods

Math 5630: Iterative Methods for Systems of Equations Hung Phan, UMass Lowell March 22, 2018

Lecture 18 Classical Iterative Methods

Math Introduction to Numerical Analysis - Class Notes. Fernando Guevara Vasquez. Version Date: January 17, 2012.

9. Iterative Methods for Large Linear Systems

CAAM 454/554: Stationary Iterative Methods

Math/Phys/Engr 428, Math 529/Phys 528 Numerical Methods - Summer Homework 3 Due: Tuesday, July 3, 2018

Jordan Journal of Mathematics and Statistics (JJMS) 5(3), 2012, pp A NEW ITERATIVE METHOD FOR SOLVING LINEAR SYSTEMS OF EQUATIONS

The amount of work to construct each new guess from the previous one should be a small multiple of the number of nonzeros in A.

JACOBI S ITERATION METHOD

Introduction to Iterative Solvers of Linear Systems

CLASSICAL ITERATIVE METHODS

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

Introduction to Scientific Computing

Lab 1: Iterative Methods for Solving Linear Systems

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

EXAMPLES OF CLASSICAL ITERATIVE METHODS

The Conjugate Gradient Method

6. Iterative Methods for Linear Systems. The stepwise approach to the solution...

Theory of Iterative Methods

Iterative techniques in matrix algebra

Parallel Numerics, WT 2016/ Iterative Methods for Sparse Linear Systems of Equations. page 1 of 1

Algebra C Numerical Linear Algebra Sample Exam Problems

Computational Methods. Systems of Linear Equations

Chapter 7 Iterative Techniques in Matrix Algebra

Here is an example of a block diagonal matrix with Jordan Blocks on the diagonal: J

Iterative Solution methods

Math 1080: Numerical Linear Algebra Chapter 4, Iterative Methods

Introduction. Math 1080: Numerical Linear Algebra Chapter 4, Iterative Methods. Example: First Order Richardson. Strategy

Computational Linear Algebra

Computational Economics and Finance

Iterative Methods. Splitting Methods

Lecture Note 7: Iterative methods for solving linear systems. Xiaoqun Zhang Shanghai Jiao Tong University

Numerical Methods I Non-Square and Sparse Linear Systems

Solving Linear Systems

COURSE Iterative methods for solving linear systems

SOLVING SPARSE LINEAR SYSTEMS OF EQUATIONS. Chao Yang Computational Research Division Lawrence Berkeley National Laboratory Berkeley, CA, USA

Iterative Methods for Solving A x = b

Preconditioning Techniques Analysis for CG Method

EECS 275 Matrix Computation

Math 471 (Numerical methods) Chapter 3 (second half). System of equations

Iterative Methods for Ax=b

Iterative methods for Linear System

CS 323: Numerical Analysis and Computing

4.6 Iterative Solvers for Linear Systems

Course Notes: Week 1

I = i 0,

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations

Solving Sparse Linear Systems: Iterative methods

Solving Sparse Linear Systems: Iterative methods

Scientific Computing WS 2018/2019. Lecture 9. Jürgen Fuhrmann Lecture 9 Slide 1

Boundary Value Problems - Solving 3-D Finite-Difference problems Jacob White

Stabilization and Acceleration of Algebraic Multigrid Method

Math 405: Numerical Methods for Differential Equations 2016 W1 Topics 10: Matrix Eigenvalues and the Symmetric QR Algorithm

Parallel Iterative Methods for Sparse Linear Systems. H. Martin Bücker Lehrstuhl für Hochleistungsrechnen

A Method for Constructing Diagonally Dominant Preconditioners based on Jacobi Rotations

Iterative Methods for Sparse Linear Systems

1 Number Systems and Errors 1

FEM and Sparse Linear System Solving

Solution of Linear Equations

AMS526: Numerical Analysis I (Numerical Linear Algebra)

7.3 The Jacobi and Gauss-Siedel Iterative Techniques. Problem: To solve Ax = b for A R n n. Methodology: Iteratively approximate solution x. No GEPP.

Up to this point, our main theoretical tools for finding eigenvalues without using det{a λi} = 0 have been the trace and determinant formulas

Iterative methods for Linear System of Equations. Joint Advanced Student School (JASS-2009)

AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 23: GMRES and Other Krylov Subspace Methods; Preconditioning

LINEAR SYSTEMS (11) Intensive Computation

30.5. Iterative Methods for Systems of Equations. Introduction. Prerequisites. Learning Outcomes

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method

The Solution of Linear Systems AX = B

Cache Oblivious Stencil Computations

Notes for CS542G (Iterative Solvers for Linear Systems)

Lecture 11: CMSC 878R/AMSC698R. Iterative Methods An introduction. Outline. Inverse, LU decomposition, Cholesky, SVD, etc.

DEN: Linear algebra numerical view (GEM: Gauss elimination method for reducing a full rank matrix to upper-triangular

Dense Matrices for Biofluids Applications

ITERATIVE METHODS BASED ON KRYLOV SUBSPACES

Math 108b: Notes on the Spectral Theorem

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

M.A. Botchev. September 5, 2014

Algorithms that use the Arnoldi Basis

THE EIGENVALUE PROBLEM

CME342 Parallel Methods in Numerical Analysis. Matrix Computation: Iterative Methods II. Sparse Matrix-vector Multiplication.

Jae Heon Yun and Yu Du Han

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

Chapter 7. Iterative methods for large sparse linear systems. 7.1 Sparse matrix algebra. Large sparse matrices

Scientific Computing: An Introductory Survey

Kasetsart University Workshop. Multigrid methods: An introduction

1 Last time: least-squares problems

Numerical Methods - Numerical Linear Algebra

Solving Linear Systems of Equations

Math 1314 Week #14 Notes

Lecture 9: Numerical Linear Algebra Primer (February 11st)

Iterative Methods for Smooth Objective Functions

Review of matrices. Let m, n IN. A rectangle of numbers written like A =

A NEW EFFECTIVE PRECONDITIONED METHOD FOR L-MATRICES

CHAPTER 5. Basic Iterative Methods

What is A + B? What is A B? What is AB? What is BA? What is A 2? and B = QUESTION 2. What is the reduced row echelon matrix of A =

Introduction to Applied Linear Algebra with MATLAB

Numerical Analysis Comprehensive Exam Questions

c 1995 Society for Industrial and Applied Mathematics Vol. 37, No. 1, pp , March

Transcription:

Classical iterative methods for linear systems Ed Bueler MATH 615 Numerical Analysis of Differential Equations 27 February 1 March, 2017 Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 1 / 17

example linear systems suppose we want to solve the linear system where A R m m and b R m, to find x R m. throughout these notes we use just two examples: LS1 Ax = b (1) 2 1 0 0 2 1 1 0 3 x 1 x 2 x 3 2 = 1 4 LS2 1 2 3 0 x 1 7 2 1 2 3 x 2 1 1 1 0 x 3 = 1 1 0 1 1 1 x 4 3 on P17 (Assignment #5) you will check that these are well-conditioned linear systems it is trivial to find solutions of LS1, LS2 using a x = A\b black box, but these examples stand-in for the large linear systems we get from applying FD schemes to ODE and PDE problems Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 2 / 17

residual the residual of a vector v in linear system (1) is the vector r(v) = b Av (2) making the residual zero is the same as solving the system: Ax = b r(x) = 0 evaluating r(v) needs a matrix-vector product and a vector subtraction requires O(m 2 ) operations at worst by comparison, applying Gauss elimination to solve linear system (1) is an O(m 3 ) operation in general FD schemes for DEs generate matrices A for which the majority, often 99% or more, of the entries are zero a matrix with enough zeros to allow exploitation of that fact is called sparse evaluating the residual of a sparse matrix typically requires O(m) operations even if A is sparse, A 1 is generally dense, i.e. most entries are nonzero Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 3 / 17

Richardson iteration iterative methods for linear system (1) attempt to solve it based only on operations like computing the residual, or applying A to a vector one wants the sequence of approximations, the iterates, to converge to the solution x = A 1 b Iterative methods always require an initial iterate x 0 Richardson iteration adds a multiple ω of the last residual at each step: x k+1 = x k + ω(b Ax k ) (3) for system LS1, using initial iterate x 0 = 0 and ω = 1/5, (3) gives: 0 0.4 0.6 0.728 0.998 x 0 = 0, x 1 = 0.2, x 2 = 0.16, x 3 = 0.088,..., x 10 = 0.017,... 0 0.8 1.04 1.096 1.01 these iterates seem to be converging to x = [1 0 1], which is the solution to LS1 Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 4 / 17

recall: eigenvalues and vectors a complex number λ C is an eigenvalue of a square matrix B R m m if there is a nonzero vector v C m so that Bv = λv the set of all eigenvalues of B is the spectrum σ(b) of B the spectral radius ρ(b) is the maximum absolute value of an eigenvalue: ρ(b) = max λ λ σ(b) even if B is real, λ may be complex the roots of a polynomial with real coefficients may be complex and if λ is complex and B is real then v must be complex Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 5 / 17

spectral properties and convergence of iterations properties of a matrix B described in terms of eigenvalues are generically called spectral properties some examples: ρ(b) B 2 = ρ(b B) the 2-norm condition number κ(b) = B 2 B 1 2 a general idea: whether an iterative method for solving Ax = b converges, or not, depends on spectral properties of A, or on matrices built from A the right-hand side b and the initial iterate x 0 generally do not determine whether an iteration converges a good choice of x 0 can speed up convergence Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 6 / 17

convergence of the Richardson iteration rewrite the Richardson iteration (3) as x k+1 = (I ωa)x k + ωb the lemma on the next slide shows that the Richardson iteration converges if and only if all the eigenvalues of the matrix I ωa are inside the unit circle: (3) converges if and only if ρ(i ωa) < 1 ρ(i ωa) < 1 means (I ωa)x k is smaller in magnitude than x k if I ωa < 1 then (3) converges 1 1 recall ρ(b) B in any induced matrix norm Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 7 / 17

convergence lemma Lemma y k+1 = My k + c converges to the solution of y = My + c for all initial y 0 if and only if ρ(m) < 1. Proof. Solve the iteration by writing out a few cases: y 2 = M(My 0 + c) + c = M 2 y 0 + (I + M)c, y 3 = M(M 2 y 0 + (I + M)c) + c = M 3 y 0 + (I + M + M 2 )c,. By induction we get y k = M k y 0 + p k (M)c where p k (x) = 1 + x + x 2 + + x k 1. But p k (x) 1/(1 x) as k iff x ( 1, 1). Also, ρ(m) < 1 iff M k 0. Thus y k (I M) 1 c iff ρ(m) < 1. Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 8 / 17

convergence of the Richardson iteration 2 since the Richardson iteration converges iff ρ(i ωa) < 1, we choose ω based on the principle that often not possible! ωa should be close to the identity I in small cases we can graph f (ω) = ρ(i ωa): omega = -1:.01:1; rho = zeros(size(omega)); for j = 1:length(omega) M = eye(n) - omega(j) * A; rho(j) = max(abs(eig(m))); end plot(omega,rho) for LS1: ρ(i ωa) dips below 1 for 0 < ω 0.6 rho(i - omega A) 2 1.5 1 0.5 LS1 LS2 0 for LS2: ρ(i ωa) 1 always -1-0.5 0 0.5 1 note ρ(i 0A) = 1... so no convergence when ω 0 for LS1, figure suggests ω 0.4 gives fastest convergence Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 9 / 17 omega

matrix splitting unlike Richardson, most classical iteration methods split the matrix A before iterating the best known, and simplest, iteration based on splitting is Jacobi iteration, which extracts the diagonal of A (and inverts it) the splitting we consider is A = D L U where D is the diagonal of A L is strictly lower triangular (l ij = 0 if i j) U is strictly upper triangular (u ij = 0 if i j) you can split any matrix this way see section 4.2 of the textbook so that D is an invertible matrix, for the remaining slides we assume all diagonal entries of A are nonzero: a ii 0 Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 10 / 17

Jacobi iteration the Jacobi iteration is Dx k+1 = b + (L + U)x k (4) if it converges then Dx = b + (L + U)x, which is the same as Ax = b we could also write it as x k+1 = D 1 (b + (L + U)x k ) or as x (k+1) i = 1 b i a ij x (k) j (5) a ii j i where x (k) j denotes the jth entry of the kth iterate x k make sure you understand why (4) and (5) are the same! Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 11 / 17

Gauss-Seidel iteration Gauss-Seidel iteration extracts the non-strict lower-triangular part of A (and inverts it) again if A = D L U then it is (D L)x k+1 = b + Ux k (6) we could also write it x k+1 = (D L) 1 (b + Ux k ) but that would miss the point! instead we write it as Dx k+1 = b + Ux k + Lx k+1 or equivalently: x (k+1) i = 1 b i a ii j>i a ij x (k) j j<i a ij x (k+1) (7) j the lower-triangular entries of A apply to those entries of x k+1 which have already been computed form (7) is actually easier to implement than Jacobi (5) (why?) Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 12 / 17

convergence conditions for Jacobi and Gauss-Seidel the convergence lemma says that Jacobi iteration converges if and only if ρ(d 1 (L + U)) < 1 Gauss-Seidel iteration converges if and only if ρ((d L) 1 U) < 1 these conditions are hard to use in practice because computing a spectral radius can be just as hard as solving the original system Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 13 / 17

diagonally-dominant matrices definition. A is strictly diagonally-dominant if a ii > j i a ij LS1 is strictly diagonally-dominant LS2 is not two relatively-famous theorems 2 are these: theorem. if A is strictly diagonally-dominant then both the Jacobi and Gauss-Seidel iterations converge Theorem. if A is symmetric positive definite then Gauss-Seidel iteration converges unlike the ρ(... ) < 1 conditions on the last slide: it is easy to check diagonal-dominance, and it is a common property of the matrices coming from FD schemes on ODEs and PDEs these are only sufficient conditions, e.g. there are nonsymmetric A, which are not diagonally-dominant, but for which the iterations converge see problems P19 and P20 2 section 11.2 of Golub and van Loan, Matrix Computations, 4th edition 2013 Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 14 / 17

past the Jacobi and Gauss-Seidel iterations are from the 19th century Richardson iteration first appears in a 1910 publication the early history of numerical partial differential equations, e.g. in the 1920 to 1970 period, heavily used these classical iterations a generalization of Gauss-Seidel iteration called successive over-relaxation, was a particular favorite around 1970; see section 4.2 of the textbook none of these iterations work on system LS2 Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 15 / 17

recent past and future there are better iterative ideas, and they flourished starting in the 1980-90s... and far into the future among the best known are CG = conjugate gradients (actually from 1950-60s) and GMRES = generalized minimum residuals (from a 1986 paper by Saad and Schultz) GMRES works (i.e. converges at some rate) on LS2 but there can be no good iteration with a universally-fast convergence rate 3 iteration to solve linear systems is the future: it is obligatory on sufficiently-big systems it works better in parallel than direct methods like Gauss elimination it can exploit partial knowledge of the underlying model 3 remarkably, there is a 1992 theorem by Nachtigal, Reddy, and Trefethen that says this Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 16 / 17

biographies Gauss (1777 1855) did big stuff, not just the little Gauss-Seidel thing: en.wikipedia.org/wiki/carl_friedrich_gauss Jacobi (1804 1851) also has his name on the Jacobian, the matrix of derivatives appearing in Newton s method for systems of equations: en.wikipedia.org/wiki/carl_gustav_jacob_jacobi Seidel (1821 1896) is relatively little known: en.wikipedia.org/wiki/philipp_ludwig_von_seidel Richardson (1881 1953) is the most interesting. He invented numerical weather forecasting, doing it by-hand for fun during WWI. Later, as a pacifist and quaker, he quit the subject entirely when he found his meteorological work was of most value to chemical weapons engineers and the British Air Force: en.wikipedia.org/wiki/lewis_fry_richardson Ed Bueler (MATH 615 NADEs) Classical iterative methods for linear systems Spring 2017 17 / 17