Professional Documents
Culture Documents
TheQRMethodforEigenvalues
Module
for
TheQRMethodforEigenvalues
BackgroundforQRMethod
SupposethatAisarealsymmetricmatrix.Householdersmethodisusedtoconstructasimilartridiagonalmatrix.ThentheQRmethodisusedtofindall
eigenvaluesofthetridiagonalmatrix.Inthelatterconstruction,planerotationssimilartothosethatwereintroducedinJacobismethodareusedtoconstruct
theorthogonalmatrices .TheimportantsteptheQRmethodisthefactorization
anditeration
.
Definition(QRDecomposition).Foranonsingularsquarematrix ,thereexistsafactorization
Forarealnonsingularsquarematrix ,thereexistsafactorization
(also
).
Example1.FindtheQRdecompositionofthematrix
Solution1.
Example2.Findthe
decompositionofthematrix
2(a).Performthecomputationusingdecimalarithmetic.
2(a).Performthecomputationusingexactarithmetic.
Solution2(a).
Solution2(b).
QRtransformation
Afterfindingthe
factorization,the
transformationis
Remark.Wewillnotwriteourownsubroutineforfindingthe
factorization,wewilluseMathematica'ssubroutine.
QRMethod
Wenowinvestigateawellknownandefficientmethodforfindingalltheeigenvaluesofageneral
arbitraryrealmatrix,butforageneralmatrixittakesmanyiterationsandbecomestimeconsuming.
The
methodworksmuchfasteronspecialmatrices,preferably:
(i)symmetrictridiagonal,
(ii)Hessenbergmatrices,
(iii)symmetricbandmatrices.
Forthismodule,wewillillustratetheQRmethodfor
realsymmetricmatrices.
realmatrix.The
methodcanbeusedforan
1/5
1/19/2015
TheQRMethodforEigenvalues
Thepopulareigenvaluesolverforsymmetrictridiagonalmatricesiscalledtheimplicit
method.Itappliesaseriesoforthogonaltransformations toa
tridiagonalmatrix whichconvergestoadiagonalmatrix .Furthermore, hasthesameeigenvaluesas whicharethediagonalelementsof .In
addition,theproductoftheorthogonaltransformations
isamatrixwhosecolumnsaretheeigenvectorsof .Themethodiscalled because
ineachiterationthe factorizationiscomputed.TheLAPACKroutineimplementingtheimplicit algorithmontridiagonalsymmetricmatricesiscalled
DSTEQR.
QRAlgorithm.ThepseudocodefortheQRmethodis:
1.i=0
2.
3.repeat
4.Factor
5.
6.i=i+1
7.untilconvergence
ProofTheQRMethodTheQRMethod
ComputerProgramsTheQRMethodTheQRMethod
MathematicaSubroutine(QRmethod).Toreducethe
realtridiagonalmatrix todiagonalform.
Example3.ApplytheQRmethodtotransformthetridiagonalmatrix
intodiagonalmatrixDthathasthesameeigenvalues.
Solution3.
ReductiontoHessenbergForm
WeneedtofindtheHessenbergform.Supposethat isasymmetric
Constructthesequence
matrix.Startwith
for
ofHouseholdermatrices,sothat
,
where haszerosbelowthesubdiagonalincolumns
method.
.Then
isaHessenbergmatrixthatissimilarto .ThisprocessiscalledHouseholders
Wearemostinterestedinfindingeigenvaluesofsymmetricmatrices.IfAissymmetric,thentheaboveprocesswillconstructasymmetrictridiagonal
matrix.wewillbuildonthistheme.Asmentionedpreviously,theQRiterationwillworkfasterontridiagonalmatrices
ProofTheQRMethodTheQRMethod
ComputerProgramsTheQRMethodTheQRMethod
MathematicaSubroutine(HouseholderreductiontoupperHessenbergForm).Toreducethe
realmatrix toHessenbergformbyusing
Householdertransformations.Thefollowingversionoftheprogramuses"loops"extensivelyandismoretraditionalinprogrammingstructure.Italsocontains
aprintstatementsothatyoucanwatchtheHouseholdertransformationsperformtheir"magic."
http://mathfaculty.fullerton.edu/mathews/n2003/QRMethodMod.html
2/5
1/19/2015
TheQRMethodforEigenvalues
Example4.ApplytheQRmethodandfindtheeigenvaluesofthefollowingmatrix
Solution4.
AccelerationshiftsfortheQRmethod
AsoutlinedaboveQRmethodwillwork,butconvergenceisslow,evenformatricesofsmalldimension.Wecanaddashiftingtechniquethatspeedsupthe
rateofconvergence.Recallthatif isaneigenvalueofA,then
isaneigenvalueofthematrix
.Thisideaisincorporatedinthe
modifiedstep
thenform
where
for
isasequencewhosesumis
thatis,
ProofTheQRMethodTheQRMethod
ComputerProgramsTheQRMethodTheQRMethod
MathematicaSubroutine(QRmethodwithshifts).Toreducethe
http://mathfaculty.fullerton.edu/mathews/n2003/QRMethodMod.html
realtridiagonalmatrix todiagonalform.
3/5
1/19/2015
TheQRMethodforEigenvalues
Example5.ApplytheQRmethodwithshiftsandfindtheeigenvaluesofthefollowingmatrix
Solution5.
ApplicationoftheQRFactorizationto"leastsquares"
IsiscommonpracticetousetheA=QRfactorizationforunderdeterminedsystemandgeta"leastsquaressolution."Wewillillustratethemethodforthe
problemoffindinga"leastsquaresparabola."
Anoverdeterminedsystemofequationswillarisewhichdoesnothaveasolution
MX=B
TheQRfactorizationofMisobtained
Multiplicationontheleftby
,andwe"wish"tosolve
producesthesystem
whichwewillbeabletosolveintheform
ThedetailsinExample7willmakeclearwhatishappening.
Example6.Findthe"leastsquaresparabola"throughthesixpoints
UseMathematica'ssubroutineFittofindthesolution.
Solution6.
Example7.Findthe"leastsquaresparabola"throughthesixpoints
.Writedownsixequationsinthreeunknownsthat
we"wish"couldbesolved.Observethatthisisanunderdeterminedsystemandenvisiona"leastsquaressolution."
http://mathfaculty.fullerton.edu/mathews/n2003/QRMethodMod.html
4/5
1/19/2015
TheQRMethodforEigenvalues
UsetheA=QRfactorizationtogeta"leastsquaressolution."
Solution7.
ResearchExperienceforUndergraduates
TheQRMethodTheQRMethodInternethyperlinkstowebsitesandabibliographyofarticles.
DownloadthisMathematicaNotebookTheQRMethodforEigenvalues
ReturntoNumericalMethodsNumericalAnalysis
(c)JohnH.Mathews2004
http://mathfaculty.fullerton.edu/mathews/n2003/QRMethodMod.html
5/5