師大
Tsung-Ming Huang
Department of Mathematics National Taiwan Normal University, Taiwan
March 22, 2009
師大
Outline
1 Krylov decompositions
Householder transformation Arnoldi decompositions Lanczos decompositions Krylov decompositions
Computation of refined and Harmonic Ritz vectors
2 Restarted Arnoldi method
The implicitly restarted Arnoldi method Krylov-Schur restarting
3 The Lanczos Algorithm
師大 Householder transformation
Definition
A Householder transformation or elementary reflector is a matrix of
H = I − uu∗ where kuk2 =√
2.
Note that H is Hermitian and unitary.
Theorem
Let x be a vector such that kxk2 = 1and x1 is real and nonnegative. Let
u = (x + e1)/√ 1 + x1. Then
Hx = (I − uu∗)x = −e1.
師大 Householder transformation
Proof:
I − uu∗x = x − (u∗x)u = x − x∗x + x1
√1 + x1 · x + e1
√1 + x1
= x − (x + e1) = −e1
Theorem
Let x be a vector with x16= 0. Let u = ρkxkx
2 + e1 q1 + ρkxkx1
2
,
where ρ = ¯x1/|x1|. Then
Hx = − ¯ρkxk2e1.
師大 Householder transformation
Proof: Since
[ ¯ρx∗/kxk2+ eT1][ρx/kxk2+ e1]
= ρρ + ρx¯ 1/kxk2+ ¯ρ¯x1/kxk2+ 1
= 2[1 + ρx1/kxk2], it follows that
u∗u = 2 ⇒ kuk2=√ 2 and
u∗x = ρkxk¯ 2+ x1
q1 + ρkxkx1
2
.
師大 Householder transformation
Hence,
Hx = x − (u∗x)u = x − ρkxk¯ 2+ x1
q1 + ρkxkx1
2
ρkxkx
2 + e1
q1 + ρkxkx1
2
=
"
1 −( ¯ρkxk2+ x1)kxkρ
2
1 + ρkxkx1
2
#
x −ρkxk¯ 2+ x1
1 + ρkxkx1
2
e1
= −ρkxk¯ 2+ x1
1 + ρkxkx1
2
e1
= −¯ρkxk2e1.
師大 Householder transformation
Definition
A complex m × n-matrix R = [rij]is called an upper (lower) triangular matrix, if rij = 0for i > j (i < j).
Definition
Given A ∈ Cm×n, Q ∈ Cm×m unitary and R ∈ Cm×nupper triangular such that A = QR. Then the product is called a QR-factorization of A.
Theorem
Any complex m × n matrix A can be factorized by the product A = QR, where Q is m × m-unitary. R is m × n upper triangular.
師大 Householder transformation
Proof: Let A(0) = A = [a(0)1 |a(0)2 | · · · |a(0)n ]. Find Q1 = (I − 2w1w∗1)such that Q1a(0)1 = ce1. Then
A(1) = Q1A(0)= [Q1a(0)1 , Q1a(0)2 , · · · , Q1a(0)n ]
=
c1 ∗ · · · ∗ 0
... a(1)2 · · · a(1)n
0
. (1)
Find Q2=
1 0
0 I − w2w∗2
such that (I − 2w2w∗2)a(1)2 = c2e1. Then
A(2)= Q2A(1)=
c1 ∗ ∗ · · · ∗ 0 c2 ∗ · · · ∗ 0 0
... ... a(2)3 · · · a(2)n 0 0
.
師大 Householder transformation
We continue this process. Then after l = min(m, n) steps A(l) is an upper triangular matrix satisfying
A(l−1)= R = Ql−1· · · Q1A.
Then A = QR, where Q = Q∗1· · · Q∗l−1. Theorem
Let A be a nonsingular n × n matrix. Then the QR- factorization is essentially unique. That is, if A = Q1R1 = Q2R2, then there is a unitary diagonal matrix D = diag(di)with |di| = 1 such that Q1 = Q2Dand DR1 = R2.
Proof: Let A = Q1R1 = Q2R2. Then Q∗2Q1= R2R−11 = Dmust be a diagonal unitary matrix.
師大 Arnoldi decompositions
Suppose that the columns of Kk+1 are linearly independent and let
Kk+1= Uk+1Rk+1
be the QR factorization of Kk+1. Then the columns of Uk+1 are results of successively orthogonalizing the columns of Kk+1. Theorem
Let ku1k2= 1and the columns of Kk+1(A, u1)be linearly independent. Let Uk+1 = [ u1 · · · uk+1 ]be the Q-factor of Kk+1. Then there is a (k + 1) × k unreduced upper Hessenberg matrix ˆHk such that
AUk= Uk+1Hˆk. (2)
Conversely, if Uk+1is orthonormal and satisfies (2), where ˆHk
is a (k + 1) × k unreduced upper Hessenberg matrix, then Uk+1 is the Q-factor of Kk+1(A, u1).
師大 Arnoldi decompositions
Proof: (“⇒”) Let Kk= UkRk be the QR factorization and Sk= Rk−1. Then
AUk= AKkSk = Kk+1
0 Sk
= Uk+1Rk+1
0 Sk
= Uk+1Hˆk, where
Hˆk= Rk+1
0 Sk
.
It implies that ˆHkis a (k + 1) × k Hessenberg matrix and hi+1,i = ri+1,i+1sii= ri+1,i+1
rii . Thus by the nonsingularity of Rk, ˆHkis unreduced.
(“⇐”) If k = 1, then
Au1 = h11u1+ h21u2 ⇒ u2 = −h11
h21 u1+ 1 h21Au1.
師大 Arnoldi decompositions
Since [ u1 u2 ]is orthonormal and u2 is a linear combination of u1 and Au1, [ u1 u2 ]is the Q-factor of K2.
Assume Uk is the Q-factor of Kk. If we partition Hˆk =
Hˆk−1 hk
0 hk+1,k
, then from (2)
Auk = Ukhk+ hk+1,kuk+1.
Thus uk+1is a linear combination of Auk and the columns of Uk. Hence Uk+1is the Q-factor of Kk+1.
師大 Arnoldi decompositions
Definition
Let Uk+1∈ Cn×(k+1)be orthonormal. If there is a (k + 1) × k unreduced upper Hessenberg matrix ˆHk such that
AUk = Uk+1Hˆk, (3)
then (3) is called an Arnoldi decomposition of order k. If ˆHkis reduced, we say the Arnoldi decomposition is reduced.
Partition
Hˆk=
Hk
hk+1,keTk
, and set
βk= hk+1,k. Then (3) is equivalent to
AUk= UkHk+ βkuk+1eTk.
師大 Arnoldi decompositions
Theorem
Suppose the Krylov sequence Kk+1(A, u1)does not terminate at k + 1. Then up to scaling of the columns of Uk+1, the Arnoldi decomposition of Kk+1is unique.
Proof: Since the Krylov sequence Kk+1(A, u1)does not terminate at k + 1, the columns of Kk+1(A, u1)are linearly independent. By Theorem 8, there is an unreduced matrix Hk and βk6= 0 such that
AUk= UkHk+ βkuk+1eTk, (4) where Uk+1= [Ukuk+1]is an orthonormal basis for
Kk+1(A, u1). Suppose there is another orthonormal basis U˜k+1= [ ˜Uku˜k+1]for Kk+1(A, u1), unreduced matrix ˜Hkand β˜k6= 0 such that
A ˜Uk= ˜UkH˜k+ ˜βku˜k+1eTk.
師大 Arnoldi decompositions
Then we claim that
U˜kHuk+1 = 0.
For otherwise there is a column ˜uj of ˜Uksuch that
˜
uj = αuk+1+ Uka, α 6= 0.
Hence
A˜uj = αAuk+1+ AUka
which implies that A˜uj contains a component along Ak+1u1. Since the Krylov sequence Kk+1(A, u1)does not terminate at k + 1, we have
Kk+2(A, u1) 6= Kk+1(A, u1).
Therefore, A˜uj lies in Kk+2(A, u1)but not in Kk+1(A, u1)which is a contradiction.
Since Uk+1 and ˜Uk+1are orthonormal bases for Kk+1(A, u1) and ˜UkHuk+1= 0, it follows that
師大 Arnoldi decompositions
R(Uk) = R( ˜Uk) and UkHu˜k+1 = 0, that is
Uk= ˜UkQ for some unitary matrix Q. Hence
A( ˜UkQ) = ( ˜UkQ)(QHH˜kQ) + ˜βku˜k+1(eTkQ), or
AUk= Uk(QHH˜kQ) + ˜βku˜k+1eTkQ. (5) On premultiplying (4) and (5) by UkH, we obtain
Hk = UkHAUk = QHH˜kQ.
Similarly, premultiplying by uHk+1, we obtain βkeTk = uHk+1AUk = ˜βk(uHk+1u˜k+1)eTkQ.
師大 Arnoldi decompositions
It follows that the last row of Q is ωkeTk, where |ωk| = 1. Since the norm of the last column of Q is one, the last column of Q is ωkek. Since Hkis unreduced, it follows from the implicit Q theorem that
Q =diag(ω1, · · · , ωk), |ωj| = 1, j = 1, . . . , k.
Thus up to column scaling Uk = ˜UkQis the same as ˜Uk. Subtracting (5) from (4), we find that
βkuk+1 = ωkβ˜ku˜k+1
so that up to scaling uk+1and ˜uk+1are the same.
師大 Arnoldi decompositions
Theorem
Let the orthonormal matrix Uk+1satisfy AUk= Uk+1Hˆk,
where ˆHkis Hessenberg. Then ˆHkis reduced if and only if R(Uk)contains an eigenspace of A.
Proof: (“⇒”) Suppose that ˆHkis reduced, say that hj+1,j= 0.
Partition Hˆk=
H11 H12 0 H22
and Uk= [ U11 U12 ], where H11is an j × j matrix and U11is consisted the first j columns of Uk+1. Then
A[ U11 U12 ] = [ U11 U12 uk+1 ]
H11 H12
0 H22
.
師大 Arnoldi decompositions
It implies that
AU11= U11H11
so that U11is an eigenbasis of A.
(“⇐”) Suppose that A has an eigenspace that is a subset of R(Uk)and ˆHkis unreduced. Let (λ, Ukw)for some w be an eigenpair of A. Then
0 = (A − λI)Ukw = (Uk+1Hˆk− λUk)w
=
Uk+1Hˆk− λUk+1
I 0
w = Uk+1Hˆλw, where
Hˆλ=
Hk− λI hk+1,keTk
.
Since ˆHλis unreduced, the matrix Uk+1Hˆλ is of full column rank. It follows that w = 0 which is a contradiction.
師大 Arnoldi decompositions
Write the k-th column of the Arnoldi decomposition AUk= UkHk+ βkuk+1eTk,
in the form
Auk= Ukhk+ βkuk+1. Then from the orthonormality of Uk+1, we have
hk= UkHAuk. Since
βkuk+1= Auk− Ukhk
and kuk+1k2 = 1, we must have
βk= kAuk− Ukhkk2 and
uk+1 = βk−1(Auk− Ukhk).
師大 Arnoldi decompositions
Algorithm (Arnoldi process) 1. for k = 1, 2, . . .
2. hk = UkHAuk 3. v = Auk− Ukhk
4. βk= hk+1,k = kvk2
5. uk+1 = v/βk 6. Hˆk=
Hˆk−1 hk 0 hk+1,k
7. end for k
The computation of uk+1 is actually a form of the well-known Gram-Schmidt algorithm.
In the presence of inexact arithmetic cancelation in statement 3 can cause it to fail to produce orthogonal vectors.
The cure is process called reorthogonalization.
師大 Arnoldi decompositions
Algorithm (Reorthogonalized Arnoldi process) for k = 1, 2, . . .
hk= UkHAuk
v = Auk− Ukhk w = UkHv hk= hk+ w v = v − Ukw βk= hk+1,k= kvk2 uk+1= v/βk
Hˆk=
Hˆk−1 hk 0 hk+1,k
end for k
師大 Lanczos decompositions
Let A be Hermitian and let
AUk= UkTk+ βkuk+1eTk (6) be an Arnoldi decomposition. Since Tkis upper Hessenberg and Tk= UkHAUkis Hermitian, it follows that Tkis tridiagonal and can be written in the form
Tk =
α1 β¯1
β1 α2 β¯2
β2 α3 β¯3 . .. ... . ..
βk−2 αk−1 β¯k−1 βk−1 αk
.
Equation (6) is called a Lanczos decomposition. The first column of (6) is
Au1= α1u1+ β1u2,
師大 Lanczos decompositions
or
u2 = Au1− α1u1
β1 .
From the orthonormality of u1and u2, it follows that α1= uH1 Au1
and
β1 = kAu1− α1u1k2.
More generality, from the j-th column of (6) we get the relation uj+1= Auj− αjuj− ¯βj−1uj−1
βj where
αj = uHj Auj and βj = kAuj− αjuj− ¯βj−1uj−1k2. This is the Lanczos three-term recurrence.
師大 Lanczos decompositions
Algorithm (Lanczos recurrence)
Let u1 be given. This algorithm generates the Lanczos decomposition
AUk= UkTk+ βkuk+1eTk where Tkis Hermitian tridiagonal.
1. u0 = 0; β0 = 0;
2. for j = 1 to k 3. uj+1 = Auj 4. αj = uHj uj+1
5. v = uj+1− αjuj− βj−1uj−1
6. βj = kvk2 7. uj+1 = v/βj
8. end for j
師大 Krylov decompositions
Definition
Let u1, u2, . . . , uk+1be linearly independent and let Uk= [u1 · · · uk].
AUk= UkBk+ uk+1bHk+1
is called a Krylov decomposition of order k. R(Uk+1)is called the space spanned by the decomposition. Two Krylov
decompositions spanning the same spaces are said to be equivalent.
Let [V v]H be any left inverse for Uk+1. Then it follows that Bk = VHAUk and bHk+1 = vHAUk.
In particular, Bk is a Rayleigh quotient of A.
師大 Krylov decompositions
Let
AUk= UkBk+ uk+1bHk+1
be a Krylov decomposition and Q be nonsingular. That is AUk= Uk+1Bˆk with Bˆk=
Bk
bHk+1
. (7)
Then we get an equivalent Krylov decomposition of (7) in the form
A(UkQ) =
Uk+1
Q 0 0 1
Q 0
0 1
−1
BˆkQ
!
=
UkQ uk+1
Q−1BkQ bHk+1Q
= (UkQ)(Q−1BQ) + uk+1(bHk+1Q). (8) The two Krylov decompositions (7) and (8) are said to be similar.
師大 Krylov decompositions
Let
γ ˜uk+1= uk+1− Uka.
Since u1, . . . , uk, uk+1are linearly independent, we have γ 6= 0.
Then it follows that
AUk= Uk(Bk+ abHk+1) + ˜uk+1(γbHk+1).
Since R([Ukuk+1]) = R([Uku˜k+1]), this Krylov decomposition is equivalent to (7).
Theorem
Every Krylov decomposition is equivalent to a (possibly reduced) Arnoldi decomposition.
Proof: Let
AU = U B + ubH be a Krylov decomposition and let
師大 Krylov decompositions
U = ˜U R be the QR factorization of U . Then
A ˜U = A(U R−1) = (U R−1)(RBR−1) + u(bHR−1) ≡ ˜U ˜B + u˜bH is an equivalent decomposition. Let
˜
u = γ−1(u − U a)
be a vector with k˜uk2 = 1such that UHu = 0. Then˜ A ˜U = ˜U ( ˜B + a˜bH) + ˜u(γ˜bH) ≡ ˜U ˆB + ˜uˆbH
is an equivalent orthonormal Krylov decomposition. Let Q be a unitary matrix such that
ˆbHQ = kˆbk2eTk
and QHBQˆ is upper Hessenberg. Then the equivalent decomposition
師大 Krylov decompositions
A ˆU ≡ A( ˜U Q) = ( ˜U Q)(QHBQ) + ˜ˆ u(ˆbHQ) ≡ ˆU ¯B + kˆbk2ueˆ Tk is a possibly reduced Arnoldi decomposition where
UˆHu = Qˆ HU˜Hu = Q˜ HR−HUHu = 0.˜
Reduction to Arnoldi form Let
AU = U B + ubH
be the Krylov decomposition with B ∈ Ck×k. Let H1 be a Householder transformation such that
bHH1 = βek.
師大 Krylov decompositions
Reduce H1HBH1 to Hessenberg form as the following illustration:
B :=
× × × ×
× × × ×
× × × ×
× × × ×
⇒B := BH2=
⊗ ⊗ ⊗ ×
⊗ ⊗ ⊗ ×
⊗ ⊗ ⊗ × 0 0 ⊗ ×
⇒ B := H2HB =
+ + + + + + + + + + + + 0 0 ⊗ ×
⇒B := BH3=
⊕ ⊕ + +
⊕ ⊕ + + 0 ⊕ + + 0 0 ⊗ ×
⇒ B := H3HB =
∗ ∗ ∗ ∗
∗ ∗ ∗ ∗ 0 ⊕ + + 0 0 ⊗ ×
師大 Krylov decompositions
Let
Q = H1H2· · · Hk−1. Then QHBQis upper Hessenberg and
bHQ = (bHH1)(H2· · · Hk−1) = βeTk(H2· · · Hk−1) = βeTk. Therefore, the Krylov decomposition
A(U Q) = (U Q)(QHBQ) + βueTk (9) is an Arnoldi decomposition.
師大 Computation of refined and Harmonic Ritz vectors
Assume that
AU = U B + ubH is a n orthonormal Krylov decomposition.
Refined Ritz vectors
If µ is a Ritz value, then the refined Ritz vector associated with µis the right singular vector of (A − µI)U whose singular value is smallest. From (9), we have
(A − µI)U = U (B − µI) + ubH =
U u
B − µI bH
≡
U u Bˆµ.
Since [U u] is orthonormal, the right singular vectors of (A − µI)Uare the same as the right singular vectors of ˆBµ. Thus the computation of a refined Ritz vector can be reduced to computing the singular value decomposition of ˆBµ.
師大 Computation of refined and Harmonic Ritz vectors
Harmonic Ritz vectors
Recall: (κ + δ, U w) is a harmonic Ritz pair if
UH(A − κI)H(A − κI)U w = δUH(A − κI)HU w.
Since
(A − κI)U = U (B − κI) + ubH, we have
UH(A − κI)H(A − κI)U = (B − κI)H(B − κI) + bbH and
UH(A − κI)HU = (B − κI)H. It follows that
(B − κI)H(B − κI) + bbH w = δ(B − κI)Hw which is a small generalized eigenvalue problem.
師大
Let
AUk= UkHk+ βkuk+1eTk be an Arnoldi decomposition.
1 In principle, we can keep expanding the Arnoldi decomposition until the Ritz pairs have converged.
2 Unfortunately, it is limited by the amount of memory to storage of Uk.
3 Restarted the Arnoldi process once k becomes so large that we cannot store Uk.
Implicitly restarting method Krylov-Schur decomposition
師大 The implicitly restarted Arnoldi method
Choose a new starting vector for the underlying Krylov sequence
A natural choice would be a linear combination of Ritz vectors that we are interested in.
Filter polynomials
Assume A has a complete system of eigenpairs (λi, xi)and we are interested in the first k of these eigenpairs. Expand u1in the form
u1 =
k
X
i=1
γixi+
n
X
i=k+1
γixi. If p is any polynomial, we have
p(A)u1 =
k
X
i=1
γip(λi)xi+
n
X
i=k+1
γip(λi)xi.
師大 The implicitly restarted Arnoldi method
Choose p so that the values p(λi) (i = k + 1, . . . , n)are small compared to the values p(λi) (i = 1, . . . , k).
Then p(A)u1is rich in the components of the xi that we want and deficient in the ones that we do not want.
pis called a filter polynomial.
Suppose we have Ritz values µ1, . . . , µm and µk+1, . . . , µm are not interesting. Then take
p(t) = (t − µk+1) · · · (t − µm).
Implicitly restarted Arnoldi: Let
AUm = UmHm+ βmum+1eTm (10) be an Arnoldi decomposition with order m. Choose a filter polynomial p of degree m − k and use the implicit restarting process to reduce the decomposition to a decomposition
A ˜Uk= ˜UkH˜k+ ˜βku˜k+1eTk of order k with starting vector p(A)u1.
師大 The implicitly restarted Arnoldi method
Let κ1, . . . , κm be eigenvalues of Hm and suppose that
κ1, . . . , κm−kcorrespond to the part of the spectrum we are not interested in. Then take
p(t) = (t − κ1)(t − κ2) · · · (t − κm−k).
The starting vector p(A)u1 is equal to
p(A)u1 = (A − κm−kI) · · · (A − κ2I)(A − κ1I)u1
= (A − κm−kI) [· · · [(A − κ2I) [(A − κ1I)u1]]] . In the first, we construct an Arnoldi decomposition with starting vector (A − κ1I)u1. From (10), we have
(A − κ1I)Um = Um(Hm− κ1I) + βmum+1eTm (11)
= UmQ1R1+ βmum+1eTm, where
Hm− κ1I = Q1R1
is the QR factorization of Hm− κ1I. Postmultiplying by Q1,
師大 The implicitly restarted Arnoldi method
we get
(A − κ1I)(UmQ1) = (UmQ1)(R1Q1) + βmum+1(eTmQ1).
It implies that
AUm(1) = Um(1)Hm(1)+ βmum+1b(1)Hm+1, where
Um(1) = UmQ1, Hm(1)= R1Q1+ κ1I, b(1)Hm+1 = eTmQ1. (Hm(1): one step of single shifted QR algorithm)
師大 The implicitly restarted Arnoldi method
Theorem
Let Hm be an unreduced Hessenberg matrix. Then Hm(1)has the form
Hm(1)=
"
Hˆm(1) hˆ12 0 κ1
# ,
where ˆHm(1)is unreduced.
Proof: Let
Hm− κ1I = Q1R1 be the QR factorization of Hm− κ1I with
Q1= G(1, 2, θ1) · · · G(m − 1, m, θm−1)
where G(i, i + 1, θi)for i = 1, . . . , m − 1 are Given rotations.
師大 The implicitly restarted Arnoldi method
Since Hmis unreduced upper Hessenberg, i.e., the subdiagonal elements of Hm are nonzero, we get
θi 6= 0 for i = 1, . . . , m − 1 (12) and
(R1)ii6= 0 for i = 1, . . . , m − 1. (13) Since κ1 is an eigenvalue of Hm, we have that Hm− κ1I is singular and then
(R1)mm = 0. (14)
Using the results of (12), (13) and (14), we get
Hm(1) = R1Q1+ κ1I = R1G(1, 2, θ1) · · · G(m − 1, m, θm−1) + κ1I
=
"
Hˆm(1) ˆh12 0 κ1
# , where ˆHm(1)is unreduced.
師大 The implicitly restarted Arnoldi method
Remark
Um(1) is orthonormal.
Since Hm is upper Hessenberg and Q1 is the Q-factor of the QR factorization of Hm− κ1I, it implies that Q1 and Hm(1) are also upper Hessenberg.
The vector b(1)Hm+1 = eTmQ1 has the form b(1)Hm+1 =
h
0 · · · 0 q(1)m−1,m q(1)m,m
i
;
i.e., only the last two components of b(1)m+1are nonzero.
師大 The implicitly restarted Arnoldi method
For on postmultiplying (11) by e1, we get
(A − κ1I)u1= (A − κ1I)(Ume1) = Um(1)R1e1 = r11(1)u(1)1 . Since Hm is unreduced, r(1)11 is nonzero. Therefore, the first column of Um(1)is a multiple of (A − κ1I)u1.
By the definition of Hm(1), we get
Q1Hm(1)QH1 = Q1(R1Q1+ κ1I)QH1 = Q1R1+ κ1I = Hm. Therefore, κ1, κ2, . . . , κmare also eigenvalues of Hm(1).
師大 The implicitly restarted Arnoldi method
Similarly,
(A − κ2I)Um(1) = Um(1)(Hm(1)− κ2I) + βmum+1b(1)Hm+1 (15)
= Um(1)Q2R2+ βmum+1b(1)Hm+1, where
Hm(1)− κ2I = Q2R2
is the QR factorization of Hm(1)− κ2I with upper Hessenberg matrix Q2. Postmultiplying by Q2, we get
(A − κ2I)(Um(1)Q2) = (Um(1)Q2)(R2Q2) + βmum+1(b(1)Hm+1Q2).
It implies that
AUm(2) = Um(2)Hm(2)+ βmum+1b(2)Hm+1, where
Um(2) ≡ Um(1)Q2
is orthonormal,
師大 The implicitly restarted Arnoldi method
Hm(2) ≡ R2Q2+ κ2I =
Hm−2(2) ∗ ∗ κ2 ∗ κ1
is upper Hessenberg with unreduced matrix Hm−2(2) and b(2)Hm+1 ≡ b(1)Hm+1Q2 = qm−1,m(1) eHm−1Q2+ qm,m(1) eTmQ2
=
0 · · · 0 × × × . For on postmultiplying (15) by e1, we get
(A − κ2I)u(1)1 = (A − κ2I)(Um(1)e1) = Um(2)R2e1 = r11(2)u(2)1 . Since Hm(1)is unreduced, r(2)11 is nonzero. Therefore, the first column of Um(2)is a multiple of
(A − κ2I)u(1)1 = 1/r(1)11(A − κ2I)(A − κ1I)u1.
師大 The implicitly restarted Arnoldi method
Repeating this process with κ3, . . . , κm−k, the result will be a Krylov decomposition
AUm(m−k)= Um(m−k)Hm(m−k)+ βmum+1b(m−k)Hm+1 with the following properties
1 Um(m−k)is orthonormal.
2 Hm(m−k)is upper Hessenberg.
3 The first k − 1 components of b(m−k)Hm+1 are zero.
4 The first column of Um(m−k) is a multiple of (A − κ1I) · · · (A − κm−kI)u1.
師大 The implicitly restarted Arnoldi method
Corollary
Let κ1, . . . , κm be eigenvalues of Hm. If the implicitly restarted QRstep is performed with shifts κ1, . . . , κm−k, then the matrix Hm(m−k) has the form
Hm(m−k)=
"
Hkk(m−k) Hk,m−k(m−k) 0 T(m−k)
# ,
where T(m−k) is an upper triangular matrix with Ritz value κ1, . . . , κm−kon its diagonal.
師大 The implicitly restarted Arnoldi method
For k = 3 and m = 6, A
u u u u u u
=
u u u u u u
× × × × × ×
× × × × × ×
0 × × × × ×
0 0 × × × ×
0 0 0 × × ×
0 0 0 0 × ×
+u
0 0 q q q q .
Therefore, the first k columns of the decomposition can be written in the form
AUk(m−k)= Uk(m−k)Hkk(m−k)+ hk+1,ku(m−k)k+1 eTk + βkqmkum+1eTk, where Uk(m−k)consists of the first k columns of Um(m−k), Hkk(m−k) is the leading principal submatrix of order k of Hm(m−k), and qkm is from the matrix Q = Q1· · · Qm−k.
師大 The implicitly restarted Arnoldi method
Hence if we set
U˜k = Uk(m−k), H˜k = Hkk(m−k),
β˜k = khk+1,ku(m−k)k+1 + βkqmkum+1k2,
˜
uk+1 = β˜k−1(hk+1,ku(m−k)k+1 + βkqmkum+1), then
A ˜Uk= ˜UkH˜k+ ˜βku˜k+1eTk
is an Arnoldi decomposition whose starting vector is proportional to (A − κ1I) · · · (A − κm−kI)u1.
Avoid any matrix-vector multiplications in forming the new starting vector.
Get its Arnoldi decomposition of order k for free.
For large n the major cost will be in computing U Q.
師大 Krylov-Schur restarting
If a Krylov decomposition can be partitioned in the form A
U1 U2 = U1 U2
B11 B12 0 B22
+ u
bH1 bH2 , then
AU1 = U1B11+ ubH1 is also a Krylov decomposition.
The process of Krylov-Schur restarting:
Compute the Schur decomposition of the Rayleigh quotient Move the desired eigenvalues to the beginning
Throw away the rest of the decomposition
師大 Krylov-Schur restarting
Exchanging eigenvalues and eigenblocks
• Move an eigenvalue from one place to another.
Let a triangular matrix be partitioned in the form
R ≡
A B C
0 S D
0 0 E
,
where
S =
s11 s12 0 s22
. Suppose that Q is a unitary matrix such that
QHSQ =
s22 sˆ12 0 s11
,
師大 Krylov-Schur restarting
then the eigenvalues s11and s22in the matrix
diag I QH I R diag I Q I =
A BQ C
0 QHSQ QHD
0 0 E
will have traded places.
• How to find such unitary matrix Q?
Let
S =
S11 S12 0 S22
,
where Siiis of order ni(i = 1, 2). Therefore are four cases to consider.
1 n1 = 1, n2= 1.
2 n1 = 2, n2= 1.
3 n1 = 1, n2= 2.
4 n1 = 2, n2= 2.
師大 Krylov-Schur restarting
For the first two cases (n1 = 1, n2 = 1or n1= 2, n2= 1):
Let
S =
S11 s12 0 s22
,
where S11is of order one or two. Let x be a normalized eigenvector corresponding to s22and let Q = [x Y ] be orthogonal. Then
QTSQ =
xT YT
S
x Y =
xTSx xTSY YTSx YTSY
=
s22 sˆT12 0 Sˆ11
.
Note that ˆS11and S11have the same eigenvalues.
師大 Krylov-Schur restarting
For the third case (n1 = 1, n2= 2):
Let
S =
s11 sT12 0 S22
,
where S22is of order two. Let y be a normalized left eigenvector corresponding to s11and let Q = [X y] be orthogonal. Then QTSQ =
XT yT
S
X y =
XTSX XTSy yTSX yTSy
=
Sˆ22 ˆs12
0 s11
.
師大 Krylov-Schur restarting
For the last case (n1= 2, n2 = 2):
Let
S =
S11 S12
0 S22
. Let (S22, X)be an orthonormal eigenpair, i.e.,
SX = X U S22U−1
for some nonsingular U , and let Q = [X Y ] be orthogonal. Then QTSQ =
XTSX XTSY YTSX YTSY
=
XTXU S22U−1 XTSY YTXU S22U−1 YTSY
=
U S22U−1 Sˆ12 0 Sˆ11
.
師大 Krylov-Schur restarting
Question
How to compute the orthonormal eigenbasis X?
Let the eigenbasis be
P I
, where P is to be determined.
Then
S11 S12 0 S22
P I
=
P I
S22. Hence P can be solved from the Sylvester equation
S11P − P S22= −S12.
The orthonormal eigenbasis X can be computed by the QR factorization
P I
=
X Y
R 0
.
師大 Krylov-Schur restarting
The Krylov-Schur cycle Assume A ∈ Cn×n.
1 Write the corresponding Krylov decomposition in the form AUm= UmTm+ βmum+1eTm.
2 Compute the Schur decomposition of Tm, Sm= QHTmQ
where Sm is upper triangular.
3 Transform the decomposition to the form A ˆUm = ˆUmSm+ um+1bHm+1.
4 Select m − k Ritz values and move them to the end of Sm, accumulating the transformations in Q1.
5 Truncate the decomposition, i.e.,
Sk := Sm[1 : k, 1 : k], bHk := bHm+1Q1[:, 1 : k], Uk:= ˆUmQ1[:, 1 : k].
師大 Krylov-Schur restarting
Deflation
We say a Krylov decomposition has been deflated if it can be partitioned in the form
A
U1 U2 = U1 U2
B11 B12 0 B22
+ u
0 bH2 . It implies that
AU1 = U1B11, so that U11spans an eigenspace of A.
師大 Krylov-Schur restarting
Criterion of Deflation:
Theorem
Let
AU = U B + ubH
be an orthonormal Krylov decomposition, and let
[M, ˜U ] = [M, U W ]be an orthonormal pair. Let [W, W⊥]be unitary, and set
B =˜
WH W⊥H
B
W W⊥ ≡
B˜11 B˜12 B˜21 B˜22
and
˜bH = bH
W W⊥ = ˜bH1 ˜bH2 .
師大 Krylov-Schur restarting
Then
kA ˜U − ˜U M k2F = k ˜B21k2F + k˜b1k2F + k ˜B11− M k2F. Proof: Let
U˜ U˜⊥ = U W W⊥ . Then
A ˜U − ˜U M = U BW + ubHW − U W M
= U
W W⊥
WH W⊥H
B
W W⊥
I 0
−
I 0
M
+ubH
W W⊥
I 0
= U˜ U˜⊥
B˜11− M B˜21
+ u˜bH1 = U˜ U˜⊥ u
B˜11− M B˜21
˜bH1
.
師大 Krylov-Schur restarting
Since uHU = 0, we have
uH U˜ U˜⊥ = uHU
W W⊥ = 0.
It implies that [ ˜U , ˜U⊥, u]is an orthonormal matrix. Therefore, kA ˜U − ˜U M k2F = k
B˜11− M B˜21
˜bH1
k2F
= k ˜B21k2F + k˜b1k2F + k ˜B11− M k2F. Suppose that A ˜U − ˜U M is small. Transform the Krylov decomposition to the form
A U˜ U˜⊥ = ˜U U˜⊥
B˜11 B˜12 B˜21 B˜22
+ u ˜bH1 ˜bH2
= U˜ U˜⊥
B˜11 B˜12
0 B˜22
+ u
0 ˜bH2 + ˜U⊥B˜21+ u˜bH1
.
師大 Krylov-Schur restarting
From Theorem 16, we have k
B˜21
˜bH1
kF ≤ kA ˜U − ˜U M kF,
with equality if and only if M = WHBW. Therefore, if the residual norm kA ˜U − ˜U M kF is sufficiently small, we may set B˜21and ˜b1to zero to get the approximate decomposition
A U˜ U˜⊥ ≈ ˜U U˜⊥
B˜11 B˜12 0 B˜22
+ u
0 ˜bH2 . Rational Krylov transformations
Shift-and-invert transformations in Arnoldi’s method is to focus the algorithm on the eigenvalues near the shift κ.
How to do when it needs to use more than one shift?
Restart with a new shift and a new vector
Change a Krylov decomposition from one in (A − κ1I)−1 to one in (A − κ2I)−1.
師大 Krylov-Schur restarting
Suppose we have a Krylov sequence
u, (A − κ1I)−1u, (A − κ1I)−2u, · · · , (A − κ1I)1−ku.
Set v = (A − κ1I)1−ku, then the sequence with its terms in reverse order is
v, (A − κ1I)v, · · · , (A − κ1I)k−1v, so that
Kk[(A − κ1I)−1, u] = Kk[A − κ1I, v].
By the shift invariance of a Krylov sequence Kk[A − κ1I, v] = Kk[A − κ2I, v].
Set
w = (A − κ2I)k−1v, we have
Kk[A − κ2I, v] = Kk[(A − κ2I)−1, w].