Contents lists available atScienceDirect
Linear Algebra and its Applications
www.elsevier.com/locate/laa
A symmetric structure-preserving ΓQR algorithm for linear response eigenvalue problems
Tiexiang Lia,1,Ren-Cang Lib,∗,2, Wen-Wei Linc,3
aSchoolofMathematics,SoutheastUniversity,Nanjing,211189,People’s Republic ofChina
bDepartmentofMathematics,UniversityofTexasatArlington,P.O.Box19408, Arlington,TX76019,UnitedStates
cDepartmentofAppliedMathematics,NationalChiaoTungUniversity, Hsinchu 300,Taiwan
a r t i c l e i n f o a b s t r a c t
Articlehistory:
Received4January2016 Accepted2January2017 Availableonline10January2017 SubmittedbyH.Fassbender MSC:
15A18 15A23 65F15
Keywords:
Π±-matrix Γ-orthogonality Structurepreserving ΓQR algorithm
Linearresponseeigenvalueproblem
Inthispaper,wepresentanefficientΓQR algorithmforsolv- ingthelinearresponseeigenvalueproblemHx=λx,where H is Π−-symmetric with respect to Γ0 = diag(In,−In).
BasedonnewlyintroducedΓ-orthogonaltransformations,the ΓQR algorithmpreservestheΠ−-symmetricstructureofH throughoutthewholeprocess,andthusguaranteesthecom- putedeigenvaluestoappearpairwise(λ,−λ) astheyshould.
WiththehelpofanewlyestablishedimplicitΓ-orthogonality theorem,weincorporatetheimplicitmulti-shifttechniqueto acceleratetheconvergenceoftheΓQR algorithm.Numerical experimentsaregiven toshow theeffectivenessof thealgo- rithm.
©2017ElsevierInc.Allrightsreserved.
* Correspondingauthor.
E-mailaddresses:[email protected](T. Li),[email protected](R.-C. Li),[email protected] (W.-W. Lin).
1 SupportedinpartbytheNSFCgrants11471074and91330109.
2 SupportedinpartbyNSFgrantsDMS-1317330andCCF-1527104,andNSFCgrant11428104.
3 SupportedinpartbytheNationalCenterofTheoreticalSciences,andtheSTYauCentreattheNational ChiaoTungUniversity.
http://dx.doi.org/10.1016/j.laa.2017.01.005 0024-3795/©2017ElsevierInc.Allrightsreserved.
1. Introduction
Inthispaper, weconsiderthestandardeigenvalueproblemoftheform Hx≡
A B
−B −A x1
x2
=λx, (1.1)
whereAandB aren×nrealsymmetricmatrices.Werefertoitalinearresponseeigen- valueproblem(LREP).Anycomplexscalarλandnonzero2n-dimensionalcolumnvector xthatsatisfy(1.1)are calledaneigenvalueand itsassociatedeigenvector,respectively, and correspondingly,(λ,x) iscalled aneigenpair.
Our consideration of this problem is motivated by Casida’s eigenvalue equations in [1–4]. In computational quantum chemistry and physics, the excitation states and responsepropertiesofmoleculesandclustersarepredictedbythelinear-responsetime- dependent density functional theory. The excitation energies and transition vectors (oscillator strengths)of molecular systemscanbe calculatedby solvingCasida’s eigen- value equations [1–3]. There has been a great deal of recent work on and interest in developingefficient numericalalgorithmsandsimulationtechniquesforcomputingexci- tation responsesofmoleculesandformaterialdesignsinenergyscience[5–12].
Let
Γ0=
In 0 0 −In
, Π ≡Π2n=
0 In
In 0
. (1.2)
ThematrixH in(1.1)satisfies Γ0H =
A B B A
andHΠ=−ΠH. (1.3)
Asaresultofthesecondequationin(1.3),if(λ,x) isaneigenpairofH,i.e.,Hx=λx, then (−λ, Πx) is alsoaneigenpair ofH, andifalsoλ∈/R, thenλ,¯ x¯
and
−λ, Π¯ x¯ areeigenpairsofH aswell,whereλ¯isthecomplexconjugateofλandx¯takesentrywise complexconjugation.
Previouslyin[5,6,13],LREP(1.1)waswell-studiedundertheconditionthatΓ0H is positivedefinite.Forthecase,alleigenvaluesof H arereal.Withoutthepositivedefinite condition,themethodsdevelopedin[5,6,13]arenotapplicable.
LetJn betheset ofalln×ndiagonalmatriceswith±1 onthediagonalandset Γ2n ={diag(J,−J) : J ∈Jn}.
NotethatΓ0= diag(In,−In)∈Γ2n.Inthispaper,wewillstudyaneigenvalueproblem for which the condition that Γ0H is positive definite is no longer assumed and it in fact includes LREP (1.1) as aspecial case. Specifically, we will consider the following eigenvalueproblem
Hx≡
A B
−B −A
x=λx (1.4a)
withthestructureproperty:
there isaΓ = diag(J,−J)∈Γ2n with J = diag(±1)∈ Jn such thatΓH =
J A J B J B J A
withJ A,J B∈Rn×n beingsymmetric. (1.4b) There are two reasonsfor consideringthis moregeneral eigenvalueproblem (1.4). The first reasonis thatthis includes (1.1), with/without Γ0H being positive definite,as a specialcase,andthesecondoneisthattheintermediateeigenvalueproblemsinourlater iterativeΓQR algorithmforsolving(1.1)areofthis kind,i.e., withΓ =Γ0.
Itcanbeverifiedthatthesecond equationin(1.3),HΠ =−ΠH, stillholdsinthe caseof(1.4b).Thereforethesameresultsabouttheeigenvaluepatternwementionedfor (1.1)remainvalid.Namely,if(λ,x) isaneigenpair,then(−λ, Πx) isalsoaneigenpair, andifalsoλ∈/R,then ¯λ,x¯
and
−¯λ, Πx¯
areeigenpairsaswell.Anotherinteresting resultis about theΓ-orthogonalityamong the eigenvectorsof H. Specifically, fortwo eigenpairs (λ,x) and(μ,y) of H ifλ= ¯μ, then itholds thatyHΓx= 0,where yH is theconjugatetransposeofy. Thisisbecauseusing (1.4b),wehave
λyHΓx=yHΓHx=yHHHΓx= ¯μyHΓx andthus(λ−μ)y¯ HΓx= 0 whichyields yHΓx= 0 whenλ= ¯μ.
Thematrix H in(1.4)hassomeniceblockstructures.Infact,theeigenvalueproblem (1.4)canbe transformedintoaspecialHamiltonian eigenvalueproblem
0 J M J K 0
y1 y2
=λ y1
y2
withK=A−B, M=A+B, (1.5) y1 = x1−x2, and y2 = x1+x2. There are several existingstructure-preserving ap- proaches[14,15,8,16]thatcanbeappliedtosolvetheeigenvalueproblem(1.1),(1.4),or (1.5).
(a)AperiodicQR(PQR)algorithm [16]canbeusedto solvetheproducteigenvalue problem(J K)(J M)y2=λ2y2for(1.5).Notethatonlyy2iscomputeddirectlythisway, buty1canberecoveredthroughλy1=J My2 fornonzeroeigenvaluesλ.Forλ= 0, we maytakeanyy1 suchthatKy1= 0.Oncey1andy2areknown,x1= (y1+y2)/2 and x2= (y2−y1)/2 becomeavailable.Conceivably,thereisastabilityconcerninrecovering y1foreigenvaluesλtinyinmagnitude.PQRusesorthogonaltransformations.Here,the n×n block structure in(1.4) is exploitedand the symmetry of the spectrum canbe preserved. However,the symmetric structures ofJ A and J B are destroyed duringthe iterations.
(b) The KQZ algorithm [8] can be appliedto solve H in (1.1). It uses orthogonal and Π-orthogonal transformations. The block structure HΠ = −ΠH is preserved
during the KQZ iteration. The reduced matrices J A and J B in (1.4b) are no longer symmetric (tridiagonal), but only Hessenberg. It is mathematically different from the PQR algorithm,buttheyhavethesimilar amountof computationalcosts.Laterat the end of Section5andinSection6,we will showthatthey aremoreexpensivethan the ΓQR algorithmto bepresented.
(c) AnHR process proposed by Brebner and Grad(BG) [14] is used to reduce the product eigenvalue problem (J K)(J M)y2 = λ2y2 to a pseudosymmetric form Cz = λ2Jz, where C is symmetric tridiagonal and J is the inertia sign-matrix of J K or J M. Thetridiagonalpseudosymmetry intheBGalgorithm is preservedduringtheHR iterations.TheBGalgorithmhasthesimilaramountofcomputationalcostsasourΓQR algorithm.However,ill-conditionedK andM maycausethenumericalinstabilityofthe BG algorithmduringconstructingJ.
(d) The symplectic QR-like algorithm [15] can also be applied to solve the special Hamiltonian eigenvalue problem (1.5). It uses symplectic transformations. Here the Hamiltonian matrixisreducedto acondensedHamiltonian form
H1 H3 H2 −H1
withH1
and H2 being diagonal and H3 being symmetric tridiagonal, and then the H3-block will be made to converge to aquasi-diagonal matrix duringthe iterative process. The symplectic QR-like algorithm does not really exploit the symmetry properties of J A and J B. Instability can occur when the symplectic Gaussian elimination matrices at somestepshavelargeconditionnumbers.Thisphenomenoncannotbeavoidedbecause to maintain theHamiltonian structure only theGaussian elimination withoutpivoting isallowed.Furthermore,thesymplecticmatricesQinthesymplecticQR-likealgorithm satisfyQJ Q=J,whereJ =Γ0Π.TheΓ-orthogonalmatricesQinourΓQR algorithm (to bepresented)satisfyQΠ =ΠQandQΓ Q=Γ withΓ,Γ∈Γ2n.
(e) TheHamiltonian QR-algorithm [17] uses symplecticorthogonal transformations butitisonlysuitableforaveryspecialHamiltonianeigenvalueproblemsuchasin(1.1) or (1.5)withrank(B) beingone,orasin(1.5)withrank(K),or rank(M) being one.
Themain taskofthispaperisto developiterativeΓQR algorithmsforsolving(1.4), whileexploitingtheinherentstructuresinH andΓ forbetternumericalefficiency,based on (Γ,Γ)-orthogonaltransformations withΓ,Γ∈Γ2n to bedefinedinSection2. The transformations preserve the symmetry structures inΓH and the diagonal structure ofΓ.TheseΓQR algorithmsmaybeviewedasextensionsoftheHRalgorithmproposed in[18],apioneeringworkforsolvingtheeigenvalueproblemofann×nmatrix A having theproperty thatthere existsaso-calledpseudo-orthogonalmatrixH inthesense that HJ H =J forsomeJ = diag(±1) andJ= diag(±1) suchthatH−1AH=Risupper triangular. TheHRalgorithm,however,cannotbe appliedtoLREP(1.4)directlyasit doesnotrecognizethe2×2 blockstructure,among others.
Throughout thispaper, weassumethatH in(1.1)isnonsingular, andthus0 isnot itseigenvalue.
The restof this paperis organizedasfollows. InSection2,we introducesomebasic definitions and state their immediately implied properties. In Section 3, we first give
two kinds of Γ-orthogonal transformations, and then prove existence and uniqueness of the ΓQR factorization and propose an algorithm to compute the factorization for agiven matrix G with GΠ =−ΠG. In Section4, we present the Π−-upper Hessen- berg reduction/tridiagonalization and provethe implicit Γ-orthogonality theorem of a Π−-matrix G. In Section 5, we develop ΓQR algorithms for computing all eigenpairs of H and analyze their convergence with the goal of an efficient implicit multi-shift ΓQR algorithm.NumericalresultsoftheΓQR algorithmcomparedtotheotherexisting algorithmareshowninSection6.Finally,someconclusionsare drawninSection7.
Notation.Rn×misthesetofalln×mcomplexmatriceswithrealentries,Rn=Rn×1, andR=R1.WedenotebyInand0m×n(0m) then×nidentitymatrixandm×n(m×m) zeromatrix,respectively,andtheirsubscriptsmaybedroppediftheirsizescanbe read fromthecontext.Γ0 andΠ2n arereservedas givenby(1.2),andoftenthesubscriptto Π2nisdropped,too,whennoconfusionispossible.Thejthcolumnoftheidentitymatrix Iisej whosesizewillbe determinedbythecontext.WeshallalsoadoptMATLAB-like conventionto access theentriesof vectorsand matrices.Let i:j be theset ofintegers fromitojinclusive.ForavectoruandamatrixX,u(j)isthejthentryofuandX(i,j) isthe(i,j)thentry ofX;X(I1,I2)isthesubmatrixof X consisting ofintersections ofall rowsi∈I1and allcolumnsj ∈I2;X isthetranspose ofX.Wedenotebyeig(A) the spectrumofmatrixA,anddiag(X,Y) isthe2-by-2 block-diagonalmatrixwithdiagonal blocksX andY.
2. Definitionsandpreliminaries
Inthissection, weintroduceseveralkindsofmatrixclassesand theiressentialprop- erties.RecallΠ2n definedin(1.2).
Definition2.1.LetG∈R2n×2mwithm≤n.GiscalledaΠ±-matrix if GΠ2m=±Π2nG, i.e., G=
G1 G2
±G2 ±G1
with G1, G2∈Rn×m. (2.1) DenotebyΠ±2n×2mthesetofall2n×2mΠ±-matrices,andΠ±2n :=Π±2n×2n forshort.
Inthisdefinitionandthosebelow,tosavespaceandavoidrepetitions,weoftenpack twostatementsintoone:oneforΠ+-matrixandtheotherforΠ−-matrix.Inthesame spirit, in definitions/statementsin the rest of this paper, any of them with phrasesin parenthesesisunderstoodthatthephrasescanbeused toreplace thephrasesimmedi- atelybeforeforanotherdefinition/statement.
WesayamatrixX,possiblynonsquare,isupperHessenbergifX(i,j)= 0 fori> j+ 1, upper triangular if X(i,j) = 0 for i > j, and diagonal if X(i,j) = 0 for i = j. This is consistent with thestandard definitionsof upper Hessenberg, upper triangular, and diagonalmatriceswhichareusuallyforsquare matrices.
Aquasi-uppertriangularmatrixmeansthatitisablockuppertriangularmatrixwith diagonalblocksbeing1×1 or2×2.Similarly,aquasi-diagonalmatrix meansthatitis ablockdiagonalmatrixwith diagonalblocksbeing1×1 or2×2.
Definition 2.2.LetG∈Π±2n×2mas in(2.1).
1. GisΠ±-upper Hessenberg ifG1 isupperHessenbergandG2 isuppertriangular.
GisunreducedΠ±-upper Hessenberg ifG1 isunreducedupperHessenberg.
2. GisΠ±-upper (Π±-quasi-upper)triangular ifG1isupper(quasi-upper)triangular andG2 isstrictlyuppertriangular.
Denote byU±2n×2m (qU±2n×2m)theset ofall2n×2mΠ±-upper(Π±-quasi-upper) triangularmatrices,and write,forshort,U±2n :=U±2n×2n and qU±2n:= qU±2n×2n. 3. GisΠ±-diagonal (Π±-quasi-diagonal)ifG1 isdiagonal(quasi-diagonal)andG2is
diagonal.
Denote by D±2n×2m (qD±2n×2m) the set of all 2n×2n Π±-diagonal (Π±-quasi- diagonal)matrices,andwrite,forshort,D±2n:=D±2n×2n andqD±2n:= qD±2n×2n. Definition 2.3.
1. LetG∈Π+2n as in(2.1). Gis Π+-symmetric (Π+-sym-tridiagonal), ifG1 issym- metric(symmetrictridiagonal)andG2 issymmetric(diagonal).
2. LetG∈Π−2n asin(2.1).GisΠ−-symmetric(Π−-sym-tridiagonal)withrespectto Γ ∈Γ2n ifΓ GisΠ+-symmetric(Π+-sym-tridiagonal).
3. G is unreduced Π±-sym-tridiagonal if it is Π±-sym-tridiagonal and G1 is unre- duced.
The following propositions are direct consequences of Definitions 2.1–2.3 and are rather straightforwardto verify.
Proposition 2.1.
(i) G∈Π±2n×2m if andonly if Γ G∈Π∓2n×2m andGΓ ∈Π∓2n×2m for any Γ ∈Γ2n andΓ∈Γ2m.
(ii) The inverse of a Π±-(upper triangular) matrix is still a Π±-(upper triangular) matrix.
(iii) The product GG of two 2n×2n matrices G and G in their respective categories belongs totheoneaslisted inthefollowingtables:
PPPG PPPG Π+ Π−
Π+ Π+ Π− Π− Π− Π+
PPPG PPPG U+ U−
U+ U+ U− U− U− U+
Proposition 2.2. Let G∈Π−2n.Then G has 2n eigenvalues,appearing in pairs(λ,−λ) forrealorpurelyimaginaryeigenvaluesλandinquadruples(±λ,±¯λ)forcomplexeigen- valuesλ.
Proof. ByDefinition 2.1,itholdsthat
det(G−λI) = det(ΠG−λΠ) = det(GΠ+λΠ) = det(G+λI) = 0.
Theassertionfollows immediately. 2
Definition2.4.Q∈Π+2n×2m isΓ-orthogonal withrespectto Γ ∈Γ2n ifΓ:=QΓ Q∈ Γ2m.DenotebyOΓ2n×2mthesetofall2n×2m Γ-orthogonalmatrices,andOΓ2n:=OΓ2n×2n
forshort.
Often,forshort,wemaysayQ∈Π+2n×2m isΓ-orthogonal, bywhichwemeanthere isΓ ∈Γ2n thathastherequirementofthedefinitionsatisfied.Similarly,wemaysimply sayQisΓ-orthogonal.Thesameunderstandingappliesto theexpression Q∈OΓ2n×2m. Proposition 2.3. Let Qi ∈ OΓ2n with respect to Γi ∈ Γ2n for i = 1,2, and suppose Γ2=Q1Γ1Q1.
(i) Q1Q2∈OΓ2n with respecttoΓ1.
(ii) Qi isnonsingular andQ−1i =Γi+1Qi Γi,where Γ3:=Q2Γ2Q2. (iii) Ifalso Qi∈U+2n,thenQi= diag(Ji,Ji)forsome Ji∈Jn.
Proof. Items(i)and(ii)followfromDefinition 2.4directly.Foritem(iii),Q−i1∈U+2n by Proposition 2.1(ii).Ontheotherhand,byitem(ii),Q−i1=Γi+1Qi ΓiwhichisΠ+-lower triangular.ThisimpliesthatQi = diag(Ji,Ji) forsomeJi∈Jn,completingtheproofof item (iii). 2
3. ΓQR factorization
Definition 3.1. G=QR iscalled aΓQR factorization ofG ∈Π−2n×2m withrespect to Γ ∈Γ2n ifR∈U−2n×2m andQ∈OΓ2n withrespecttoΓ or ifR∈U−2mandQ∈OΓ2n×2m withrespectto Γ.
The case when R ∈ U−2m and Q ∈ OΓ2n×2m with respect to Γ in this definition correspondsto theso-calledskinny QRfactorizationinnumericallinearalgebra.
Definition3.2.LetM =
M1 M2
−M2 −M1
∈Π−2n,andset
M1i= (M1)(1:i,1:i), M2i= (M2)(1:i,1:i).
M1i M2i
−M2i −M1i
iscalledtheithΠ−-leadingprincipalsubmatrix ofM anditsdetermi- nantiscalled theithΠ−-leadingprincipalminor ofM.
The next theorem shows that almost every Π−-matrix G ∈ Π−2n×2m has a ΓQR factorization with respect to a given Γ ∈ Γ2n and the factorization is unique if it is requiredthatthetop-leftquarteroftheR-factorhaspositivediagonalentries.
Theorem 3.1.Supposethat G∈Π−2n×2m(m≤n) hasfull column rankandΓ ∈Γ2n. (i) If G=QR=QR (with Q,Q ∈OΓ2n×2m andR,R∈U−2m)are twoΓQR factoriza-
tionsofG withrespecttoΓ,then
QΓQ=QΓ Q∈Γ2m
andthereisa Π+-diagonal matrixD= diag(J,J)with J ∈Jm suchthat Q=QD andR=DR.Inparticular,ifthetop-leftquartersofRandRhavepositivediagonal entries,thenD=I2m,Q=Q, andR=R.
(ii) Ghas aΓQRfactorizationwith respecttoΓ ifandonlyif noΠ−-leadingprincipal minorof GΓ Gvanishes.
Proof. Wefirstproveitem(i).LetΓ =QΓ QandΓ=QΓQ. Fromtheassumption we have
ΓR=QΓ QR=QΓQR ⇒ QΓQ=ΓRR−1. Similarly,QΓ Q=ΓRR −1.Therefore
ΓRR −1=QΓ Q= (QΓQ) = (ΓRR−1)=R−RΓ. (3.1) Because ΓRR −1 ∈U−2m and at the same time R−RΓ is Π−-lower triangular, we concludethatRR −1 andR−R mustbediagonal.Set
D=RR −1∈Π+2m (3.2)
whichimpliesR−R= (RR −1)−=D−1.Thus,from(3.1)and(3.2),wehaveΓD= QΓ Q andΓD−1=QΓQ. ThisimpliesΓ=DΓD, andthus
D2=I2m, Γ=Γ ∈Γ2m.
So D= diag(J,−J) forsomeJ ∈Jmand R =DR. Furthermore,sinceG=QR=QR hasfullcolumnrank,itfollowsthatQ=QD.
Now if also the top-left quarters of R and R have positive diagonal entries, then R=DRimpliesD=I2m,as expected.
Nextwe proveitem(ii).
Necessity.LetP bethepermutationmatrix
P = [e1,e3,· · ·,e2m−1|e2,e4,· · ·,e2m]∈R2m×2m. (3.3) SupposethatG=QR isa ΓQR factorization with respectto Γ,and letΓ =QΓ Q.
Then
PGΓ GP = (PRP)(PΓP)(PRP) =:RpΓpRp, whereRp=PRP isuppertriangularandΓp =PΓP isdiagonal,asin
Rp=
⎡
⎣
R11 · · · R1m
... . .. ... 0 · · · Rmm
⎤
⎦, Γp =
⎡
⎣
Γ11 0 . ..
0 Γmm
⎤
⎦ (3.4)
with Rij ∈Π−2, Rii =
di 0 0 −di
, and Γii ∈Γ2 for i,j = 1,· · ·,m. Since G hasfull columnrank,itfollowsthatdet(Rii)= 0 fori= 1,· · ·,m.Therefore,thereisnoleading principal minor of PGΓ GP of even order vanishes, i.e., no Π−-leading principal minorofGΓ Gvanishes.
Sufficiency.SupposethatG∈Π−2n×2m andnoΠ−-leadingprincipalminor ofM :=
GΓ Gvanishes.Thenthere isanLUfactorizationofMp:=PM P,i.e.,Mp=LpRp
withnonsingular
Lp=
⎡
⎢⎢
⎣
I2 0
L21 I2
... . .. . ..
Lm1 · · · Lm,m−1 I2
⎤
⎥⎥
⎦, Rp=
⎡
⎢⎣
R11 · · · R1m
. .. ...
0 Rmm
⎤
⎥⎦, (3.5)
whereLij ∈Π+2 andRij ∈Π−2.DecomposeRpas
Rp=
⎡
⎢⎣
R11 0 . ..
0 Rmm
⎤
⎥⎦
⎡
⎢⎢
⎢⎣
I2 R12 · · · R1m
. .. ... ... . .. Rm−1,m
I2
⎤
⎥⎥
⎥⎦=:DpRp (3.6)
withRij =R−ii1Rij ∈Π+2.Thenwehave
Mp=LpRp=LpDpRp=RpDpLp =Mp. (3.7)
The uniquenessoftheLUfactorization impliesthatLp =Rp.Since Mp issymmetric, it follows thatDp = diag({Rii}mi=1) is symmetric. Because Rii ∈ Π−2, Rii must be of theform Rii =
di 0 0 −di
fori= 1,· · ·,m.Write Rii=
|di| 0
0
|di|
sgn(di) 0
0 −sgn(di) |di| 0
0
|di|
and denote D1/2p = diag(
|di| 0
0
|di| m
i=1
), Γp = diag(
sgn(di) 0 0 −sgn(di)
m i=1
). (3.8) From (3.7)and(3.8)wehave
GΓ G=P MpP = (P LpD1/2p P)(P ΓpP)(P D1/2p LpP) =:RΓR, (3.9) where R=P D1/2p LpP∈U+2mand Γ=P ΓpP.Let
Q− :=GR−1Γ ∈Π+2n×2m. (3.10) Withthehelpof(3.9), itcanbe verifiedthat
Q−Γ Q−= (ΓR−G)Γ(GR−1Γ) =ΓR−(RΓR)R−1Γ=Γ whichsaysQ−∈OΓ2n×2m. Therefore
G= (GR−1Γ)(ΓR) =:Q−R− with R−∈U−2m (3.11) to giveG=QR,aΓQR factorization. 2
Our goal in this paper is to develop a structure-preserving QR-like algorithm to compute all eigenvalues of H ∈ Π−2n. The basic idea is to calculate a sequence of Γ-orthogonalmatrices{Qi},basedonaΓQR factorization,suchthat
Hi+1=Q−i1HiQi, Qi ΓiQi=Γi+1 fori= 1,2, . . . ,
where initially H0 = H. For this purpose, at first, we introduce two elementary Γ-orthogonal transformations which will be used to zero out a specific entry or en- tries of a vector. Specifically, given Γ ∈ Γ2n and u ∈ R2n, we seek Q ∈ OΓ2n to zero out someportion of u. Twodifferent kindsof matrices Qwill be used to deal with all possible scenariosthatwilloccurincomputingtheΓQR factorizationsinAlgorithm 3.1 later.
Leta∈Rk(1≤k≤n),J ≡diag(j1,...,jk)∈Jk.AssumethataJa= 0.LetPabea permutationwhichinterchangesrow1 andarowr(2≤r≤k)ofJ suchthatˆj1aJa= ˆ
j1aˆJaˆ > 0, where aˆ = Paa and J= PaJ Pa = diag(ˆj1,...,ˆjk). A Householder-like transformationisproposedby[18]to zeroouttheelementsofaˆ(2:k) asfollows. Let
H(a)−1=I−ˆj1
β(ˆa−αe1)(ˆa−αe1)J , H(a)−1=H(a)−1Pa, (3.12a) whereα=−sign(ˆa(1))
ˆ
j1aˆJaˆandβ =α[α−aˆ(1)].Thenitcanbeverifiedthat H(a)−1a= [H(a)−1Pa]a=H(a)−1aˆ=αe1, H(a)JH(a) =J . (3.12b) Hyp_Householder (hyperbolic Householder) transformation: Suppose 1 ≤ < m ≤ n, u∈R2n and Γ = diag(γ1,. . . ,γn,−γ1,. . . ,−γn)∈Γ2n. Therearetwocases:
Case 1. a←u(:m)with =n+ andm=n+m,J = diag(γ,. . . ,γm);
Case 2. a←u(:m),J = diag(γ,. . . ,γm).
Using(3.12)weconstructahyperbolicHouseholderΓ-orthogonaltransformationQwith respectto Γ throughitsinverseby
Q−1 =
Qh( :m;u), case 1;
Qh(:m;u), case 2,
:= diag(I−1,Hˆ(a)−1, In−m, I−1,Hˆ(a)−1, In−m). (3.13) Thenitholdsthat
Q−1u= ˆuwith
uˆ(+1:m)= 0, case 1;
uˆ(+1:m)= 0, case 2, (3.14)
andQΓ Q=Γ,whereΓ= (γ1,· · ·,γn,−γ1,· · ·,−γn) isgivenby γs =γs , s= 1,· · ·, −1 andm+ 1,· · ·, n,
γs+ −1= ˆjs, s= 1,· · ·, m−+ 1. (3.15) Hyp_Givens (hyperbolic Givens) transformation: Suppose 1 ≤ ≤ n, u ∈ R2n and Γ = diag(γ1,· · ·,γn,−γ1,· · ·,−γn)∈Γ2n.Letα←u(),β ←u(n+).Define
⎧⎨
⎩
c= √11−r2, s= √1r−r2 with r= βα, if |α|>|β|,
c= √1r−r2, s= √11−r2 with r= αβ, if |α|<|β|. (3.16)
Algorithm3.1ΓQR factorization.
Input: G∈Π−2n×2m,Γ = diag(J,−J)∈Γ2nwithJ= diag(γ1,· · ·,γn),n←2n;
Output: Q∈OΓ2nwithrespecttoΓ,Γ=QΓ Q∈Jn,andR∈U−2msuchthatG=QR;
1:Q←I2n,Γsav←Γ; 2:for= 1:mdo
3: ←n+,u←G(:,);
4: computeHyp_HouseholderΓ-orthogonaltransformation: Q−1= Qh( : n;u) withrespecttoΓ (by(3.13));
5: Q←QQ, G←Q−1G,Γ ← −Γ(by(3.15));
6: α←G(,),β←G(,);
7: computeHyp_GivensΓ-orthogonaltransformation:Q−1=Qg(;α,β) withrespecttoΓ(by(3.17));
8: Q←QQ, G←Q−1G,Γ ←Γ(by(3.18));
9: u←G(:,);
10: computeHyp_HouseholderΓ-orthogonaltransformation:Q−1=Qh(:n;u) withrespecttoΓ (by (3.13));
11: Q←QQ, G←Q−1G,Γ ←Γ(by(3.18));
12: end for
13: return Q←Q(:,[1:m,n+1:n+m]),Γ←Γ,Γ ←Γsav,andR=
G(1:m,:) G(n+1:n+m,:)
.
We construct a hyperbolic Givens Γ-orthogonal transformation with respect to Γ throughitsinverseby
Q−1=Qg(;α;β) = C S
S C
∈Π2n+, (3.17)
where C is obtained from In by resetting C(,) = c and S from On×n by resetting S(,)=−s.Thenwe have
Q−1u= ˆu with uˆ(n+)= 0, and QΓ Q=Γ,where
γ=δγ, δ=c2−s2=±1,
γj=γj, j =. (3.18)
Remark3.1.
(i) UtilizingthespecialstructureofΠ−-matrixG∈Π−2n×2m,Q−1atlines4,7and10 ofAlgorithm 3.1eliminatesthe(n++ 1: 2n,) and(+ 1:n,) orthe(n+,)th and(,n+)thorthe(+ 1:n,) and(n++ 1: 2n,) entriesofGsimultaneously, for= 1,. . . ,m.
(ii) Upon exit, Algorithm 3.1 computes G = QR, where Q ∈ OΓ2n is a Γ-orthogonal matrixwith respect to Γ and R∈U−2n×2m. It is worthnotingthat Γ isunknown beforeG=QRiscomputedbutitisunique,accordingtoTheorem 3.1(i).
In the following, we use a small example with n = 3 and m = 2 by Wilkinson’s diagramto illustratetheeliminationprocessincomputingaΓQR factorizationofG.
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎣
× × × ×
× × × ×
× × × ×
× × × ×
× × × ×
× × × ×
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎦
Qh(4:6;u)
−−−→=Q−11
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎣
× × × ×
× × 0 ×
× × 0 ×
× × × × 0 × × × 0 × × ×
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎦
Qg(1;α,β)
−−−→=Q−12
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎣
× × 0 ×
× × 0 ×
× × 0 × 0 × × × 0 × × × 0 × × ×
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎦
Qh(1:3;u)
−−−→
=Q−13
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎣
× × 0 ×
0 × 0 ×
0 × 0 ×
0 × × ×
0 × 0 ×
0 × 0 ×
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎦
Qh(5:6;u)
−−−→
=Q−14
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎣
× × 0 ×
0 × 0 ×
0 × 0 0
0 × × ×
0 × 0 ×
0 0 0 ×
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎦
Qg(2;α,β)
−−−→
=Q−15
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎣
× × 0 ×
0 × 0 0
0 × 0 0
0 × × ×
0 0 0 ×
0 0 0 ×
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎦
Qh(2:3;u)
−−−→
=Q−16
⎡
⎢⎢
⎢⎢
⎢⎢
⎢⎣
× × 0 ×
0 × 0 0
0 0 0 0
0 × × ×
0 0 0 ×
0 0 0 0
⎤
⎥⎥
⎥⎥
⎥⎥
⎥⎦
In general, after m steps we have computed 3m Γ-orthogonal matrices Q−11,. . . ,Q−3m1 suchthat(Q−13m× · · · ×Q−11 )G=Ris aΠ−-uppertriangular.
Remark3.2. Theorem 3.1(ii)reveals thatalmost allmatrices inΠ−2n×2m(m≤n) have ΓQR factorizations. In practice, for a given 2n×2m Π−-matrix G, one way to con- struct itsΓQR factorization withrespect to given Γ ∈Γ2n is throughreducingGto a 2n×2m Π−-upper triangular matrix by asequence of Γ-orthogonal transformations:
Hyp_Householder Γ-orthogonal transformationsand Hyp_Givens Γ-orthogonal trans- formations.TheHyp_Householdertransformationin(3.12a)maynotexistifaˆJaˆ= 0.
Similarly,theHyp_Givenstransformationin(3.17)maynotexistif|α|=|β|.In[19],it issaidthatthesecasescanoccurwhenthematrixisartificiallydesigned.Thereisclearly anumericalstabilityissueifaˆJaˆ≈0 or|α| ≈ |β|.Thedangerofseverecancellationcan occur andisdiscussedin[20,21].Ifadangerouscancellationoccursat somethstepof Algorithm 3.1,itisrecommendedtopre-multiply thecurrentGbyarandomlygenerated Γ-orthogonal Q−1 with QΓQ =Γ. Then we set G←Q−1G, Γ ← Γ, and continue performingAlgorithm 3.1from thethstep. Itusually cansuccessfully circumventthe cancellationbythis[20,21].