Chap 10
Chap 10
P
Chapter 10
LU Factorization
F t i ti
[M
[MATLAB 함수] f 21
a21 a
f 31 31
'
a32
f 32 '
>> [L,U] = lu(X) a11 a11 a22
Check : f 21a12 a 22
'
f 21a12 f 21a12 a 22 a 22
Gauss Elimination as
LU Factorization
• [A]{x}={
} {b} can be
b rewritten
i as [L][U]{x}={
} {b}
using LU factorization.
Th LU factorization
• The f t i ti algorithm
l ith requiresi the
th
same total flops as for Gauss elimination.
• The
Th main i advantage
d t i once [A] is
is i
decomposed, the same [L] and [U] can be
used for multiple {b} vectors.
vectors
• MATLAB’s lu function can be used to generate
the [L] and [U] matrices:
[L, U] = lu(A)
Example
p 10.1+10.2 ((1/4))
Q. To use LU decomposition 3x1 0.1x2 0.2 x3 7.85
to solve this problem. 0.1x1 7 x2 0.3 x3 19.3
0.3x1 0.2 x2 10 x3 71.4
3 0.1 0.2
Forward Elimination: [U ] 0 7.00333 0.293333
0 0 10.0120
1 3 0 .1 0 .2
[ A] [ L][U ] 0.0333333 1 0 7.00333 0.293333
0.100000 0.0271300 1 0 0 10.0120
3 0.1 0.2
0.3 [ A]
Confirm: [ L][U ] 0.0999999 7
0.3 0.2 9.99996
Example 10.1+10.2
10 1+10 2 (3/4)
1 0 0 d1 7.85
Substitution: 0.0333333 d 19.3
1 0 2
0.100000 0.0271300 1 d 3 71.4
d1 7.85
-> 0.0333333d1 d2 19.3
0.100000d1 0.027300d 2 d3 71.4