










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











Iterative Methods
L. Olson
Department of Computer Science
University of Illinois at Urbana-Champaign
September 29, 2006
Ax = b
diagonal system: O(n)
upper or lower triangular system: O(n
2 )
full system with GE: O(n
3 )
scaled partial pivoting adds O(n
2 )
full system with LU:
1 3 n
3
LU back solve: n
2
m different righ-hand sides: m(
1 3 n
3
2 )
tridiagonal system: O(n)
m-band system: O(m 2 n)
So far, we are seeking “exact” solutions x ∗ to
Ax = b
What if we only need an approximations ˆx to x
∗ ?
We would like some ˆx so that ‖xˆ − x
∗ ‖ 6 , where is some tolerance.
We can’t actually evaulate
e = x
∗ − xˆ
But...
For x = x
∗
b − Ax ≡ 0
For x = xˆ
b − Ax. 0
We call ˆr = b − Axˆ the residual. It is way to measure the error. In fact
ˆr = b − Axˆ
= Ax
∗ − Axˆ
= Aˆe
Suppose we made a wild guess to the solution x of Ax = b:
x
( 0 ) ≈ x
How do I improve x
( 0 ) ?
Ideally:
x
( 1 ) = x
( 0 )
( 0 )
but to obtain e ( 0 ) , we must know x. Not a viable method.
Ideally (another way):
x
( 1 ) = x
( 0 )
( 0 )
= x
( 0 )
∗ − x
( 0 ) )
= x
( 0 )
− 1 b − x
( 0 ) )
= x
( 0 )
− 1 (b − Ax
( 0 ) )
= x
( 0 )
− 1 r
( 0 )
Again, the method
x
( 1 ) = x
( 0 )
− 1 r
( 0 )
is nonsense since A
− 1 is needed.
What if we approximate A − 1 ? Suppose Q − 1 ≈ A − 1 and is cheap to construct,
then
x
( 1 ) = x
( 0 )
− 1 r
( 0 )
is a good step.
continuing...
x
(k) = x
(k− 1 )
− 1 r
(k− 1 )
Jacobi iteration approximates A with Q = diag(A).
Let A = D − L − U, where D is the diag of A and L and U are the lower and
upper parts of A.
1 x = x
( 0 )
2 for k = 1 to kmax
3 y = x
4 c = (D − A)x + b = (L + U)x + b
5 x = D − 1 c
6 if ‖r = b − Ax‖ 6 tol, stop
7 end
Gauss-Seidel iteration approximates A with Q = lowertri(A).
Let A = D − L − U, where D is the diag of A and L and U are the lower and
upper parts of A.
1 x = x
( 0 )
2 for k = 1 to kmax
3 y = x
4 c = (D − L − A)x + b = Ux + b
5 x = (D − L) − 1 c
6 if ‖r = b − Ax‖ 6 tol, stop
7 end
We want
e
(k) = (I − Q
− 1 A)
k e
( 0 )
to converge.
When does ak = c k converge? .....when |c| < 1
Likewise, our iteration converges
‖e
(k) ‖ = ‖(I − Q
− 1 A)
k e
( 0 ) ‖
6 c‖I − Q
− 1 A‖
k
when ‖I − Q
− 1 A‖ < 1.
What is ‖I − Q
− 1 A‖?
‖A‖ 1 = max 16 j 6 n
n i= 1 |aij|
ρ(A T A)
ρ(A) = max 16 j 6 n |λi|
‖A‖ 2 = ρ(A) for symmetric A
‖A‖∞ = max 16 i 6 n
n j= 1 |aij|
The algorithm above uses the matrix representation:
x
(k) = D
− 1 (L + U)x
(k− 1 )
− 1 b
The diagonaly is decoupled from the L + U, so we have an update in the form
of
x
(k) i
n ∑
j= 1 ,j,i
aij
aii
x
(k− 1 ) j
bi
aii
So each sweep (from k − 1 to k) uses O(n) operations.
The algorithm above uses the matrix representation:
x
(k) = (D − L)
− 1 Ux
(k− 1 )
− 1 b
Component-wise:
x
(k) i
n ∑
j= 1 ,j<i
aij
aii
x
(k) j
n ∑
j= 1 ,j>i
aij
aii
x
(k− 1 ) j
bi
aii
So again each sweep (from k − 1 to k) uses O(n) operations.
The difference is that in the Jacobi method, updates are saved (and not used)
in a new vector. With Gauss-Seidel, an update to an element x
(k) i
is used
immediately.