Download Direct Methods for Linear Systems-Numerical Analysis-Lecture Slides and more Slides Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!
Chapter 6 Direct Methods for LinearSystems
docsity.com
Outline
- Systems of linear equations^ ā Existence and uniqueness review^ ā Gaussian Elimination basics^ ⢠LU factorization^ ⢠Pivoting
docsity.com
Example 1 The four equations+3^4 x x x + = 1 2 4 2 +^1 x x x^ x + ā^ = 1 2 3 4 3 +2^3 x x x^ x ā ā^ = ā 1 2 3 4 2 +3^4 x x x^ x ā + ā^ = 1 2 3 4 Give the unique solution as1, =2,^ 0,^1 x x^ x^ x = ā =^ = 1 2 3 4 However, direct solution of these equation is computationallyvery expensive
docsity.com
Methods for solving linear equations ⢠Direct methods: find the exact solution in afinite number of steps, subject only to roundofferrors, e.g., Gaussian Elimination method ⢠Iterative methods: produce a sequence asequence of approximate solutions hopefullyconverging to the exact solution, e.g., JacobiIterative method
docsity.com
Gaussian Elimination Reminder by 3x3 example^11 12
ā”^ ā¤^^ M^ M^ M^ x^ b ā”^ ā¤^ ā”^ ā¤^1 1 ā¢^ ā„^ ā¢^ ā„^ ā¢^ ā„^ M^ M^ M^ x^ b =^21 22 23 2 2 ā¢^ ā„^ ā¢^ ā„^ ā¢^ ā„ ā¢^ ā„^ ā¢^ ā„^ ā¢^ ā„^ x^ bM^ M^ M^3 331 32 33 ā£^ ā¦^ ā£^ ā¦ā£^ ⦠M^ x^ M^ x^ M^ x^ b +^ +^ =^11 1 12 2 13 3 1 M^ x^ M^ x^ M^ x^ b +^ +^ =^21 1 22 2 23 3 2 M^ x^ M^ x^ M^ x^ b +^ +^ =^31 1 32 2 33 3 3 docsity.com
Gaussian Elimination Basics
Use Eqn 1 to Eliminate x
from Eqn 2 and 3 1 M x M x^ M^ x^ b + +^ = 11 1 12 2 13 3 1 21 21
21 22 12 2
23 13 3
2 1 11
11 11 M^
M^ M M^ M^ x^
M^ M^ x^
b^ b M^
M^ M ā^ ā^
ā^ ā ā + ā^ =^ ā ā^ ā^
ā^ ā ā^ ā ^
ā^ ā 31 31
31 32 12 2
33 13 3
3 1 11
11 11 M^
M^ M M^ M^ x^
M^ M^ x^
b^ b M^
M^ M ā^ ā^
ā^ ā ā + ā^
=^ ā ā^ ā^
ā^ ā ā^ ā ^
ā^ ā
docsity.com
GE Basics^ ā Key idea in the matrix^ Pivot 11 12 13 21 2122 12 23 1211 11 3132 121131 Multiplier
(^2133 12 23 1211 112122 ) M^ M^ M M^^00
MM M M MM M MM^ MMM MM M M^ MM MMM^ MM ā”^
⤠ā¢^
ā„ ā¢^
ā„ ā¢^
ā„ ā¢^
ā„ ā¢^
ā„ ā¢^
ā„ ā¢^ ā^ ā^ ā^
ā ā¢^ ā^ ā^
ā^ āā āā ā ā āā ā ā^ ā ā¢^ ā^ ā ^
ā^ ā ā ā ā ā ⢠⢠⢠ā¢^ ā^
āā āā āā ā^
ā ā¢^ ā^
āā ā ā^ āā ā ā^ āā ā ā ā ā¢^ ā^
ā ā ā āā^ āā ā ā^ āā ā ā¢^ ā^
āā āā ā ā^ ā ā^ ā ā ā ā¢^
āā āā^ āā ā ā¢^
ā^ ā ā¢^ ā^
ā ā ā ā£^
(^1 1212 11123132 121131 213 1 2) ⦠x^ ā” ā¤^ b ā”^ ā¤ā¢ ā„^ ā¢^ ā„⢠ā„^ ā¢^ ā„⢠ā„^ ā¢^ ā„⢠ā„^ ā¢^ ā„⢠ā„^ ā¢^ ā„⢠ā„^ ā¢^ ā„ M ā^ ā⢠℠b^ bMx MM^ MMM^ Mb^ b^ b^ b^1 M^ MM^11 1121 M^ M^22 12 M^11 x^3 ā„^ ā¢^ ā ā^ āā¢^ ā„ā„^ ā¢^ ā^ ā ā¢^ ā„ā„^ = ā¢ā¢^ ā„ā„^ ā¢ā¢^ ā„ā„^ ā¢ā¢^ ā„ā„^ ā¢ā¢^ ā„ā„^ ā^ āā^ āā¢ā¢^ ā„^ āā^ āā„^ ā^ āā¢^ ā^
āā ā ā ā ā¢^ ā„^ ā^ ā ā^ ā ā„ ā¢^ ā^ ā^ āā^
āā ā ā ā ā¢^ ā„ā„ ā¢^ ā^ āā^ āā^ ā ^ ā^ ā ā^
ā ā¢^ ā„ā„ āā¢^ ā^ āā^ āā¢^ ā„ā„ ā¢^ ā^ ā ā^ ā ā„ ā£^
⦠ā¢^ ā„ā£^ ā¦
ā„ ā„ ā„ ā„ ā„ ā„ ā„ ā„ ā„ ā„ ā„ā„
Remove xfrom eqn 3^2
docsity.com
1 1 11 12
13 21 21 21 22 12 23
12 2 2 1 11 11
11 31 3132 12 33
123 11 11
3 3 (^00)
x^ b M^ M^
M M M^ M
M^ M^ M^
M^ x^ b^ b M^ M^
M
M^ MM M^ M^
M^ M
M^ M^
ā”^ ⤠x^ b ā”^
⤠ā¢^ ā„
ā¢^
ā„ ā¢^ ā„
ā¢^
ā„ ā¢^ ā„
ā¢^
ā„ ā¢^ ā„
ā¢^
ā„ ā¢^ ā„
ā¢^
ā^ ā^ ā^
ā^ ā^ ā^
ā^ ā^ āā¢^ ā„
ā^ ā^
=^ ā
ā¢^
ā^ ā^ ā^
ā^ ā^ ā^
ā^ ā^ āā¢^ ā„
ā¢^
ā^ ā ^ ā^
ā ^ ā^ ā
ā^ ā ^ ā^
ā ā¢^ ā„
ā¢^
ā„ ā¢^ ā„
ā¢^
ā„ ā¢^ ā„
ā¢^
ā^ ā^ ā^
ā^ ā^ ā^
ā^ ā¢^ ā„
ā¢^
ā^ āā ā^ ā^
ā^ ā^ ā^
ā^ ā¢^ ā„
ā¢^
ā^ ā ^ ā^
ā^ ā ^ ā^
ā£^
ā”^ ⤠ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ ā¢^ ā„ā^ ā^1 ⦠⢠℠ā^ b ⣠⦠1 ā¢^ ā„ā^ ā M ā¢^ ā„^11 ā^ ā ā£^ ⦠^ MM^2322 ^ ^ MM^3233
b^2 b^3
GE Basics^ ā Simplify the notation^ Remove xfrom eqn 2 and eqn 3^1
docsity.com
GE Basics^ ā GE yields triangular system
AlteredDuringGE b ā”^ ⤠xM M M^1 ā” ā¤ā” ⤠111 12 13 ā¢^ ā„⢠ā„⢠℠0 M M bx = 222223 ā¢^ ā„⢠ā„⢠℠(^) ~ ~ ā¢^ ā„⢠ā„⢠℠0 0 Mx b (^333) ⣠ā¦ā£ ⦠3 ā£^ ⦠U U U x y ā” ā¤ā” ⤠ā”^ ⤠(^11 12 13 1 1) ⢠ā„⢠℠ā¢^ ā„ 0 U U x y = (^22 23 2 2) ⢠ā„⢠℠ā¢^ ℠⢠ā„⢠℠ā¢^ ā„ 0 0 U x y (^33 3 3) ⣠ā¦ā£ ⦠ā£^ ⦠docsity.com
y^3 x = 3 U^33^ y^ U^ x^ ā^2 23 3 x^^ =^2 U^221 U^ U^ U^ x^ y^11 12 13 1 10 U^ U^ x^ y^22 23 2 20 0 U^ x^ y^33 3 3^ y^ U^ x^ U^ x^ ā^ ā^12 2 13 3 x^ =^1 U^11
ā”^ ā¤ā”^ ā¤^ ā”^
ā¢^ ā„ā¢^ ā„^ ā¢^
ā¢^ ā„ā¢^ ā„^ ā¢^
ā¢^ ā„ā¢^ ā„^ ā¢^
ā£^ ā¦ā£^ ā¦^ ā£^
GE Basics^ ā Backward substitution
docsity.com
GE basics: summary (1) M x = b U x = y^
Equivalent system U:^ upper trigonal
(2) Noticed that:^ Ly = b^
L:^ unit lower trigonal
GE (3) U x = y LU x = b^ ā^ M x = b ā Efficient way of implementing GE: LU factorization
docsity.com
Matrix Factorization If Gaussian elimination can be performed on a liner system M x = bwith out row interchange, the matrix M can be factored into theproduct of lower-triangular matrix L and an upper-triangular matrix U. To Solve^ M x = b Step 1^ M = L U^ = Step 2^ Forward Elimination^ Solve^ L y = b Step 3^ Backward Substitution^ Solve^ U x = y
docsity.com
GE Basics^ ā Fitting the pieces together
MMM ā¤ā”^131211 ~~ā„⢠= 0 MMU^2322 ā„ā¢ā^ ā„⢠00 M^33 ā¦ā£
ā¤ā” ā„⢠001 ā„⢠ā„⢠M 21 ā„ā¢= 01 L ā„⢠M 11 ā„ā¢~ MM ā„⢠32311 ~ ā„⢠M 11 ⣠22 M ⦠ā¤ā” ā„⢠MMM^312111 ā„⢠ā„ā¢~~ M^21 ā„⢠MM^2322 ā„⢠M^11 ā„ā¢~ ā MM ā„ā¢^3231^ M^33 ~^ ā„⢠M^11 M ā¦ā£^22
docsity.com
M^ M^
M^ M
M^ M^
M^ M
M^ M^
M^ M
M^ M^
M^ M
ā”^
ā¢^
ā¢^
ā¢^
ā¢^
ā£^
MM^3433 M 4 3 MMM MM ā¦^4443444344 M 3 3
M^ M^^2223 M^32
M^24
M^ 3 2 M^^33 M 2 2 M^ 4 2 M^42 M 2 2
M^34
LU factorization Basics^ M^21^ M^11^ M^31^ M^11^ M^41^ M^11
ā Picture docsity.com