11.07.2015 Views

A Cholesky LR algorithm for the positive definite symmetric diagonal ...

A Cholesky LR algorithm for the positive definite symmetric diagonal ...

A Cholesky LR algorithm for the positive definite symmetric diagonal ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A <strong>Cholesky</strong> <strong>LR</strong> <strong>algorithm</strong> <strong>for</strong> <strong>the</strong> <strong>positive</strong> <strong>definite</strong> <strong>symmetric</strong><strong>diagonal</strong>-plus-semiseparable eigenproblemBor PlestenjakDepartment of Ma<strong>the</strong>maticsUniversity of LjubljanaSloveniaEllen Van Camp and Marc Van BarelDepartment of Computer ScienceKatholieke Universiteit LeuvenBelgiumInternational Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 1


Outline• Introduction• <strong>Cholesky</strong> <strong>LR</strong> <strong>algorithm</strong>• Laguerre’s shift• Implementation• Numerical examples• ConclusionsInternational Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 2


Introduction• semiseparable: every submatrix from <strong>the</strong> lower or upper triangular part has rank at most 1.• <strong>diagonal</strong>-plus-semiseparable (DPSS): <strong>the</strong> sum D + S of a <strong>diagonal</strong> D and a semiseparable S.• Givens-vector representation of a DPSS matrix is based on a vector f = [f 1 , . . . , f n ] T , Givens[ ]ci −srotations G i =i, i = 1, . . . , n − 1, and a <strong>diagonal</strong> d = [ds i c 1 , . . . , d n ] T asiD + S =⎡⎤c 1 f 1 + d 1 c 2 s 1 f 1 · · · c n−1 s n−2:1 f 1 s n−1:1 f 1c 2 s 1 f 1 c 2 f 2 + d 2 · · · c n−1 s n−2:1 f 2 s n−1:2 f 2.. . ..,⎢⎥⎣ c n−1 s n−2:1 f 1 c n−1 s n−2:2 f 2 · · · c n−1 f n−1 + d n−1 s n−1 f n−1 ⎦s n−1:1 f 1 s n−1:2 f 2 · · · s n−1 f n−1 f n + d nwhere s a:b = s a s a−1 · · · s b . When <strong>the</strong>y appear, we assume that c n = 1 and s n = 0.• We denoteD + S = diag(d) + Giv(c, s, f).Our goal is to compute <strong>the</strong> smallest (or all) eigenvalues of a s.p.d. DPSS matrix.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 3


MotivationLet A be an n × n <strong>symmetric</strong> matrix. One can find an orthogonal matrix Q such that B = Q T AQis tri<strong>diagonal</strong> in O(n 3 ) flops. Next, <strong>the</strong> eigendecomposition of B is computed in O(n 2 ) flops.Instead of <strong>the</strong> tri<strong>diagonal</strong> structure one can use DPSS matrices.Vandebril, Van Camp, Van Barel, Mastronardi (2004):• For an arbitrary <strong>diagonal</strong> matrix D <strong>the</strong>re exists an orthogonal matrix Q such that Q T AQ = D+Sis a DPSS matrix. The reduction is O(n 2 ) more expensive than in <strong>the</strong> tri<strong>diagonal</strong> case.• The reduction <strong>algorithm</strong> has a Lanczos-Ritz convergence behaviour and per<strong>for</strong>ms a kind of nestedsubspace iteration at each step. A good choice of <strong>the</strong> <strong>diagonal</strong> can compensate slower reduction.Algorithms <strong>for</strong> <strong>the</strong> eigendecomposition of a <strong>symmetric</strong> DPSS matrix:• Chandrasekaran, Gu (2004), in Numer. Math.: divide and conquer,• Mastronardi, Van Camp, Van Barel (2003), tech. report: divide and conquer,• Bini, Gemignani, Pan (2003), tech. report: QR <strong>algorithm</strong>,• Fasino (2004), tech. report: QR <strong>algorithm</strong>,• Van Camp, Delvaux, Van Barel, Vandebril, Mastronardi (2005), tech. report: implicit QR <strong>algorithm</strong>,• Mastronardi, Van Camp, Van Barel, Vandebril (2004), tech. report: computation of eigenvectorsInternational Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 4


