370 likes | 574 Views
ECIV 301. Programming & Graphics Numerical Methods for Engineers Lecture 18 LU Decomposition and Matrix Inversion. EXAMPLE. Eliminate Column 1. PIVOTS. Eliminate Column 1. Eliminate Column 2. PIVOTS. { b }. Eliminate Column 2. Upper Triangular Matrix. Modified RHS. [ U ].
E N D
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 18 LU Decomposition and Matrix Inversion
Eliminate Column 1 PIVOTS
Eliminate Column 2 PIVOTS
{ b } Eliminate Column 2 Upper Triangular Matrix Modified RHS [ U ]
LU Decomposition PIVOTS Column 1 PIVOTS Column 2
LU Decomposition Upper Triangular Matrix U As many as, and in the location of, zeros
LU Decomposition PIVOTS Column 2 PIVOTS Column 1 Lower Triangular Matrix L
LU Decomposition = This is the original matrix!!!!!!!!!!
LU Decomposition [ A ] { x } { b } [ L ] { y } { b }
LU Decomposition L y b
{ b } LU Decomposition Modified RHS
LU Decomposition • Ax=b • A=LU - LU Decomposition • Ly=b - Solve for y • Ux=y - Solve for x
Matrix Inversion [A] [A]-1 [A] [A]-1=[I] If [A]-1 does not exist [A] is singular
Matrix Inversion Solution
Matrix Inversion [A] [A]-1=[I]
Matrix Inversion • To calculate the invert of a nxn matrix solve n times :
Matrix Inversion • For example in order to calculate the inverse of:
Matrix Inversion • First Column of Inverse is solution of
Matrix Inversion • Second Column of Inverse is solution of
Matrix Inversion • Third Column of Inverse is solution of:
Use LU Decomposition – 1st column • Forward SUBSTITUTION
Use LU Decomposition – 1st column • Back SUBSTITUTION
Use LU Decomposition – 2nd Column • Forward SUBSTITUTION
Use LU Decomposition – 2nd Column • Back SUBSTITUTION
Use LU Decomposition – 3rd Column • Forward SUBSTITUTION
Use LU Decomposition – 3rd Column • Back SUBSTITUTION