Autar Kaw Benjamin Rigsy http://nmmathforcollegecom Transforming Numerical Methods Education for STEM Undergraduates
http://nmmathforcollegecom
LU Decomposition is another method to solve a set of simultaneous linear equations Which is etter, Gauss Elimination or LU Decomposition?
Method For most non-singular matrix [A] that one could conduct Naïve Gauss Elimination forward elimination steps, one can always write it as where [A] [L][U] [L] lower triangular matrix [U] upper triangular matrix
If solving a set of linear equations If [A] [L][U] then Multiply y Which gives Rememer [L] - [L] [I] which leads to Now, if [I][U] [U] then Now, let Which ends with and [A][X] [C] [L][U][X] [C] [L] - [L] - [L][U][X] [L] - [C] [I][U][X] [L] - [C] [U][X] [L] - [C] [L] - [C][Z] [L][Z] [C] () [U][X] [Z] ()
How can this e used? Given [A][X] [C] Decompose [A] into [L] and [U] Solve [L][Z] [C] for [Z] Solve [U][X] [Z] for [X]
Solve [A][X] [B] T clock cycle time and n n sie of the matrix Forward Elimination CT FE 8n T + 8n ( 4n + n) CT BS T n Back Sustitution Decomposition to LU CT DE 8n T + 4n n Forward Sustitution ( 4n n) CT FS T 4 Back Sustitution ( 4n + n) CT BS T
Time taken y methods To solve [A][X] [B] Gaussian Elimination LU Decomposition T n 8 + n 4n + T T clock cycle time and n n sie of the matrix n 8 + n + 4n So oth methods are equally efficient
Time taken y Gaussian Elimination n ( CT + CT ) 8n T 4 FE + n + BS 4n Time taken y LU Decomposition CT LU n T + n CT + n FS + n CT n + BS
Time taken y Gaussian Elimination 8n T 4 + n + 4n Time taken y LU Decomposition n T + n n Tale Comparing computational times of finding inverse of a matrix using LU decomposition and Gaussian elimination n CT inverse GE / CT inverse LU 88 584 58 5 For large n, CT inverse GE / CT inverse LU n/4 http://numericalmethodsengusfedu
[ A] [ L][ U ] u u u u u u [U] is the same as the coefficient matrix at the end of the forward elimination step [L] is otained using the multipliers that were used in the forward elimination process
Using the Forward Elimination Procedure of Gauss Elimination 5 64 44 5 8 Step : 64 5 ( ) 56; Row Row 56 5 44 5 48 56 44 5 ( ) 576; Row Row 576 5 5 48 68 56 476
Matrix after Step : 5 5 48 68 56 476 Step : 68 48 5; Row Row ( 5) 5 5 48 56 7 [ U ] 5 5 48 56 7
Using the multipliers used during the Forward Elimination Procedure From the first step of forward elimination 5 64 44 5 8 64 5 a a 44 5 a a 56 576
From the second step of forward elimination 5 5 48 68 56 476 a a 68 48 5 [ L] 56 576 5
576 5 5 [ L][ U ] 56 48 56 5 7?
Solve the following set of linear equations using LU Decomposition 79 77 6 8 44 8 64 5 5 x x x Using the procedure for finding the [L] and [U] matrices [ ] [ ][ ] 7 56 48 5 5 5 576 56 U L A
Set [L][Z] [C] Solve for [Z] 79 77 68 5 576 56 79 5 576 77 56 + + +
Complete the forward sustitution to solve for [Z] 68 77 56 96 ( ) 77 56 68 79 576 5 79 576 68 75 ( ) 5( 96) [ Z ] 68 96 75
Set [U][X] [Z] 5 5 48 56 7 x x x 6 8 96 75 Solve for [X] The equations ecome 5a 48a + 5a + a 56a 7a 68 96 75
From the rd equation Sustituting in a and using the second equation 7a a a 75 75 7 5 a a a 4 8a 56 a 96 96 + 56 a 4 8 96 + 56 5 4 8 9 7 ( )
Sustituting in a and a using the first equation Hence the Solution Vector is: 5a + 5a + a 6 8 a 6 8 5a a 5 6 8 5 9 7 5 9 ( ) 5 a a a 9 97 5
The inverse [B] of a square matrix [A] is defined as [A][B] [I] [B][A]
How can LU Decomposition e used to find the inverse? Assume the first column of [B] to e [ n ] T Using this and the definition of matrix multiplication First column of [B] Second column of [B] [ ] n A [ ] n A The remaining columns in [B] can e found in the same manner
Find the inverse of a square matrix [A] [ A] 5 5 64 44 8 Using the decomposition procedure, the [L] and [U] matrices are found to e [ A] [ L][ U ] 56 5 76 5 5 5 4 8 56 7
Solving for the each column of [B] requires two steps ) Solve [L] [Z] [C] for [Z] ) Solve [U] [X] [Z] for [X] Step : [ ][ ] [ ] 5 576 56 C Z L This generates the equations: 5 576 56 + + +
Solving for [Z] ( ) ( ) ( ) 56 5 5 76 5 5 76 56 56 56 [ ] 56 Z
Solving [U][X] [Z] for [X] 56 7 56 48 5 5 7 56 56 48 5 5 + +
Using Backward Sustitution 457 7 56 + 56 48 56 + 56( 457) 954 48 5 5 5( 954) 457 476 5 So the first column of the inverse of [A] is: 476 954 457
Repeating for the second and third columns of the inverse Second Column Third Column 44 8 64 5 5 5 47 8 44 8 64 5 5 49 464 57
The inverse of [A] is [ A] 476 954 457 8 47 5 57 464 49 To check your work do the following operation [A][A] - [I] [A] - [A]
For all resources on this topic such as digital audiovisual lectures, primers, textook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, MathCad and MAPLE, logs, related physical prolems, please visit http://numericalmethodsengusfedu/topics/lu_decompositio nhtml
THE END http://numericalmethodsengusfedu