資源描述:
《數值分析 第2章》由會員上傳分享,免費在線閱讀,更多相關內容在教育資源-天天文庫。
1、2008-10-24Chapter2SolvingSetsofEquationsTopics:1.MatricesandVectors2.EliminationMethods3.TheInverseofaMatrixandMatrixPathology4.Ill-conditionedSystem5.IterativeMethods1.MatricesandVectorsAmatrixisarectangulararrayofnumbers.ASetoflinearequationsmuchmoresimplyinmatrixnotat
2、ion,aswhere12008-10-24Ainnerproduct(scalarproduct)isdefinedbywherearecolumnvectors.Forexample,AouterproductisdefinedbyDiagonalmatrix:Identitymatrix:Transpositionmatrix:Example:Symmetricmatrix:Trace:22008-10-24Upper-triangular:Lower-triangular:Tridiagonalmatrix:Foratridia
3、nonalmatrix,onlythenonzerovaluesneedtoberecorded,andthatmeansthatthematrixcanbecompressedintoamatrixof3columnsandnrows:Sparsematrix:onlyafewoftheentriesarenonzero.Determinantofamatrix:Eigenvalue,eigenvector:Characteristicpolynomial:32008-10-24UsingComputerAlgebraSystemWe
4、canuseMatlabtodosomematrixoperations.>>A=[123;456;789]A=123456789>>A(2,3)+,-,*,/,‘A(2,3)=6>>B=A(3,1:3)B=789>>det(A)Ans=02.EliminationMethodsInthischapter,directtechniquesareconsideredtosolvethelinearsystemIfweuseCramer’srulewecanobtainthesolution:columniwhere42008-10-24B
5、utit’sinefficientandalmostimpossibletouseforlargesystem!Supposewehaveanupper-triangularsystem,suchasIt’seasytogetBack-substitutionTheobjectiveofeliminationmethodCoefficientUpperSolutionmatrixtriangularConsidertheequationsTheaugmentedmatrixisWeperformelementaryrowtransfor
6、mationstoconvertAtoupper-triangularform:Itrepresentstheequation:52008-10-24Theelementaryrowtransformationsincludethreeoperations:(1)(2)(2)GaussianEliminationAssumethatwehavedonethetransformationsktimestoaaugmentedmatrixandthenwegetForthenextstep,weneedtocomputethemultipl
7、ierThen,62008-10-24IfwerepeattheoperationwecangetamatrixwiththeformThelastworkisback-substitution.Butsometimeswewillencounterthecasethatazeroisonthediagonalposition.Forexample:Toavoiddividingbyzero,wechoosethelargestmagnitudeelementforeverycolumn.Thisiscalledpivoting.The
8、diagonalelementsthatresultarecalledpivotelements.Pivotingcanreducetheerror.Example:(Exactvalue:x1=10.00