<strong>Cholesky</strong> <strong>LR</strong> <strong>algorithm</strong>Let A be a s.p.d. matrix.A 0 = Ak = 0, 1, 2, . . .choose shift σ kA k − σ k I = V k V TkA k+1 = V Tk V k + σ k I(<strong>Cholesky</strong> decomposition, V k is lower-triangular)Two steps of <strong>the</strong> zero shift <strong>Cholesky</strong> <strong>LR</strong> are equivalent to one step of <strong>the</strong> zero shift QR.The shift σ k should be such that A k − σ k I is <strong>positive</strong> <strong>definite</strong>.When applied to a s.p.d. DPSS matrix D + S, <strong>the</strong> shift can be included into <strong>the</strong> <strong>diagonal</strong> part.Grad, Zakrajšek (1972): <strong>Cholesky</strong> <strong>LR</strong> with Laguerre’s shifts <strong>for</strong> <strong>the</strong> <strong>symmetric</strong> tri<strong>diagonal</strong> matrices.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 5


DPSS is invariant to <strong>Cholesky</strong> <strong>LR</strong>Theorem: Let A = Giv(c, s, f) + diag(d) be a s.p.d DPSS matrix.1. If A = V V T is <strong>the</strong> <strong>Cholesky</strong> decomposition of A, <strong>the</strong>n V = tril(Giv(c, s, ˜f)) + diag( ˜d),2. If B = V T V , <strong>the</strong>n B is a s.p.d. DPSS matrix B = Giv(ĉ, ŝ, ̂f) + diag(d).A 4 =V 4 =B 4 =⎡⎢⎣⎡⎢⎣⎡⎢⎣⎤c 1 f 1 + d 1 × × ×c 2 s 1 f 1 c 2 f 2 + d 2 × ×c 3 s 2 s 1 f 1 c 3 s 2 f 2 c 3 f 3 + d 3 ×s 3 s 2 s 1 f 1 s 3 s 2 f 2 s 3 f 3 f 4 + d 4c 1 ˜f1 + ˜d⎤1c 2 s 1 ˜f1 c 2 ˜f2 + ˜d 2c 3 s 2 s 1 ˜f1 c 3 s 2 ˜f2 c 3 ˜f3 + ˜d 3s 3 s 2 s 1 ˜f1 s 3 s 2 ˜f2 s 3 ˜f3 ˜f4 + ˜d 4⎤ĉ 1 ̂f1 + d 1 × × ×ĉ 2 ŝ 1 ̂f1 ĉ 2 ̂f2 + d 2 × ×ĉ 3 ŝ 2 ŝ 1 ̂f1 ĉ 3 ŝ 2 ̂f2 ĉ 3 ̂f3 + d 3 ×ŝ 3 ŝ 2 ŝ 1 ̂f1 ŝ 3 ŝ 2 ̂f2 ŝ 3 ̂f3 ̂f4 + d 4⎥⎦ .⎥⎦ .⎥⎦ .International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 6


<strong>Cholesky</strong> decomposition⎡A 4 =⎢⎣⎤c 1 f 1 + d 1 × × ×c 2 s 1 f 1 c 2 f 2 + d 2 × ×c 3 s 2 s 1 f 1 c 3 s 2 f 2 c 3 f 3 + d 3 × ⎥⎦s 3 s 2 s 1 f 1 s 3 s 2 f 2 s 3 f 3 f 4 + d 4⎡, V 4 =⎢⎣c 1 ˜f1 + ˜d⎤1c 2 s 1 ˜f1 c 2 ˜f2 + ˜d 2c 3 s 2 s 1 ˜f1 c 3 s 2 ˜f2 c 3 ˜f3 + ˜d 3⎥s 3 s 2 s 1 ˜f1 s 3 s 2 ˜f2 s 3 ˜f3 ˜f4 + ˜d⎦4.We compare <strong>the</strong> <strong>diagonal</strong> and <strong>the</strong> main sub<strong>diagonal</strong> of A and V V T :c k f k + d k =c k+1 s k f k =k−1∑(c k s k−1 · · · s j ˜fj ) 2 + (c k ˜fk + ˜d k ) 2 = c 2 k q k + (c k ˜fk + ˜d k ) 2 ,j=1k−1∑c k c k+1 s k (s k−1 · · · s j ˜fj ) 2 c k+1 s k ˜fk (c k ˜fk + ˜d k ) = c k c k+1 s k q k + c k+1 s k ˜fk (c k ˜fk + ˜d k ),j=1whereThe solution isq k :=k−1∑(s k−1 s k−2 · · · s j ˜fj ) 2 .j=1˜f k =f k − c k q k√dk + c k (f k − c k q k ) , ˜dk =d k√ , k = 1, . . . , n.dk + c k (f k − c k q k )International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 7


