# Added to the third row the entries of the column of m

• Notes
• Mashour
• 63
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 21 - 23 out of 63 pages.

added to the third row. The entries of the column of M1come from 2 =(6/3)and 1 =(3/3) as required for row elimination. The number3 is called thepivot.The next step is321025023321025002= M2(M1A),whereM2(M1A) =100010011321025023=321025002.Here, M2multiplies the second row by1 =(2/2) and adds it to thethird row. The pivot is2.We now haveM2M1A = UorA = M11M12U.The inverse matrices are easy to find. The matrix M1multiples the first row by2 and adds it to the second row, and multiplies the first row by 1 and adds itto the third row. To invert these operations, we need to multiply the first rowby2 and add it to the second row, and multiply the first row by1 and addit to the third row. To check, withM1M11= I,we have100210101100210101=100010001.Similarly,M12=100010011Therefore,L = M11M12is given byL =100210101100010011=100210111,which is lower triangular. The off-diagonal elements of M11and M12are simplycombined to form L. Our LU decomposition is therefore321667344=100210111321025002.
16CHAPTER 3.SYSTEMS OF EQUATIONSAnother nice feature of the LU decomposition is that it can be done by over-writing A, therefore saving memory if the matrix A is very large.The LU decomposition is useful when one needs to solve Ax=bforxwhenA is fixed and there are many differentb’s. First one determines L and U usingGaussian elimination. Then one writes(LU)x= L(Ux) =b.We lety= Ux,and first solveLy=bforyby forward substitution. We then solveUx=yforxby backward substitution.When we count operations, we will see thatsolving (LU)x=bis significantly faster once L and U are in hand than solvingAx=bdirectly by Gaussian elimination.We now illustrate the solution of LUx=busing our previous example,whereL =100210111,U =321025002,b=176.Withy= Ux, we first solve Ly=b, that is100210111?1?2?3=176.Using forward substitution?1=1,?2=7 + 2?1=9,?3=6 +?1?2= 2.We now solve Ux=y, that is321025002?1?2?3=192.Using backward substitution,2?3= 2?3=1,2?2=95?3=4?

Course Hero member to access this document

Course Hero member to access this document

End of preview. Want to read all 63 pages?

Course Hero member to access this document

Term
Summer
Professor
NoProfessor
Tags
Math, double precision
• • • 