10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method



Similar documents
General Framework for an Iterative Solution of Ax b. Jacobi s Method

Solving Systems of Linear Equations Using Matrices

Solving Systems of Linear Equations

Question 2: How do you solve a matrix equation using the matrix inverse?

Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix multiplication).

Solving Systems of Linear Equations

SOLVING LINEAR SYSTEMS

Linear Equations ! $ & " % & " 11,750 12,750 13,750% MATHEMATICS LEARNING SERVICE Centre for Learning and Professional Development

Iterative Methods for Solving Linear Systems

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Solving Linear Systems, Continued and The Inverse of a Matrix

Direct Methods for Solving Linear Systems. Matrix Factorization

Operation Count; Numerical Linear Algebra

Methods for Finding Bases

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Linear Programming. March 14, 2014

Section 8.2 Solving a System of Equations Using Matrices (Guassian Elimination)

5 Homogeneous systems

7 Gaussian Elimination and LU Factorization

160 CHAPTER 4. VECTOR SPACES

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

The Characteristic Polynomial

1.2 Solving a System of Linear Equations

Lecture 1: Systems of Linear Equations

Row Echelon Form and Reduced Row Echelon Form

5.5. Solving linear systems by the elimination method

x = + x 2 + x

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

Solution of Linear Systems

Systems of Linear Equations

LS.6 Solution Matrices

Inner Product Spaces

8 Square matrices continued: Determinants

1 Solving LPs: The Simplex Algorithm of George Dantzig

These axioms must hold for all vectors ū, v, and w in V and all scalars c and d.

Reduced echelon form: Add the following conditions to conditions 1, 2, and 3 above:

Notes on Determinant

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Arithmetic and Algebra of Matrices

( ) which must be a vector

6. Cholesky factorization

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

1 Determinants and the Solvability of Linear Systems

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Numerical Methods I Solving Linear Systems: Sparse Matrices, Iterative Methods and Non-Square Systems

Linear Programming. April 12, 2005

Continued Fractions and the Euclidean Algorithm

Physics 235 Chapter 1. Chapter 1 Matrices, Vectors, and Vector Calculus

Lecture 3: Finding integer solutions to systems of linear equations

Systems of Linear Equations

Nonlinear Programming Methods.S2 Quadratic Programming

Chapter 6. Orthogonality

GEC320 COURSE COMPACT. Four hours per week for 15 weeks (60 hours)

by the matrix A results in a vector which is a reflection of the given

Numerical Analysis Lecture Notes

ALGEBRAIC EIGENVALUE PROBLEM

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

Section 1.1 Linear Equations: Slope and Equations of Lines

Linear Programming in Matrix Form

Linearly Independent Sets and Linearly Dependent Sets

Mean value theorem, Taylors Theorem, Maxima and Minima.

Lecture 5 Principal Minors and the Hessian

University of Lille I PC first year list of exercises n 7. Review

Solving Linear Programs

26. Determinants I. 1. Prehistory

MATH2210 Notebook 1 Fall Semester 2016/ MATH2210 Notebook Solving Systems of Linear Equations... 3

A power series about x = a is the series of the form

DERIVATIVES AS MATRICES; CHAIN RULE

