Numerical Methods Contents - SAM
Numerical Methods Contents - SAM
Numerical Methods Contents - SAM
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
✬<br />
Residuals r 0 ,...,r m−1 generated in CG iteration, Alg. 4.2.1 applied to Ax = z with x (0) = 0,<br />
provide orthogonal basis for K m (A,z) (, if r k ≠ 0).<br />
✫<br />
✩<br />
✪<br />
Total computational effort for l steps of Lanczos process, if A has at most k non-zero entries per row:<br />
O(nkl)<br />
Inexpensive Ritz projection of Ax = λx onto K m (A,z):<br />
orthogonal matrix<br />
( )<br />
VmAV T r0<br />
m x = λx , V m :=<br />
‖r 0 ‖ ,..., r m−1<br />
∈ R n,m . (5.4.6)<br />
‖r m−1 ‖<br />
Note: Code 5.4.2 assumes that no residual vanishes. This could happen, if z 0 exactly belonged<br />
to the span of a few eigenvectors. However, in practical computations inevitable round-off errors will<br />
always ensure that the iterates do not stay in an invariant subspace of A, cf. Rem. 5.3.7.<br />
recall: residuals generated by short recursions, see Alg. 4.2.1<br />
✬<br />
Lemma 5.4.1 (Tridiagonal Ritz projection from CG residuals).<br />
V T mAV m is a tridiagonal matrix.<br />
✫<br />
✩<br />
✪<br />
Convergence (what we expect from the above considerations) → [13, Sect. 8.5])<br />
In l-th step: λ n ≈ µ (l)<br />
l , λ n−1 ≈ µ (l)<br />
l−1 ,..., λ 1 ≈ µ (l)<br />
1 ,<br />
σ(T l ) = {µ (l)<br />
1 , ...,µ(l) l }, µ (l)<br />
1 ≤ µ (l)<br />
2 ≤ · · · ≤ µ (l)<br />
l .<br />
Proof. Lemma 4.2.5: {r 0 ,...,r l−1 } is an orthogonal basis of K l (A,r 0 ), if all the residuals are nonzero.<br />
As AK l−1 (A,r 0 ) ⊂ K l (A,r 0 ), we conclude the orthogonalityr T mAr j for all j = 0, ...,m−2.<br />
Ôº º<br />
the assertion of the theorem follows. ✷<br />
Since<br />
(V T mAV m<br />
)<br />
ij = rT i−1 Ar j−1 , 1 ≤ i,j ≤ m ,<br />
⎛<br />
⎞<br />
α 1 β 1<br />
β 1 α 2 β 2<br />
β 2 α . 3<br />
..<br />
Vl H .<br />
AV l =<br />
.. . ..<br />
=: T l ∈ K k,k [tridiagonal matrix]<br />
...<br />
⎜<br />
⎟<br />
⎝<br />
... ... β k−1 ⎠<br />
β k−1 α k<br />
Example 5.4.4 (Lanczos process for eigenvalue computation).<br />
A from Ex. 5.4.2<br />
A = gallery(’minij’,100);<br />
|Ritz value−eigenvalue|<br />
10 2<br />
10 1<br />
10 0<br />
10 0<br />
10 −1<br />
10 −2<br />
error in Ritz values<br />
10 −2<br />
10 −4<br />
10 −6<br />
10 −8<br />
Ôº º<br />
10 2 step of Lanzcos process<br />
10 4 step of Lanzcos process<br />
Code 5.4.3: Lanczos process<br />
1 function [ V, alph , bet ] = lanczos (A, k , z0 )<br />
Algorithm for computingV l andT l :<br />
2 V = z0 / norm( z0 ) ;<br />
Lanczos process<br />
3<br />
4<br />
alph=zeros ( k , 1 ) ;<br />
bet = zeros ( k , 1 ) ;<br />
Computational effort/step:<br />
5 for j =1: k<br />
1× A×vector<br />
2 dot products<br />
2 AXPY-operations<br />
1 division<br />
6 p = A∗V ( : , j ) ; alph ( j ) = dot ( p , V ( : , j ) ) ;<br />
7 w = p − alph ( j ) ∗V ( : , j ) ;<br />
8 i f ( j > 1) , w = w − bet ( j −1)∗V ( : , j −1) ; end ;<br />
9 bet ( j ) = norm(w) ; V = [ V,w/ bet ( j ) ] ;<br />
Ôº º<br />
10 end<br />
11 bet = bet ( 1 : end−1) ;<br />
10 −3<br />
10 −4<br />
λ n<br />
λ n−1<br />
λ n−2<br />
λ n−3<br />
Fig. 77<br />
0 5 10 15 20 25 30<br />
Observation:<br />
10 −10<br />
10 −12<br />
10 −14<br />
λ n<br />
λ n−1<br />
λ n−2<br />
λ n−3<br />
Fig. 78<br />
0 5 10 15<br />
same as in Ex. 5.4.2, linear convergence of Ritz values to eigenvalues.<br />
However for A ∈ R 10,10 , a ij = min{i,j} good initial convergence, but sudden “jump” of Ritz values<br />
off eigenvalues!<br />
Conjecture: Impact of roundoff errors, cf. Ex. 4.2.4<br />
Ôº º<br />
✸