ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 17 Solution of Systems of Equations
Last Time Linear Equations in Matrix Form
# Equations = # Unknowns = n Square Matrix n x n
Last Time Solution of Linear Equations Express In Matrix Form Upper Triangular What is the characteristic? Solution by Back Substitution
Last Time Solution of Linear Equations Objective Can we express any system of equations in a form 0
Last Time Background Consider (Eq 1) (Eq 2) Solution 2*(Eq 1) (Eq 2) Solution !!!!!! Scaling Does Not Change the Solution
Last Time Background Consider (Eq 1) (Eq 2)-(Eq 1) Solution !!!!!! (Eq 1) (Eq 2) Solution Operations Do Not Change the Solution
Last Time Gauss Elimination Example Forward Elimination
Last Time Gauss Elimination Forward Elimination
Last Time Gauss Elimination Back Substitution
Last Time GE – Potential Problem Forward Elimination
Gauss Elimination – Potential Problem Division By Zero!! Operation Failed
Gauss Elimination – Potential Problem OK!!
Gauss Elimination – Potential Problem Pivoting
Partial Pivoting a 32 >a 22 a l2 >a 22 NO YES
Partial Pivoting
Full Pivoting In addition to row swaping Search columns for max elements Swap Columns Change the order of x i Most cases not necessary
EXAMPLE
Eliminate Column 1 PIVOTS
Eliminate Column 1
Eliminate Column 2 PIVOTS
Eliminate Column 2
LU Decomposition PIVOTS Column 1 PIVOTS Column 2
LU Decomposition As many as, and in the location of, zeros Upper Triangular Matrix U
LU Decomposition PIVOTS Column 1 PIVOTS Column 2 Lower Triangular Matrix L
LU Decomposition = This is the original matrix!!!!!!!!!!
LU Decomposition Lyb
Lyb
Ax=b A=LU -LU Decomposition Ly=b- Solve for y Ux=y- Solve for x