Chapter 7. Matrices. Definition. An m n matrix is an array of numbers set out in m rows and n columns. Examples. (

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

7.4. The Inverse of a Matrix. Introduction. Prerequisites. Learning Style. Learning Outcomes

Factorization Theorems

Section Continued

The Basics of FEA Procedure

The Determinant: a Means to Calculate Volume

9.2 Summation Notation

Duality in Linear Programming

Linear Programming Notes V Problem Transformations

Solution to Homework 2

6.4 Logarithmic Equations and Inequalities

Numerical Analysis Introduction. Student Audience. Prerequisites. Technology.

1 Introduction to Matrices

Variance Reduction. Pricing American Options. Monte Carlo Option Pricing. Delta and Common Random Numbers

Homogeneous systems of algebraic equations. A homogeneous (ho-mo-geen -ius) system of linear algebraic equations is one in which

Elasticity Theory Basics

Yousef Saad University of Minnesota Computer Science and Engineering. CRM Montreal - April 30, 2008

Au = = = 3u. Aw = = = 2w. so the action of A on u and w is very easy to picture: it simply amounts to a stretching by 3 and 2, respectively.

A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form

Solving Linear Systems of Equations. Gerald Recktenwald Portland State University Mechanical Engineering Department

Matrices 2. Solving Square Systems of Linear Equations; Inverse Matrices

Introduction to Matrix Algebra

Computer programming course in the Department of Physics, University of Calcutta

1.5 SOLUTION SETS OF LINEAR SYSTEMS

November 16, Interpolation, Extrapolation & Polynomial Approximation

IB Maths SL Sequence and Series Practice Problems Mr. W Name

CURVE FITTING LEAST SQUARES APPROXIMATION

Chapter 17. Orthogonal Matrices and Symmetries of Space

1 VECTOR SPACES AND SUBSPACES

MATH 423 Linear Algebra II Lecture 38: Generalized eigenvectors. Jordan canonical form (continued).

Transcription:

578 CHAPTER 1 NUMERICAL METHODS 1. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS As a numerical technique, Gaussian elimination is rather unusual because it is direct. That is, a solution is obtained after a single application of Gaussian elimination. Once a solution has been obtained, Gaussian elimination offers no method of refinement. The lack of refinements can be a problem because, as the previous section shows, Gaussian elimination is sensitive to rounding error. Numerical techniques more commonly involve an iterative method. For example, in calculus you probably studied Newton s iterative method for approximating the zeros of a differentiable function. In this section you will look at two iterative methods for approximating the solution of a system of n linear equations in n variables. The Jacobi Method The first iterative technique is called the Jacobi method, after Carl Gustav Jacob Jacobi (184 1851). This method makes two assumptions: (1) that the system given by a 11 x 1 a 1 x... a 1n x n b 1 a 1 x 1 a x... a n x n b.... a n1 x 1 a n x... a nn x n b n has a unique solution and () that the coefficient matrix A has no zeros on its main diagonal. If any of the diagonal entries a 11, a,..., a nn are zero, then rows or columns must be interchanged to obtain a coefficient matrix that has nonzero entries on the main diagonal. To begin the Jacobi method, solve the first equation for x 1, the second equation for x, and so on, as follows. x 1 1 a 11 (b 1 a 1 x a 13 x 3... a 1n x n ) x 1 (b a a 1 x 1 a 3 x 3... a n x n ). x n 1 (b a n a n1 x 1 a n x... a n,n1 x n1 nn Then make an initial approximation of the solution, (x 1, x, x 3,..., x n ), Initial approximation and substitute these values of x i into the right-hand side of the rewritten equations to obtain the first approximation. After this procedure has been completed, one iteration has been

SECTION 1. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS 579 performed. In the same way, the second approximation is formed by substituting the first approximation s x-values into the right-hand side of the rewritten equations. By repeated iterations, you will form a sequence of approximations that often converges to the actual solution. This procedure is illustrated in Example 1. EXAMPLE 1 Applying the Jacobi Method Use the Jacobi method to approximate the solution of the following system of linear equations. 5x 1 x 3x 3 1 3x 1 9x x 3 x 1 x 7x 3 3 Continue the iterations until two successive approximations are identical when rounded to three significant digits. To begin, write the system in the form x 1 1 5 5 x 3 5 x 3 x 9 3 9 x 1 1 9 x 3 x 3 3 7 7 x 1 1 7 x. Because you do not know the actual solution, choose x 1, x, x 3 Initial approximation as a convenient initial approximation. So, the first approximation is x 1 1 5 5 () 3 5 (). x 9 3 9 () 1 9 (). x 3 3 7 7 () 1 7 ().49. Continuing this procedure, you obtain the sequence of approximations shown in Table 1.1. TABLE 1.1 n 1 3 4 5 6 7 x 1...146.19.181.185.186.186 x...3.38.33.39.331.331 x 3..49.517.416.41.44.43.43

58 CHAPTER 1 NUMERICAL METHODS Because the last two columns in Table 1.1 are identical, you can conclude that to three significant digits the solution is x 1.186, x.331, x 3.43. For the system of linear equations given in Example 1, the Jacobi method is said to converge. That is, repeated iterations succeed in producing an approximation that is correct to three significant digits. As is generally true for iterative methods, greater accuracy would require more iterations. The Gauss-Seidel Method You will now look at a modification of the Jacobi method called the Gauss-Seidel method, named after Carl Friedrich Gauss (1777 1855) and Philipp L. Seidel (181 1896). This modification is no more difficult to use than the Jacobi method, and it often requires fewer iterations to produce the same degree of accuracy. With the Jacobi method, the values of x i obtained in the nth approximation remain unchanged until the entire (n 1) th approximation has been calculated. With the Gauss- Seidel method, on the other hand, you use the new values of each x i as soon as they are known. That is, once you have determined x 1 from the first equation, its value is then used in the second equation to obtain the new x. Similarly, the new x 1 and x are used in the third equation to obtain the new x 3, and so on. This procedure is demonstrated in Example. EXAMPLE Applying the Gauss-Seidel Method Use the Gauss-Seidel iteration method to approximate the solution to the system of equations given in Example 1. The first computation is identical to that given in Example 1. That is, using (x 1, x, x 3 ) (,, ) as the initial approximation, you obtain the following new value for x 1. x 1 1 5 5 () 3 5 (). Now that you have a new value for x 1, however, use it to compute a new value for x. That is, x 9 3 9 (.) 1 9 ().156. Similarly, use x 1. and x.156 to compute a new value for x 3. That is, x 3 3 7 7 (.) 1 7 (.156).58. So the first approximation is x 1., x.156, and x 3.58. Continued iterations produce the sequence of approximations shown in Table 1..

SECTION 1. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS 581 TABLE 1. n 1 3 4 5 x 1...167.191.186.186 x..156.334.333.331.331 x 3..58.49.4.43.43 Note that after only five iterations of the Gauss-Seidel method, you achieved the same accuracy as was obtained with seven iterations of the Jacobi method in Example 1. Neither of the iterative methods presented in this section always converges. That is, it is possible to apply the Jacobi method or the Gauss-Seidel method to a system of linear equations and obtain a divergent sequence of approximations. In such cases, it is said that the method diverges. EXAMPLE 3 An Example of Divergence Apply the Jacobi method to the system x 1 5x 4 7x 1 x 6, using the initial approximation x 1, x,, and show that the method diverges. As usual, begin by rewriting the given system in the form x 1 4 5x x 6 7x 1. Then the initial approximation (, ) produces x 1 4 5 4 x 6 7 6 as the first approximation. Repeated iterations produce the sequence of approximations shown in Table 1.3. TABLE 1.3 n 1 3 4 5 6 7 x 1 4 34 174 144 614 4,874 14,374 x 6 34 44 144 8574 4,874 3,14

58 CHAPTER 1 NUMERICAL METHODS For this particular system of linear equations you can determine that the actual solution is x 1 1 and x 1. So you can see from Table 1.3 that the approximations given by the Jacobi method become progressively worse instead of better, and you can conclude that the method diverges. The problem of divergence in Example 3 is not resolved by using the Gauss-Seidel method rather than the Jacobi method. In fact, for this particular system the Gauss-Seidel method diverges more rapidly, as shown in Table 1.4. TABLE 1.4 n 1 3 4 5 x 1 4 174 614 14,374 7,53,14 x 34 14 4,874 1,5,64 5,51,874 With an initial approximation of (x 1, x ) (, ), neither the Jacobi method nor the Gauss-Seidel method converges to the solution of the system of linear equations given in Example 3. You will now look at a special type of coefficient matrix A, called a strictly diagonally dominant matrix, for which it is guaranteed that both methods will converge. Definition of Strictly Diagonally Dominant Matrix An n n matrix A is strictly diagonally dominant if the absolute value of each entry on the main diagonal is greater than the sum of the absolute values of the other entries in the same row. That is, a 11 > a 1 a 13... a 1n a > a 1 a 3... a n. a nn > a n1 a n... a n,n1. EXAMPLE 4 Strictly Diagonally Dominant Matrices Which of the following systems of linear equations has a strictly diagonally dominant coefficient matrix? (a) 3x 1 x 4 x 1 5x (b) 4 x 1 x x 3 1 x 1 x 3 4 3x 1 5x x 3 3

SECTION 1. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS 583 (a) The coefficient matrix A 3 is strictly diagonally dominant because (b) The coefficient matrix A 4 1 3 is not strictly diagonally dominant because the entries in the second and third rows do not conform to the definition. For instance, in the second row a 1 1, a, a 3, and it is not true that a > a 1 a 3. Interchanging the second and third rows in the original system of linear equations, however, produces the coefficient matrix A 4 3 1 1 5 5 5 1 1 1 1, 3 > 1 and this matrix is strictly diagonally dominant. and 5 >. The following theorem, which is listed without proof, states that strict diagonal dominance is sufficient for the convergence of either the Jacobi method or the Gauss-Seidel method. Theorem 1.1 Convergence of the Jacobi and Gauss-Seidel Methods If A is strictly diagonally dominant, then the system of linear equations given by Ax b has a unique solution to which the Jacobi method and the Gauss-Seidel method will converge for any initial approximation. In Example 3 you looked at a system of linear equations for which the Jacobi and Gauss- Seidel methods diverged. In the following example you can see that by interchanging the rows of the system given in Example 3, you can obtain a coefficient matrix that is strictly diagonally dominant. After this interchange, convergence is assured. EXAMPLE 5 Interchanging Rows to Obtain Convergence Interchange the rows of the system x 1 5x 4 7x 1 x 6 to obtain one with a strictly diagonally dominant coefficient matrix. Then apply the Gauss- Seidel method to approximate the solution to four significant digits.

584 CHAPTER 1 NUMERICAL METHODS Begin by interchanging the two rows of the given system to obtain 7x 1 x 6 x 1 5x 4. Note that the coefficient matrix of this system is strictly diagonally dominant. Then solve for and as follows. x 1 x you can obtain the sequence of approxi- Using the initial approximation mations shown in Table 1.5. TABLE 1.5 x 1 6 7 1 7 x x 4 5 1 5 x 1 (x 1, x ) (, ), n 1 3 4 5 x 1..8571.9959.9999 1. 1. x..9714.999 1. 1. 1. So you can conclude that the solution is x 1 1 and x 1. Do not conclude from Theorem 1.1 that strict diagonal dominance is a necessary condition for convergence of the Jacobi or Gauss-Seidel methods. For instance, the coefficient matrix of the system 4x 1 5x 1 x 1 x 3 is not a strictly diagonally dominant matrix, and yet both methods converge to the solution x 1 1 and x 1 when you use an initial approximation of x 1, x,. (See Exercises 1.)

SECTION 1. EXERCISES 585 SECTION 1. EXERCISES In Exercises 1 4, apply the Jacobi method to the given system of linear equations, using the initial approximation x 1, x,..., x n (,,..., ). Continue performing iterations until two successive approximations are identical when rounded to three significant digits. 1. 3x 1 x. 4x 1 x 6 x 1 4x 5 3x 1 5x 1 3. x 1 x 4. 4x 1 x x 3 7 x 1 3x x 3 x 1 7x x 3 x 1 x 3x 3 6 3x 1 4 x 3 11 5. Apply the Gauss-Seidel method to Exercise 1. 6. Apply the Gauss-Seidel method to Exercise. 7. Apply the Gauss-Seidel method to Exercise 3. 8. Apply the Gauss-Seidel method to Exercise 4. In Exercises 9 1, show that the Gauss-Seidel method diverges for the given system using the initial approximation x 1, x,..., x n,,...,. 9. x 1 x 1 1. x 1 4x 1 x 1 x 3 3x 1 x 11. x 1 3x 7 1. x 1 3x x 3 5 x 1 3x 1x 3 9 3x 1 x 5 3x 1 x 3 13 x x 3 1 In Exercises 13 16, determine whether the matrix is strictly diagonally dominant. 13. 1 14. 1 3 5 15. 16. 7 1 1 6 3 6 13 5 4 1 1 1 3 17. Interchange the rows of the system of linear equations in Exercise 9 to obtain a system with a strictly diagonally dominant coefficient matrix. Then apply the Gauss-Seidel method to approximate the solution to two significant digits. 18. Interchange the rows of the system of linear equations in Exercise 1 to obtain a system with a strictly diagonally dominant coefficient matrix. Then apply the Gauss-Seidel method to approximate the solution to two significant digits. 19. Interchange the rows of the system of linear equations in Exercise 11 to obtain a system with a strictly diagonally dominant coefficient matrix. Then apply the Gauss-Seidel method to approximate the solution to two significant digits.. Interchange the rows of the system of linear equations in Exercise 1 to obtain a system with a strictly diagonally dominant coefficient matrix. Then apply the Gauss-Seidel method to approximate the solution to two significant digits. In Exercises 1 and, the coefficient matrix of the system of linear equations is not strictly diagonally dominant. Show that the Jacobi and Gauss-Seidel methods converge using an initial approximation of x 1, x,..., x n,,...,. 1. 4x 1 5x 1. 4 x 1 x x 3 x 1 x 3 x 1 3x x 3 7 3x 1 x 4x 3 5 In Exercises 3 and 4, write a computer program that applies the Gauss-Siedel method to solve the system of linear equations. 3. 4x 1 x 1 4. 4x 1 x 1 x 6x x x x 4x x x 3 x 3 x 4 5x 3 5x 4 x 3 x 4 x 3 x 4 x 4 x 3 x 3 4x 3 x 3 x 4 x 4 4x 4 x 4 6 4 x 6 x 6 5x 6 x 6 x 6 4x 6 x 6 x 7 4x 7 x 7 x 7 x 7 4x 7 x 7 5 4 3 6 5 1 1 18 18 4 4 6 16 1 3