Professional Documents
Culture Documents
Outline
Iterative Methods
Example
Joe Mahaffy,
hmahaffy@math.sdsu.edui
Jacobi Iteration
Gauss-Seidel Iteration
SOR Method
Department of Mathematics
(1/51)
Physics of Trusses
f1
f4
f3
/4
1
/6
3
F2
f2
(2/51)
F1
Matrix Algebra
10,000 N
f5
Matrix Algebra
Fixed at Joint 1
Slides at Joint 4
4
F3
(3/51)
Matrix Algebra
(4/51)
Static Equilibrium
Basic Definitions
2
2
f F2 = 0
1
F1+ 2 f1+ f2 = 0
2 1
2
3
2
2
2 f1 + 2 f4 = 0
2 f1 f3 12 f4 = 0
3
f
+ f5 = 0
f3 10, 000 = 0
2
3
1
4
2 f4 f5 = 0
2 f4 F3 = 0
Matrix Algebra
x = g (x)
(5/51)
Basic Definitions
Matrix Algebra
(6/51)
Basic Definitions
Common Norms
Basic Definitions
||x||1 =
n
X
|xi |
i=1
Matrix Algebra
(7/51)
Matrix Algebra
(8/51)
Basic Definitions
Triangle Inequality
xt y =
n
X
i=1
Basic Definitions
||x + y||2 =
Rn
xi yi
n
X
(xi + yi )2
i=1
n
X
xi2
!1/2 n
X
i=1
!1/2
yi2
=
= ||x||2 ||y||2
n
X
i=1
xi2 + 2
2
n
X
xi yi +
i=1
n
X
yi2
i=1
2
i=1
Taking the square root of the above gives the Triangle Inequality
Joe Mahaffy, hmahaffy@math.sdsu.edui
Matrix Application - Truss
Matrix Iterative Methods
Iterative Methods
Jacobi Iteration
Gauss-Seidel Iteration
SOR Method
Matrix Algebra
(9/51)
Basic Definitions
Distance
Matrix Algebra
(10/51)
Basic Definitions
Convergence
Definition
If x, y Rn , the l2 and l distances between x and y is a function
|| || mapping Rn R with the following properties:are defined by
||x y||2 =
n
X
!1/2
(xi yi )2
i=1
Matrix Algebra
Definition
n
A sequence of vectors {x(k) }
k=1 in R is said to converge to x
with respect to norm || || if given any > 0 there exists an integer
N() such that
(11/51)
Matrix Algebra
(12/51)
Basic Definitions
Basic Theorems
Basic Definitions
Matrix Norm
We need to extend our definitions to include matrices.
Theorem
Definition
A Matrix Norm on the set of all n n matrices is a real-valued
function || ||, defined on this set satisfying for all n n matrices A
and B and all real numbers .
(i) ||A|| 0
(ii) ||A|| = 0 if and only if A is 0 (all zero entries)
(iii) ||A|| = || ||A|| (scalar multiplication)
(iv) ||A + B|| ||A|| + ||B|| (triangle inequality)
(v) ||AB|| ||A|| ||B||
n
The sequence of vectors {x(k) }
k=1 x in R with respect to
|| || if and only if
(k)
lim xi
= xi
Theorem
For each x Rn
||x|| ||x||2
n||x|| .
Matrix Algebra
(13/51)
Basic Definitions
Matrix Algebra
(14/51)
Basic Definitions
Matrix Action
Theorem
If || || is a vector norm on Rn , then
Theorem
If A = {aij } is an n n matrix, then
is a matrix norm.
This is the natural or induced matrix norm associated with the
vector norm.
z
||z||
is a unit vector
z
||Az||
= max
max ||Ax|| = max A
||z||
||z||6=0 ||z||
||x||=1
||z||6=0
For any z 6= 0, x =
Matrix Algebra
(15/51)
||A|| = max
1in
n
X
|aij |
j=1
Matrix Algebra
(16/51)
Basic Definitions
Matrix Mapping
Basic Definitions
p() = det(A I )
Matrix Algebra
(17/51)
Basic Definitions
(18/51)
Basic Definitions
Matrix Algebra
Matrix Algebra
Spectral Radius
Definition
If p is the characteristic polynomial of the matrix A, the zeroes of
p are eigenvalues (or characteristic values) of A. If is an
eigenvalue of A and x 6= 0 satisfies (A I )x = 0, then x is an
eigenvector (or characteristic vector) of A corresponding to the
eigenvalue .
(19/51)
Definition
The spectral radius, (A), of a matrix A is defined by
(A) = max ||,
where is an eigenvalue of A.
Matrix Algebra
(20/51)
Basic Definitions
Basic Definitions
Theorem
If A is an n n matrix,
(i) ||A||2 = ((At A))1/2 .
(ii) (A) ||A|| for any natural norm || ||.
Proof of (ii): Let ||x|| be a unit eigenvector or A with respect to
the eigenvalue
Matrix Algebra
(21/51)
Basic Definitions
Convergence of Matrix
Matrix Algebra
(22/51)
Basic Definitions
Definition
An n n matrix A is convergent if
lim (Ak )ij = 0,
Theorem
The following statements are equivalent,
(i) A is a convergent matrix.
(ii) limn ||An || = 0 for some natural norm.
(iii) limn ||An || = 0 for all natural norms.
(iv) (A) < 1.
(v) limn An x = 0 for every x.
Example: Consider
A=
Ak =
1
2
1
4
1
2
1
2k
1
2k
2k+1
Joe Mahaffy, hmahaffy@math.sdsu.edui
!
.
!
0.
Matrix Algebra
(23/51)
Matrix Algebra
(24/51)
Example
Example
Gaussian elimination and other direct methods are best for small
dimensional systems.
Jacobi and Gauss-Seidel iterative methods were developed in late
18th century to solve
Ax = b
The iterative scheme starts with an initial guess, x(0) to the linear
system
Ax = b
Transform this system into the form
x = Tx + c
by iteration.
xk = T xk1 + c
Matrix Algebra
(25/51)
Matrix Algebra
Example
Illustrative Example
(1 of 4)
(26/51)
Example
Illustrative Example
(2 of 4)
+ 2x3
x3 + 3x4
+ 10x3 x4
x3 + 8x4
x = Tx + c
=
6
=
25
= 11
=
15
x2 =
Matrix Algebra
1
11 x1
x3 = 51 x1 +
x4 =
1
10 x2
x1 =
(27/51)
1
5 x3
1
11 x3
1
10 x2
3
8 x2
3
5
3
11 x4
25
11
1
10 x4
11
10
15
8
1
8 x3
Matrix Algebra
(28/51)
Example
Illustrative Example
(3 of 4)
Example
Illustrative Example
(4 of 4)
(k)
(k)
x2
(k)
x3
(k)
x4
x = Tx + c
with
0
1
11
T =
1
5
0
1
10
51
1
11
3
11
1
10
38
1
8
1
10
3
5
25
11
and c =
11
10
1 x (k1)
11 1
(k1)
15 x1
=
=
=
1 x (k1)
10 2
3 x (k1)
8 2
1 x (k1)
5 3
1 x (k1)
11 3
1 x (k1)
8 3
3 x (k1)
11 4
1 x (k1)
10 4
3
5
25
11
11
10
15
8
(1)
x1
1 x (0)
10 2
(1)
x2
(1)
x3
(1)
x4
15
8
1 x (k1)
10 2
x1
1 x (0)
11 1
(0)
15 x1
=
=
=
1 x (0)
5 3
1 x (0)
11 3
1 x (0)
10 2
3 x (0)
8 2
3 x (0)
11 4
1 x (0)
10 4
1 x (0)
8 3
3
5
25
11
2.2727
11
10
1.1000
15
8
1.8750
0.6000
Matrix Algebra
(29/51)
Matrix Algebra
(30/51)
Jacobi Iteration
(k1)
n
X
a x
(k)
ij j
+ bi
xi =
aii
aii
2 a
11
6
6
6 0
6
6 .
6
4 .
.
0
for i = 1, ..., n
or
Matrix Algebra
a1n
a2n
..
.
ann
j=1
j6=i
a11 a12 . . .
a21 a22 . . .
..
..
.
.
an1 an2 . . .
A=
Ax = b
(1 of 2)
(31/51)
0
a22
..
.
...
...
.
..
..
0
2
0
7 6
7 6
7 6 a21
76
7 6
.
7 6
.
5 4
.
0
an1
ann
0
.
.
.
...
..
...
..
.
...
..
an,n1
0
.
.
.
.
.
.
0
2 0
.
.
.
.
.
.
0
7 6
7 6
7 6
76
7 6
7 6
5 4
a12
...
..
..
..
...
.
...
a1n
.
.
.
an1,n
0
7
7
7
7
7
7
5
A=D LU
Joe Mahaffy, hmahaffy@math.sdsu.edui
Matrix Algebra
(32/51)
(2 of 2)
Notes on Solving Ax = b
x = D 1 (L + U)x + D 1 b
Matrix Algebra
(33/51)
Matrix Algebra
(34/51)
Gauss-Seidel Iteration
(k)
xi
i1
X
j=1
(k)
aij xj
aii
n
X
j=i+1
(k1)
aij xj
aii
+ bi
aii
for i = 1, ..., n
Matrix Algebra
(k)
x2
(k)
x3
(k)
x4
1 x (k1)
10 2
=
=
=
=
1 x (k)
11 1
(k)
15 x1
1 x (k)
10 2
3 x (k)
8 2
1 x (k1)
5 3
1 x (k1)
11 3
1 x (k)
8 3
3 x (k1)
11 4
1 x (k1)
10 4
3
5
25
11
11
10
15
8
(k)
x1
(35/51)
Matrix Algebra
(36/51)
Convergence
(D L)x(k) = Ux(k1) + b
The Gauss-Seidel iterative method becomes
(k)
= (D L)
|
{z
Tg
or
(k1)
Ux
}
+ (D L)
{z
|
cg
b
}
x(k) = Tg x(k1) + cg
Matrix Algebra
(37/51)
Matrix Algebra
Convergence Theorems
(1 of 3)
Convergence Theorems
(2 of 3)
Theorem
For any x(0) Rn , the sequence {x(k) }
k=0 defined by
x(k) = T x(k1) + c,
Lemma
If the spectral radius, (T ) satisfies (T ) < 1, then (I T )1
exists and
1
(I T )
= I + T + T + ... =
x = Tx + c
k = 1, 2, ...
j=0
(38/51)
(39/51)
The proof of the theorem helps establish error bounds from the
iterative methods.
Joe Mahaffy, hmahaffy@math.sdsu.edui
Matrix Algebra
(40/51)
Convergence Theorems
(3 of 3)
Corollary
If ||T || < 1 for any natural matrix norm and c is a given vector,
then the sequence {x(k) }
k=0 defined by
(k)
(k1)
= Tx
+ c,
x(k) = Tj x(k1) + cj ,
where Tj = D 1 (L + U).
The Gauss-Seidel method is given by:
k = 1, 2, ...
x(k) = Tg x(k1) + cg ,
where Tg = (D L)1 U.
||T ||k
1 ||T ||k
||x(1) x(0) ||
Matrix Algebra
(Tj ) < 1
(41/51)
or
(Tg ) < 1.
Matrix Algebra
(42/51)
Rate of Convergence
Theorem
Definition
The n n matrix A is said to be strictly diagonally dominant
when
n
X
|aii | >
|aij |
j=1
j6=i
Matrix Algebra
(43/51)
Matrix Algebra
(44/51)
Residuals
Theorem (Stein-Rosenberg)
If aik < 0 for each i 6= k and aii > 0 for each i = 1, ...n, then one
and only one of the following hold:
(a) 0 (Tg ) < (Tj ) < 1,
(b) 1 < (Tj ) < (Tg ),
(c) (Tj ) = (Tg ) = 0,
(d) (Tj ) = (Tg ) = 1.
Part a implies that when one method converges, then both
converge with the Gauss-Seidel method converging faster.
Part b implies that when one method diverges, then both diverge
with the Gauss-Seidel divergence being more pronounced.
Joe Mahaffy, hmahaffy@math.sdsu.edui
Matrix Algebra
(45/51)
Definition
Suppose that x Rn is an approximation to the solution of the
linear system, Ax = b. The residual vector for x with respect to
this system is r = b Ax.
We want residuals to converge as rapidly as possible to 0.
(k)
The Gauss-Seidel method chooses xi+1 so that the i th component
(k)
of ri+1 is zero.
Making one coordinate zero is often not the optimal way to reduce
(k)
the norm of the residual, ri+1 .
SOR Method
n
i1
X
X
1
(k1)
(k)
(k)
aij xj
aij xj
bi
xi =
aii
for i = 1, ..., n
j=i+1
j=1
We modify this to
(k)
xi
(46/51)
xi
Matrix Algebra
(k1)
= xi
(k1)
= xi
rii
aii
rii
aii
i1
n
X
X
(k)
(k1)
(k)
(k1)
xi = (1 )xi
+
aij xj
aij xj
bi
aii
j=1
Matrix Algebra
(47/51)
Matrix Algebra
j=i+1
(48/51)
SOR Theorems
i1
X
j=1
(k)
aij xj
= (1
(k1)
)aii xi
n
X
j=i+1
(k1)
aij xj
+ bi
Theorem (Kahan)
If aii 6= 0 for each i = 1, ..., n, then (T ) | 1|.
This implies that the SOR method can converge only if 0 < < 2.
Theorem (Ostrowski-Reich)
or
Matrix Algebra
(49/51)
SOR Theorems
Theorem
If A is positive definite and tridiagonal, then (Tg ) = [(Tj )]2 < 1
and the optimal choice of for the SOR method is
=
2
p
.
1 + 1 [(Tj )]2
Matrix Algebra
(51/51)
Matrix Algebra
(50/51)