U Decomposition Method Autr Kw After reding this chpter, you should e le to:. identify when U decomposition is numericlly more efficient thn Gussin elimintion,. decompose nonsingulr mtrix into U, nd. show how U decomposition is used to find the inverse of mtrix. I her out U decomposition used s method to solve set of simultneous liner equtions. Wht is it? We lredy studied two numericl methods of finding the solution to simultneous liner equtions Nïve Guss elimintion nd Gussin elimintion with prtil pivoting. Then, why do we need to lern nother method? To pprecite why U decomposition could e etter choice thn the Guss elimintion techniques in some cses, let us discuss first wht U decomposition is out. For nonsingulr mtrix [ A ] on which one cn successfully conduct the Nïve Guss elimintion forwrd elimintion steps, one cn lwys write it s [ A ] [ ][ U] where [ ] ower tringulr mtrix [ U ] Upper tringulr mtrix Then if one is solving set of equtions [ A ][ X ] [ C], then [ ][ U][ X] [ C] s ([ A ] [ ][ U] ) Multiplying oth sides y [ ], [ ] [ ][ U][ X] [ ] [ C] Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
( [ I ]) [ I ][ U][ X] [ ] [ C] s [ ] [ ] [ U][ X] [ ] [ C] s ([ I ][ U] [U ]) et [ ] [ C] [ Z] then nd [ ][ Z] [ C] () [ ][ X] [ Z] U () So we cn solve Eqution () first for [Z] y using forwrd sustitution nd then use Eqution () to clculte the solution vector [ X ] y ck sustitution. This is ll exciting ut U decomposition looks more complicted thn Gussin elimintion. Do we use U decomposition ecuse it is computtionlly more efficient thn Gussin elimintion to solve set of n equtions given y [A][X][C]? For squre mtrix [A] of n n sie, the computtionl time DE to decompose the [A] mtrix to [ ][ U ] form is given y n n T, DE 8 + 4n where T clock cycle time. The time is clculted y first seprtely clculting the numer of dditions, sutrctions, multiplictions, nd divisions in procedure such s ck sustitution, etc. We then ssume 4 clock cycles ech for n dd, sutrct, or multiply opertion, nd 6 clock cycles for divide opertion s is the cse for typicl AMD -K7 chip. http://www.isi.edu/~drper/ppers/mwscs7_kwon.pdf Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
The computtionl time T( 4n 4n) FS The computtionl time T( 4n + n) BS to solve y forwrd sustitution [ ][ Z] [ C] FS to solve y ck sustitution [ U ][ X] [ Z] BS is given y is given y So, the totl computtionl time to solve set of equtions y U decomposition is U DE + FS + BS 8 n n + 4n T + T( 4n 4n) + T( 4n + n) 8 n 4n T + n + Now let us look t the computtionl time tken y Gussin elimintion. The computtionl time for the forwrd elimintion prt, FE T, FE 8 n n + 8n nd the computtionl time T( 4n + n) BS So, the totl computtionl time Elimintion is GE FE + BS BS for the ck sustitution prt is GE to solve set of equtions y Gussin 9 As n exmple,. GH CPU hs clock cycle of /(. ).8ns Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
8 n n + 8n T + T( 4n + n) 8 n 4n T + n + The computtionl time for Gussin elimintion nd U decomposition is identicl. This hs confused me further! Why lern U decomposition method when it tkes the sme computtionl time s Gussin elimintion, nd tht too when the two methods re closely relted. Plese convince me tht U decomposition hs its plce in solving liner equtions! We hve the knowledge now to convince you tht U decomposition method hs its plce in the solution of simultneous liner equtions. et us look t n exmple where the U decomposition method is computtionlly more efficient thn Gussin elimintion. Rememer in trying to find the inverse of the mtrix [A] in Chpter 4., the prolem reduces to solving n sets of equtions with the n columns of the identity mtrix s the RHS vector. For clcultions of ech column of the inverse of the [A] mtrix, the coefficient mtrix [A] mtrix in the set of eqution [ A ][ X] [ C] chnge. So if we use the U decomposition method, the [ ] [ ][ U] does not A decomposition needs to e done only once, the forwrd sustitution (Eqution ) n times, nd the ck sustitution (Eqution ) n times. Therefore, the totl computtionl time mtrix using U decomposition is inverse U DE + n FS + n BS inverse U required to find the inverse of 8n n T + 4n + T 4n 4n + T 4n + n n n T + n n ( ) n ( ) In comprison, if Gussin elimintion method were used to find the inverse of mtrix, the forwrd elimintion s well s the ck sustitution will hve to e done n times. Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge 4 of 6
The totl computtionl time Gussin elimintion then is inversege FE n + n BS inversege required to find the inverse of mtrix y using Clerly for lrge n, 4 n nd inverse U n 8 n n T + 8n + T 4n + n 4 8n 4n T + n + inversege >> inverse U hs the dominting terms of n ( ) s inversege hs the dominting terms of n. For lrge vlues of n, Gussin elimintion method would tke more computtionl time (pproximtely n / 4 times prove it) thn the U decomposition method. Typicl vlues of the rtio of the computtionl time for different vlues of n re given in Tle. Tle Compring computtionl times of finding inverse of mtrix using U decomposition nd Gussin elimintion. n inversege / inverse U.8.8.8 Are you convinced now tht U decomposition hs its plce in solving systems of equtions? We re now redy to nswer other curious questions such s ) How do I find U mtrices for nonsingulr mtrix [A]? ) How do I conduct forwrd nd ck sustitution steps of Equtions () nd (), respectively? Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
How do I decompose non-singulr mtrix ] [A, tht is, how do I find [ ] [ ][ U] A? If forwrd elimintion steps of the Nïve Guss elimintion methods cn e pplied on nonsingulr mtrix, then [ A ] cn e decomposed into U s [ A] M n M n K n n M nn l M l n l M n K M u M u u M K u n u n M unn The elements of the [ U ] mtrix re exctly the sme s the coefficient mtrix one otins t the end of the forwrd elimintion steps in Nïve Guss elimintion. The lower tringulr mtrix [ ] hs in its digonl entries. The non-ero elements on the non-digonl elements in [ ] re multipliers tht mde the corresponding entries ero in the upper tringulr mtrix [ U ] during forwrd elimintion. et us look t this using the sme exmple s used in Nïve Gussin elimintion. Exmple Find the U decomposition of the mtrix [ A ] Solution 64 44 [ A ] [ ][ U] 8 Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge 6 of 6
l l l u u u u u u The [ U ] mtrix is the sme s found t the end of the forwrd elimintion of Nïve Guss elimintion method, tht is [ U ].6.7 To find l nd l, find the multiplier tht ws used to mke the nd elements ero in the first step of forwrd elimintion of the Nïve Guss elimintion method. It ws l 64.6 l 44.76 To find l, wht multiplier ws used to mke element ero? Rememer element ws mde ero in the second step of forwrd elimintion. The [ A ] mtrix t the eginning of the second step of forwrd elimintion ws 6.8.6 4.76 So l 6.8. Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge 7 of 6
Hence [ ].6.76 Confirm [ ][ U] [ A].. [ ][ U].6.76..6.7 64 44 8 Exmple Use the U decomposition method to solve the following simultneous liner equtions. 64 44 8 6. 8 77. 79. Solution Recll tht [ A ][ X] [ C] nd if [ A ] [ ][ U] then first solving nd then [ ][ Z] [ C] Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge 8 of 6
[ U ][ X] [ Z] gives the solution vector [ X ]. Now in the previous exmple, we showed [ A ] [ ][ U].6.76..6.7 First solve [ ][ Z] [ C].6.76. 6.8 77. 79. to give 6.8.6 + 77..76 +. + 79. Forwrd sustitution strting from the first eqution gives 6.8 77.. 6 77..6 6.8 96.8..76. 79 79..76 6.8. ( 96.8) Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge 9 of 6
.76 Hence [ Z ] 6.8 96.8.76 This mtrix is sme s the right hnd side otined t the end of the forwrd elimintion steps of Nïve Guss elimintion method. Is this coincidence? Now solve [ U ][ X] [ Z] 6. 8.6 96. 8.7 76. + +.6.7 6.8.76 From the third eqution.7.76 96.8. 76. 7.87 Sustituting the vlue of in the second eqution, Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
.6 96.8 96.8+.6 96.8+.6.87 9.69 Sustituting the vlue of nd in the first eqution, + + 6.8 6.8 6.8 9.69.87.948 Hence the solution vector is.948 9.69.87 How do I find the inverse of squre mtrix using U decomposition? A mtrix [ B ] is the inverse of [ ] [ A ][ B] [ I] [ B][ A]. A if How cn we use U decomposition to find the inverse of the mtrix? Assume the first A ) is column of [ B ] (the inverse of [ ] T [...... n ] Then from the ove definition of n inverse nd the definition of mtrix multipliction Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
[ A ] M n M Similrly the second column of [ B ] is given y [ A ] M n M Similrly, ll columns of [ B ] cn e found y solving n different sets of equtions with the column of the right hnd side eing the n columns of the identity mtrix. Exmple Use U decomposition to find the inverse of [ A ] 64 44 8 Solution Knowing tht [ A ] [ ][ U].6.76..6.7 We cn solve for the first column of [ B] [ A] y solving for Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
64 44 8 First solve tht is [ ][ Z] [ C],.6.76. to give.6 +.76 +. + Forwrd sustitution strting from the first eqution gives Hence. 6.6( ).6.76. ( ).(.6).76. Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
[ Z ].6. Now solve tht is [ U ][ X] [ Z].6.7.6. + +.6.7..6 Bckwrd sustitution strting from the third eqution gives..7 4.7.6+.6.6+.6(4.7).94 Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge 4 of 6
(.94) 4.7.476 Hence the first column of the inverse of [ A ] is.476.94 4.7 Similrly y solving 64 44 8 gives.8.47. nd solving 64 44 8 gives.7.464.49 Hence [ A ].476.94 4.7.8.47..7.464.49 Cn you confirm the following for the ove exmple? [ A][ A] [ I] [ A] [ A] Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge of 6
Key Terms: U decomposition Inverse Sylor UR: http://www.sylor.org/courses/me/ Attriuted to: University of South Florid: Holistic Numericl Methods Institute Pge 6 of 6