Algorithm <strong>for</strong> <strong>the</strong> <strong>Cholesky</strong> decompositionIf A = Giv(c, s, f) + diag(d) is s.p.d., <strong>the</strong>n A = V V T <strong>for</strong> V = tril(Giv(c, s, ˜f)) + diag( ˜d).function [ ˜f, ˜d] = <strong>Cholesky</strong>(c, s, f, d)c n = 1q 1 = 0<strong>for</strong> k = 1, . . . , n :z k = f k − c k · q ky k = √ d k + c k · z k˜f k = z k /y k˜d k = d k /y kq k+1 = s 2 k (q k + ˜f 2 k )Flops: 11n + O(1).International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 8


Algorithm <strong>for</strong> <strong>the</strong> <strong>Cholesky</strong> decompositionIf A = Giv(c, s, f) + diag(d) is s.p.d., <strong>the</strong>n A = V V T <strong>for</strong> V = tril(Giv(c, s, ˜f)) + diag( ˜d).function [ ˜f, ˜d] = <strong>Cholesky</strong>(c, s, f, d)c n = 1q 1 = 0<strong>for</strong> k = 1, . . . , n :z k = f k − c k · q ky k = √ d k + c k · z k˜f k = z k /y k˜d k = d k /y kq k+1 = s 2 k (q k + ˜f 2 k )Flops: 11n + O(1).It follows from c k f k + d k = c 2 k q k + (c k ˜fk + ˜d k ) 2 that y k is in fact <strong>the</strong> <strong>diagonal</strong> element of V :c k ˜fk + ˜d k =√d k + c k (f k − c k q k ) = √ d k + c k z k = y k .A negative or zero value under <strong>the</strong> square root appears if A is not <strong>positive</strong> <strong>definite</strong>.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 8


Equations <strong>for</strong> V T VThe product B = V T V is a s.p.d. DPSS matrix. The lower triangular elements of B arewhere k = 1, . . . , n and j > k.b kk = (c k ˜fk + ˜d k ) 2 + (s k ˜fk ) 2 ,b jk = s k s k+1 · · · s j−1 ˜fk ( ˜f j + c j ˜dj ),B = Giv(ĉ, ŝ, ̂f) + diag(d). For k = 1, . . . , n − 1 we haveŝ 2 ̂fn∑2k k = b 2 jk = ˜fn∑2k p k,, where p k = (s k s k+1 · · · s j−1 ) 2 ( ˜f j + c j ˜dj ) 2 .j=k+1For p k we can apply <strong>the</strong> recursion p n = 0 and p k = s 2 kj=k+1(p k+1 + ( ˜f k+1 + c k+1 ˜dk+1 ) 2) .From ĉ k ̂fk + d k = (c k ˜fk + ˜d k ) 2 + (s k ˜fk ) 2 and <strong>the</strong> <strong>Cholesky</strong> decomposition we getĉ k ̂fk = c k z k + (s k ˜fk ) 2 .International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 9


Equations <strong>for</strong> V T VThe product B = V T V is a s.p.d. DPSS matrix. The lower triangular elements of B arewhere k = 1, . . . , n and j > k.b kk = (c k ˜fk + ˜d k ) 2 + (s k ˜fk ) 2 ,b jk = s k s k+1 · · · s j−1 ˜fk ( ˜f j + c j ˜dj ),B = Giv(ĉ, ŝ, ̂f) + diag(d). For k = 1, . . . , n − 1 we haveŝ 2 ̂fn∑2k k = b 2 jk = ˜fn∑2k p k,, where p k = (s k s k+1 · · · s j−1 ) 2 ( ˜f j + c j ˜dj ) 2 .j=k+1For p k we can apply <strong>the</strong> recursion p n = 0 and p k = s 2 kj=k+1(p k+1 + ( ˜f k+1 + c k+1 ˜dk+1 ) 2) .From ĉ k ̂fk + d k = (c k ˜fk + ˜d k ) 2 + (s k ˜fk ) 2 and <strong>the</strong> <strong>Cholesky</strong> decomposition we getĉ k ̂fk = c k z k + (s k ˜fk ) 2 .Now, ĉ k , ŝ k , and ̂f k can be computed fromĉ k ̂fk = c k z k + (s k ˜fk ) 2 ,ŝ k ̂fk = ˜f k√pk .International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 9


