The number of Gauss-Seidel sweeps for a diagonally dominant matrix full
This proof shows: sweeps.worst, time.worst.
Exact arithmetic, strictly row diagonally dominant A, q=∥GJ∥∞<1 and 0<ε<1.
Claim. After k∗=⌈ln(1/ε)/ln(1/q)⌉ sweeps, ∥ek∗∥∞≤ε∥e0∥∞. (If q=0, A is diagonal and one sweep gives e1=0.)
Proof. Theorem 4 of the correctness proof gives ∥ek∥∞≤ηk∥e0∥∞≤qk∥e0∥∞, and qk∗≤ε as in the Jacobi count. □
Cost. A sweep (lines L5 to L7) does, for row i with zi nonzeros, zi−1 multiplications, at most zi−2 additions, one subtraction and one division: 2zi flops, 2z in total. Line L2 does 2z more and line L3 does n comparisons. So each pass of the outer loop costs O(z) (as z≥n), and k∗ of them cost O(zln(1/ε)/ln(1/q)). The only extra storage is the residual r, Θ(n). □
■
Convergence of the Gauss-Seidel method full
This proof shows: correctness, termination.
Notation of the page: A=D+L+U with aii=0, M=D+L, G=GGS=−M−1U, c=M−1b. One execution of lines L5 to L7 maps xk to xk+1 with
xk+1,i=aii1(bi−j<i∑aijxk+1,j−j>i∑aijxk,j),i=1,…,n, because when row i is processed, the entries j<i already hold the new values and the entries j>i still hold the old ones. Multiplying by aii and collecting terms: (D+L)xk+1=b−Uxk, that is xk+1=Gxk+c.
Theorem 1 (fixed point and error recursion). Ax=b if and only if x=Gx+c. If Ax=b, then ek+1=Gek, and xk→x for every x0 if and only if ρ(G)<1.
Proof. x=Gx+c⟺(D+L)x=b−Ux⟺Ax=b. Subtracting, ek+1=Gek. The last claim is the general criterion for ek=Gke0, proved as Theorem 2 of the Jacobi correctness proof. □
Theorem 2 (one coordinate update, symmetric positive definite A). Let A be symmetric positive definite, Ax=b, and let y′ differ from y only in entry i, with yi′=(bi−∑j=iaijyj)/aii. Let ρi=(b−Ay)i. Then ∥x−y′∥A2=∥x−y∥A2−ρi2/aii.
Proof. yi′−yi=(bi−∑jaijyj)/aii=ρi/aii, so y′=y+tei with t=ρi/aii (ei the unit vector). With d=x−y, ∥d−tei∥A2=∥d∥A2−2teiTAd+t2aii by symmetry. Since Ad=b−Ay, eiTAd=ρi, and the right side is ∥d∥A2−2ρi2/aii+ρi2/aii. □
Theorem 3 (convergence for symmetric positive definite A). If A is symmetric positive definite, then ∥Gv∥A<∥v∥A for every real v=0, hence ∥G∥A<1 and ρ(G)<1. So Gauss-Seidel converges for every x0, and ∥ek∥A decreases monotonically.
Proof. Apply one sweep to the system Ay=0 (solution 0) from y=v. By the formula above the sweep produces Gv, and by Theorem 2 each of the n coordinate updates does not increase ∥y∥A. If ∥Gv∥A=∥v∥A, then every update had ρi=0, so no update changed y, and at the moment row i was processed y=v and (Av)i=−ρi=0. So Av=0 and v=0. Thus ∥Gv∥A<∥v∥A for v=0. The function v↦∥Gv∥A is continuous on the compact set {∥v∥A=1}, so its maximum ∥G∥A is attained and is below 1. For any norm, ρ(G)=limk∥Gk∥1/k≤∥G∥ (Gelfand's formula, valid for the operator norm of a real matrix on Rn since all norms on the finite-dimensional space of matrices are equivalent). So ρ(G)≤∥G∥A<1. Monotonicity is ∥ek+1∥A=∥Gek∥A<∥ek∥A for ek=0. □
Theorem 4 (strict row diagonal dominance). Let αi=∑j<i∣aij∣/∣aii∣, βi=∑j>i∣aij∣/∣aii∣, and suppose αi+βi<1 for all i. Let η=maxiβi/(1−αi) and q=maxi(αi+βi). Then η≤q<1 and ∥ek+1∥∞≤η∥ek∥∞.
Proof. βi≤(αi+βi)(1−αi) is equivalent to 0≤αi(1−αi−βi), which holds; so βi/(1−αi)≤αi+βi≤q. From (D+L)ek+1=−Uek, ek+1,i=−(∑j<iaijek+1,j+∑j>iaijek,j)/aii. We show ∣ek+1,i∣≤η∥ek∥∞ by induction on i. If it holds for all j<i, then ∣ek+1,i∣≤αiη∥ek∥∞+βi∥ek∥∞, and αiη+βi≤η because βi≤η(1−αi). The case i=1 has α1=0. □
Theorem 5 (one sweep in floating point). In the floating point model with (n+1)u<1, the computed sweep satisfies (D+L+ΔL)x^k+1+(U+ΔU)x^k=b+Δb with ∣ΔL∣≤γn+1∣L∣, ∣ΔU∣≤γn+1∣U∣ and ∣Δb∣≤γn+1∣b∣, for any order of summation in line L6.
Proof. In line L6 each term aijxj is formed with one rounding and then takes part in at most n−2 additions; line L7 adds a subtraction and a division. So x^k+1,i=(bi(1+η0)−∑j=iaijxj(1+ηj))/aii with each 1+ηj a product of at most n+1 factors (1+δ)±1, so ∣ηj∣≤γn+1 (Higham, Lemma 3.1). Multiply by aii and set (ΔL)ij=aijηj for j<i, (ΔU)ij=aijηj for j>i, (Δb)i=biη0. □
Theorem 6 (termination and output). The pseudocode stops after at most kmax sweeps. If it returns CONVERGED, the residual computed in line L2 for the returned x satisfies ∥r∥∞≤tol⋅∥b∥∞.
Proof. The outer loop has kmax+1 iterations and line L4 returns in the last one. Only line L3 returns CONVERGED, after testing that inequality for the current x, which no line changes before the return. □
■