You are on page 1of 1
248 CHAP. 20 Numeric Linear Algebra Table 20.2 Gauss-Seidel Iteration ALGORITHM GAUSS-SEIDEL (A, b, x, ¢ N) | ‘This algorithm computes solution x ofthe system Ax = b given an inital approximation 2 where A= [ay] is ann Xn mati with ay # Oj = Io" sm INPUT: A, b, intial approximation x, tolerance € > 0, maximum number of iterations N | OUTPUT: Approximate solution x™” = [4] or failure message that" does not satis the tolerance eonltion Form = 0,-++,.N — L,do: Forj = 1-1 do: 1, oe ° 1 gen t (Sanit? 3 ager) | End | 2 Imax aj"? = 2$] < ethon OUTPUT X*?, Stop | End OUTPUT: “No solution satisfying the tolerance condition obtained after N iteration steps.” Stop [Procedure completed unsuccessfully) End GAUISS-SEIDEL [Procedure completed successful] | Convergence and Matrix Norms ‘An iteration method for solving Ax = b is said to converge for an initial x if the corresponding iterative sequence x®, x", x, -«- converges to a solution of the given system, Convergence depends on the relation between x” and x". To get this relation for the Gauss-Seidel method, we use (6). We first have d+ Ex b- ux" and by multiplying by (I + 1)? from the left, O mse 40+ where The Gauss-Seidel iteration converges for every x®? if and only if all the eigenvalues (Gee. 8.1) of the “iteration matrix” C = ey] have absolute value less than 1. (Proof in Ref. {ES}, p. 191, listed in App. 1.) CAUTION! If you want to get C, first divide the rows of A by a, to have main diagonal 1, ++, 1. Ifthe spectral radius of C (= maximum of those absolute values) is small, then the convergence is rapid ‘Sufficient Convergence Condition, A sufficient condition for convergence is, 6 lley <1

You might also like