Algorithm <strong>for</strong> <strong>the</strong> V T V productLet A = Giv(c, s, f) + diag(d) be s.p.d.=⇒ A = V V T , where V = tril(Giv(c, s, ˜f)) + diag( ˜d),=⇒ B = V T V = Giv(ĉ, ŝ, ̂f) + diag(d).function [ĉ, ŝ, ̂f] = VTV(c, s, ˜f, z)c n = 1̂f n = ( ˜f n + ˜d n ) 2 − d np n = 0<strong>for</strong> k = n − 1, . . . , 2, 1p k = s 2 k(p k+1 + ( ˜f k+1 + c k+1 ˜dk+1 ) 2)[ĉ k , ŝ k , ̂f k ] = Givens(c k z k + s 2 k ˜f 2 k , ˜f k√pk )[c, s, f] = Givens(x, y) returns <strong>the</strong> Givens trans<strong>for</strong>mation such that[ ] [ ]c s x−s c y=[ ] f.0Flops: 16n + O(1) =⇒ one step of <strong>the</strong> zero shift <strong>Cholesky</strong> <strong>LR</strong> <strong>algorithm</strong>: 27n + O(1) flops.As <strong>the</strong> eigenvalues are invariant to <strong>the</strong> sign of ŝ k , k = 1, . . . , n − 1, we do not care about it.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 10


Laguerre’s shiftLet A be a s.p.d. n × n matrix with eigenvalues 0 < λ n ≤ λ n−1 ≤ . . . ≤ λ 1 . We applyLaguerre’s method on <strong>the</strong> characteristic polynomial f(λ) = det(A − λI). If x is an approximation<strong>for</strong> an eigenvalue of A andS 1 (x) =S 2 (x) =n∑i=1n∑i=11λ i − x= − f ′ (x)f(x)1= f ′2 (x) − f(x)f ′′ (x)(λ i − x) 2 f 2 (x)<strong>the</strong>n <strong>the</strong> next approximation ˜x by Laguerre’s method is given by <strong>the</strong> equationn˜x = x +.S 1 (x) +√(n − 1)(nS 2 (x) − S1 2(x)) Two important properties of Laguerre’s method: if λ n is a simple eigenvalue and if x < λ n <strong>the</strong>n• x < ˜x < λ n ,• <strong>the</strong> convergence towards λ n is cubic (linear <strong>for</strong> a multiple eigenvalue).International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 11


Laguerre’s shiftLet A be a s.p.d. n × n matrix with eigenvalues 0 < λ n ≤ λ n−1 ≤ . . . ≤ λ 1 . We applyLaguerre’s method on <strong>the</strong> characteristic polynomial f(λ) = det(A − λI). If x is an approximation<strong>for</strong> an eigenvalue of A andS 1 (x) =S 2 (x) =n∑i=1n∑i=11λ i − x= − f ′ (x)f(x)1= f ′2 (x) − f(x)f ′′ (x)(λ i − x) 2 f 2 (x)= trace((A − xI) −1 ),= trace((A − xI) −2 ),<strong>the</strong>n <strong>the</strong> next approximation ˜x by Laguerre’s method is given by <strong>the</strong> equationn˜x = x +.S 1 (x) +√(n − 1)(nS 2 (x) − S1 2(x)) Two important properties of Laguerre’s method: if λ n is a simple eigenvalue and if x < λ n <strong>the</strong>n• x < ˜x < λ n ,• <strong>the</strong> convergence towards λ n is cubic (linear <strong>for</strong> a multiple eigenvalue).International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 11


Computation of Laguerre’s shiftWe need S 1 (σ) = trace((A − σI) −1 ) and S 2 (σ) = trace((A − σI) −2 ).If A − σI = V V T is <strong>the</strong> <strong>Cholesky</strong> decomposition and W = V −1 , <strong>the</strong>nS 1 (σ) = trace(W T W ) = ‖W ‖ 2 F ,S 2 (σ) = trace(W T W W T W ) = trace(W W T W W T ) = ‖W W T ‖ 2 F .International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 12


