Chapter 5 Iterative Methods for Solving Linear Systems
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 5 Iterative Methods for Solving Linear Systems 5.1 Convergence of Sequences of Vectors and Matrices In Chapter 2 we have discussed some of the main methods for solving systems of linear equations. These methods are direct methods,inthesensethattheyyieldexact solutions (assuming infinite precision!). Another class of methods for solving linear systems con- sists in approximating solutions using iterative methods. 387 388 CHAPTER 5. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS The basic idea is this: Given a linear system Ax = b (with A asquareinvertiblematrix),findanothermatrix B and a vector c,suchthat 1. The matrix I B is invertible − 2. The unique solution x of the system Ax = b is iden- tical to the unique solution u of the system e u = Bue+ c, and then, starting from any vector u0,computethese- quence (uk)givenby uk+1 = Buk + c, k N. 2 Under certain conditions (to be clarified soon), the se- quence (uk)convergestoalimitu which is the unique solution of u = Bu + c,andthusofAx = b. e 5.1. CONVERGENCE OF SEQUENCES OF VECTORS AND MATRICES 389 Let (E, )beanormedvectorspace.Recallthata kk sequence (uk)ofvectorsuk E converges to a limit u E,ifforevery✏>0, there2 some natural number N such2 that u u ✏, for all k N. k k − k ≥ We write u =limuk. k 7!1 If E is a finite-dimensional vector space and dim(E)= n,weknowfromTheorem4.3thatanytwonormsare equivalent, and if we choose the norm ,weseethat kk1 the convergence of the sequence of vectors uk is equivalent to the convergence of the n sequences of scalars formed by the components of these vectors (over any basis). 390 CHAPTER 5. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS The same property applies to the finite-dimensional vec- tor space Mm,n(K)ofm n matrices (with K = R or ⇥ K = C), which means that the convergence of a sequence (k) of matrices Ak =(aij )isequivalenttotheconvergence (k) of the m n sequences of scalars (aij ), with i, j fixed (1 i m⇥,1 j n). The first theorem below gives a necessary and sufficient condition for the sequence (Bk)ofpowersofamatrixB to converge to the zero matrix. Recall that the spectral radius ⇢(B)ofamatrixB is the maximum of the moduli λ of the eigenvalues of B. | i| 5.1. CONVERGENCE OF SEQUENCES OF VECTORS AND MATRICES 391 Theorem 5.1. For any square matrix B, the follow- ing conditions are equivalent: k (1) limk B =0, 7!1 k (2) limk B v =0, for all vectors v, 7!1 (3) ⇢(B) < 1, (4) B < 1, for some subordinate matrix norm . k k kk The following proposition is needed to study the rate of convergence of iterative methods. Proposition 5.2. For every square matrix B and ev- ery matrix norm , we have kk lim Bk 1/k = ⇢(B). k k k 7!1 We now apply the above results to the convergence of iterative methods. 392 CHAPTER 5. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS 5.2 Convergence of Iterative Methods Recall that iterative methods for solving a linear system Ax = b (with A invertible) consists in finding some ma- trix B and some vector c,suchthatI B is invertible, and the unique solution x of Ax = b is equal− to the unique solution u of u = Bu + c. e Then, startinge from any vector u0,computethesequence (uk)givenby uk+1 = Buk + c, k N, 2 and say that the iterative method is convergent i↵ lim uk = u, k 7!1 for every initial vector u0. e 5.2. CONVERGENCE OF ITERATIVE METHODS 393 Here is a fundamental criterion for the convergence of any iterative methods based on a matrix B,calledthematrix of the iterative method. Theorem 5.3. Given a system u = Bu + c as above, where I B is invertible, the following statements are equivalent:− (1) The iterative method is convergent. (2) ⇢(B) < 1. (3) B < 1, for some subordinate matrix norm . k k kk The next proposition is needed to compare the rate of convergence of iterative methods. It shows that asymptotically, the error vector k k ek = B e0 behaves at worst like (⇢(B)) . 394 CHAPTER 5. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS Proposition 5.4. Let be any vector norm, let B be a matrix such that IkkB is invertible, and let u be the unique solution of u−= Bu + c. e (1) If (uk) is any sequence defined iteratively by uk+1 = Buk + c, k N, 2 then 1/k lim sup uk u = ⇢(B). k u u =1 k − k 7!1 k 0− k e e 5.2. CONVERGENCE OF ITERATIVE METHODS 395 (2) Let B1 and B2 be two matrices such that I B1 and I B are invertibe, assume that both u = B −u+c − 2 1 1 and u = B2u + c2 have the same unique solution u, and consider any two sequences (uk) and (vk) defined inductively by e uk+1 = B1uk + c1 vk+1 = B2vk + c2, with u0 = v0.If⇢(B1) <⇢(B2), then for any ✏>0, there is some integer N(✏), such that for all k N(✏), we have ≥ v u 1/k ⇢(B ) sup k k − k 2 . u u =1 uk u ≥ ⇢(B1)+✏ k 0− k k − k e e In light of the above, we seee that when we investigate new iterative methods, we have to deal with the following two problems: 1. Given an iterative method with matrix B,determine whether the method is convergent. This involves de- termining whether ⇢(B) < 1, or equivalently whether there is a subordinate matrix norm such that B < 1. k k 396 CHAPTER 5. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS By Proposition 4.8, this implies that I B is invertible (since B = B ,Proposition4.8applies).− k k k k 2. Given two convergent iterative methods, compare them. The iterative method which is faster is that whose ma- trix has the smaller spectral radius. We now discuss three iterative methods for solving linear systems: 1. Jacobi’s method 2. Gauss-Seidel’s method 3. The relaxation method. 5.3. METHODS OF JACOBI, GAUSS-SEIDEL, AND RELAXATION 397 5.3 Description of the Methods of Jacobi, Gauss-Seidel, and Relaxation The methods described in this section are instances of the following scheme: Given a linear system Ax = b,withA invertible, suppose we can write A in the form A = M N, − with M invertible, and “easy to invert,” which means that M is close to being a diagonal or a triangular matrix (perhaps by blocks). Then, Au = b is equivalent to Mu = Nu+ b, that is, 1 1 u = M − Nu+ M − b. Therefore, we are in the situation described in the previ- 1 1 ous sections with B = M − N and c = M − b. 398 CHAPTER 5. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS In fact, since A = M N,wehave − 1 1 1 B = M − N = M − (M A)=I M − A, − − 1 which shows that I B = M − A is invertible. − The iterative method associated with the matrix 1 B = M − N is given by 1 1 u = M − Nu + M − b, k 0, k+1 k ≥ starting from any arbitrary vector u0. From a practical point of view, we do not invert M,and instead we solve iteratively the systems Mu = Nu + b, k 0. k+1 k ≥ 5.3. METHODS OF JACOBI, GAUSS-SEIDEL, AND RELAXATION 399 Various methods correspond to various ways of choosing M and N from A.ThefirsttwomethodschooseM and N as disjoint submatrices of A,buttherelaxation method allows some overlapping of M and N. To describe the various choices of M and N,itisconve- nient to write A in terms of three submatrices D, E, F, as A = D E F, − − where the only nonzero entries in D are the diagonal en- tries in A,theonlynonzeroentriesinE are entries in A below the the diagonal, and the only nonzero entries in F are entries in A above the diagonal. 400 CHAPTER 5. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS More explicitly, if a11 a12 a13 a1n 1 a1n ··· − 0 a21 a22 a23 a2n 1 a2n 1 ··· − a a a a a B 31 32 33 3n 1 3n C A = B . ···. .− . C , B . .. C B C Ba a a a a C B n 11 n 12 n 13 n 1 n 1 n 1 nC B − − − ··· − − − C B an 1 an 2 an 3 ann 1 ann C B ··· − C @ A then a 00 00 11 ··· 0 a 0 00 0 22 ··· 1 00a 00 B 33 C D = B . ···. C , B . .. C B C B 000 a 0 C B n 1 n 1 C B ··· − − C B 000 0 annC B ··· C @ A 5.3. METHODS OF JACOBI, GAUSS-SEIDEL, AND RELAXATION 401 000 00 ··· a 00 00 0 21 ··· 1 a a 0 00 B 31 32 C E = B . ···. .C , − B . .. .. .C B C Ba a a ... 00C B n 11 n 12 n 13 C B − − − C B an 1 an 2 an 3 ann 1 0C B ··· − C @ A 0 a12 a13 a1n 1 a1n ··· − 000a23 a2n 1 a2n 1 ··· − 00 0 ... a a B 3n 1 3n C F = B. − . C . − B. .. .. C B C B00 0 0 a C B n 1 nC B ··· − C B00 0 00C B ··· C @ A 402 CHAPTER 5. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS In Jacobi’s method,weassumethatalldiagonalentries in A are nonzero, and we pick M = D N = E + F, so that 1 1 1 B = M − N = D− (E + F )=I D− A. − As a matter of notation, we let 1 1 J = I D− A = D− (E + F ), − which is called Jacobi’s matrix.