Computation of Laguerre’s shiftWe need S 1 (σ) = trace((A − σI) −1 ) and S 2 (σ) = trace((A − σI) −2 ).If A − σI = V V T is <strong>the</strong> <strong>Cholesky</strong> decomposition and W = V −1 , <strong>the</strong>nS 1 (σ) = trace(W T W ) = ‖W ‖ 2 F ,S 2 (σ) = trace(W T W W T W ) = trace(W W T W W T ) = ‖W W T ‖ 2 F .Delvaux, Van Barel (2004): Let V = tril(Giv(c, s, ˜f)) + diag( ˜d) be nonsingular and ˜d i ≠ 0<strong>for</strong> i = 1, . . . , n. Then W = V −1 = tril(Giv(¯c, ¯s, ¯f)) + diag( ¯d), where ¯d −1i = ˜di<strong>for</strong>i = 1, . . . , n.Let us assume that W = tril(Giv(¯c, ¯s, ¯f)) + diag( ¯d). The final <strong>algorithm</strong> will also be correctwhen W is not DPSS, which happens when ˜d i = 0 <strong>for</strong> some i = 2, . . . , n − 1.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 12


Computation of Laguerre’s shiftA 4 =⎡⎢⎣⎤c 1 f 1 + d 1 × × ×c 2 s 1 f 1 c 2 f 2 + d 2 × ×c 3 s 2 s 1 f 1 c 3 s 2 f 2 c 3 f 3 + d 3 ×s 3 s 2 s 1 f 1 s 3 s 2 f 2 s 3 f 3 f 4 + d 4⎥⎦ .Lemma: If A = Giv(c, s, f) + diag(d) is a <strong>symmetric</strong> n × n DPSS matrix <strong>the</strong>n‖A‖ 2 F =n∑(c k f k + d k ) 2 + 2k=1∑n−1k=1s 2 k f 2 k .Lemma: If W = tril(Giv(¯c, ¯s, ¯f)) + diag( ¯d) and ¯c k ≠ 0 <strong>for</strong> k = 2, . . . , n − 1, <strong>the</strong>n‖W W T ‖ 2 F=‖W ‖ 2 F=n∑n−1(W W T ) 2 kk + 2 ∑k=1n∑(W W T ) kk .k=1k=1((W W T ) k+1,k¯c k+1) 2,International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 13


Algorithm <strong>for</strong> <strong>the</strong> Laguerre’s shiftThe following <strong>algorithm</strong> computes S 1 = ‖W ‖ 2 F and S 2 = ‖W W T ‖ 2 F .function [S 1 , S 2 ] = invtrace(c, s, ˜f, ˜d, y)c n = ¯c n = 1<strong>for</strong> k = n − 1, . . . , 2, 1 :r 1 = 0[¯c k , ¯s k ] = Givens(c k¯c k+1 y k+1 , c k+1 s k ˜dk )<strong>for</strong> k = 1, . . . , n − 1β k = −c k+1 s k ˜fk /(¯c k+1 y k y k+1 ) = w k+1,k /¯c k+1ω k = ¯c 2kr k + y −2k= (W W T ) kkξ k = ¯c k¯s k r k + β k /y k = (W W T ) k+1,k /¯c k+1r k+1 = ¯s 2 k r k + β 2 kω n = r n + y −2nS 1 = ∑ nk=1 ω kS 2 = ∑ nk=1 ω2 k + 2 ∑ n−1k=1 ξ2 kFlops: 31n + O(1) flops.The <strong>algorithm</strong> is also correct if ˜d k = 0 <strong>for</strong> some k = 2, . . . , n − 1.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 14


ImplementationA 4 =⎡⎢⎣⎤c 1 f 1 + d 1 × × ×c 2 s 1 f 1 c 2 f 2 + d 2 × ×c 3 s 2 s 1 f 1 c 3 s 2 f 2 c 3 f 3 + d 3 ×s 3 s 2 s 1 f 1 s 3 s 2 f 2 s 3 f 3 f 4 + d 4⎥⎦ .• If |s k | is small enough <strong>for</strong> some k = 1, . . . , n − 1, <strong>the</strong>n we decouple <strong>the</strong> problem into twosmaller problems with matrices A(1 : k, 1 : k) and A(k + 1 : n, k + 1 : n).• If |s n−1 | is small enough, we take f n + d n as an eigenvalue of A and continue with vectorsc(1 : n − 2), s(1 : n − 2), f(1 : n − 1), and d(1 : n − 1). New initial shift is f n + d n .• Even if σ k < λ n , <strong>the</strong> <strong>Cholesky</strong> factorization can fail if <strong>the</strong> difference is too small. This is aproblem since Laguerre’s shifts converge faster to <strong>the</strong> smallest eigenvalue than (A k ) nn . Onestrategy is to relax <strong>the</strong> shift with a factor τ close to 1, <strong>for</strong> instance, τ = 1 − 10 −4 .• The computation of Laguerre’s shift requires more than half of <strong>the</strong> operations <strong>for</strong> one step of <strong>the</strong><strong>Cholesky</strong> <strong>LR</strong>. We can save work by fixing <strong>the</strong> shift once <strong>the</strong> shift improvement is small enough.• The <strong>algorithm</strong> <strong>for</strong> Laguerre’s shift fails if c k = 0 <strong>for</strong> some k = 2, . . . , n − 1. A simple solutionis to perturb c k into some small δ (<strong>for</strong> instance, 10 −20 ) whenever c k = 0.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 15


Numerical examplesNumerical results were obtained with Matlab 7.0 running on a Pentium4 2.6 GHz Windows XP.We compared• a Matlab implementation of <strong>the</strong> <strong>Cholesky</strong> <strong>LR</strong> <strong>algorithm</strong>,• a Matlab implementation of <strong>the</strong> implicit QR <strong>algorithm</strong> <strong>for</strong> DPSS matrices [Van Camp, Delvaux,Van Barel, Vandebril, Mastronardi (2005)],• <strong>the</strong> Matlab function eig.Exact eigenvalues were computed in Ma<strong>the</strong>matica 5 using variable precision.The cutoff criterion <strong>for</strong> both <strong>Cholesky</strong> <strong>LR</strong> and implicit QR is 10 −16 .With <strong>the</strong> maximum relative error we denote max 1≤i≤n|λ i −˜λ i ||λ i |.When <strong>the</strong> initial matrix is not DPSS, <strong>the</strong> reduction into a similar DPSS matrix is done by <strong>the</strong><strong>algorithm</strong> of Vandebril, Van Camp, Van Barel, and Mastronardi (2004).There is a connection between <strong>the</strong> Lanczos method and <strong>the</strong> reduction into a similar DPSS matrixwhich causes that <strong>the</strong> largest eigenvalues of A are approximated by <strong>the</strong> lower right <strong>diagonal</strong> elementsof <strong>the</strong> DPSS matrix. As this is not good <strong>for</strong> <strong>the</strong> <strong>Cholesky</strong> <strong>LR</strong> method, we reverse <strong>the</strong> direction of <strong>the</strong>columns and rows of <strong>the</strong> DPSS matrix. This can be done in linear time, see, e.g., Vandebril (2004).International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 16


Numerical example 1We take random s.p.d. DPSS matrices of <strong>the</strong> <strong>for</strong>mA = diag(1, . . . , n) + triu(uv T , 1) + triu(uv T , 1) T + αI,where u and v are vectors of uni<strong>for</strong>mly distributed random entries on [0, 1], obtained by <strong>the</strong> Matlabfunction rand, and <strong>the</strong> shift α is such that <strong>the</strong> smallest eigenvalue of A is 1. The condition numbersof <strong>the</strong>se matrices are approximately n.<strong>Cholesky</strong> <strong>LR</strong> Implicit QR eign t steps error t steps error t error50 0.06 274 9.2 · 10 −15 0.19 83 4.3 · 10 −15 0.00 1.8 · 10 −14100 0.16 557 1.0 · 10 −14 0.69 164 4.8 · 10 −14 0.00 1.0 · 10 −13150 0.28 832 1.8 · 10 −14 1.45 242 2.9 · 10 −13 0.00 1.4 · 10 −13200 0.49 1104 2.6 · 10 −14 2.59 311 3.6 · 10 −13 0.02 1.2 · 10 −13250 0.72 1390 6.4 · 10 −14 4.22 414 6.7 · 10 −13 0.03 7.6 · 10 −13300 0.97 1660 1.3 · 10 −13 6.18 486 4.7 · 10 −13 0.05 1.2 · 10 −13350 1.25 1933 4.8 · 10 −14 8.86 564 1.5 · 10 −12 0.09 5.6 · 10 −13400 1.59 2194 1.3 · 10 −13 11.95 684 4.3 · 10 −12 0.14 7.8 · 10 −13450 1.94 2479 9.8 · 10 −14 15.78 730 2.2 · 10 −12 0.22 6.8 · 10 −13500 2.34 2741 1.0 · 10 −13 19.72 821 4.5 · 10 −12 0.28 3.8 · 10 −13International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 17


Numerical example 2We take <strong>symmetric</strong> <strong>positive</strong> <strong>definite</strong> matricesA = Q diag(1 : n)Q T ,where Q is a random orthogonal matrix. Now we have to trans<strong>for</strong>m <strong>the</strong> matrix into a similar DPSSmatrix be<strong>for</strong>e we can apply <strong>Cholesky</strong> <strong>LR</strong> or implicit QR.<strong>Cholesky</strong> <strong>LR</strong> Implicit QR eign t ∗ steps error t ∗ steps error t error500 3.1 3455 2.2 · 10 −13 41.5 942 2.9 · 10 −13 1.8 2.4 · 10 −131000 12.7 6923 2.8 · 10 −13 190.9 1804 6.6 · 10 −13 13.4 6.2 · 10 −131500 26.4 10384 4.6 · 10 −13 496.1 2641 4.6 · 10 −13 50.9 4.5 · 10 −132000 46.1 13859 7.6 · 10 −13 1067.9 3448 2.8 · 10 −12 123.0 3.0 · 10 −122500 72.8 17326 9.5 · 10 −13 1962.3 4263 4.7 · 10 −12 279.6 4.1 · 10 −12∗: times <strong>for</strong> <strong>Cholesky</strong> <strong>LR</strong> and Implicit QR do not include <strong>the</strong> reduction to a DPSS matrix.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 18


Numerical example 3We take <strong>symmetric</strong> <strong>positive</strong> <strong>definite</strong> matricesA = Q diag(λ 1 , . . . , λ n )Q T ,where Q is a random orthogonal matrix and−8+7k−1λ k = 10 n−1.<strong>Cholesky</strong> <strong>LR</strong> Implicit QR eign t ∗ steps error t ∗ steps error t error50 0.05 276 4.3 · 10 −8 0.14 78 3.1 · 10 −8 0.00 1.1 · 10 −8100 0.14 585 5.4 · 10 −8 0.52 153 3.8 · 10 −8 0.03 8.0 · 10 −9150 0.24 857 8.3 · 10 −8 1.20 233 7.3 · 10 −8 0.08 7.2 · 10 −9200 0.38 1143 8.7 · 10 −8 2.14 307 1.3 · 10 −7 0.17 6.6 · 10 −9250 0.52 1438 7.4 · 10 −8 3.36 377 8.4 · 10 −8 0.34 1.1 · 10 −8300 0.72 1712 1.6 · 10 −7 5.23 466 7.0 · 10 −8 0.66 7.9 · 10 −9∗: times <strong>for</strong> <strong>Cholesky</strong> <strong>LR</strong> and Implicit QR do not include <strong>the</strong> reduction to a DPSS matrix.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 19


Conclusions• <strong>Cholesky</strong> <strong>LR</strong> <strong>algorithm</strong> exploits <strong>the</strong> structure of s.p.d. DPSS matrices.• The method can be combined with Laguerre’s shifts.• It seems natural to compare <strong>the</strong> method to <strong>the</strong> implicit QR <strong>for</strong> DPSS matrices. In <strong>Cholesky</strong> <strong>LR</strong><strong>the</strong> eigenvalues are computed from <strong>the</strong> smallest to <strong>the</strong> largest eigenvalue, <strong>the</strong>re<strong>for</strong>e <strong>the</strong> methodis very appropriate <strong>for</strong> applications where one is interested in few of <strong>the</strong> smallest eigenvalues.• If <strong>the</strong> complete spectrum is computed, <strong>Cholesky</strong> <strong>LR</strong> is more expensive than implicit QR, but, asit tends to be slightly more accurate, it presents an alternative.• The proposed method combined with <strong>the</strong> reduction to DPSS matrices can also be applied to ageneral s.p.d. matrix.International Conference on Matrix Methods and Operator Equations, Moscow, June 20-25, 2005 20

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!