lu decomposition and matrix inversion chapter 10
DESCRIPTION
LU Decomposition and Matrix Inversion Chapter 10. Credit: Prof. Lale Yurttas, Chemical Eng., Texas A&M University. 0. 0. Solve A . x = b (system of linear equations) Decompose A = L . U * L : Lower Triangular Matrix U : Upper Triangular Matrix. - PowerPoint PPT PresentationTRANSCRIPT
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1
LU Decomposition and
Matrix Inversion
Chapter 10
Credit: Prof. Lale Yurttas, Chemical Eng., Texas A&M University
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2
Solve A . x = b (system of linear equations)
Decompose A = L . U
*
L : Lower Triangular Matrix U : Upper Triangular Matrix
00
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3
To solve [A]{x}={b}
[L][U]=[A] [L][U]{x}={b}
Consider [U]{x}={d}[L]{d}={b}
1. Solve [L]{d}={b} using forward substitution to get {d}
2. Use back substitution to solve [U]{x}={d} to get {x}
Both phases, (1) and (2), take O(n2) steps.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4
333231
232221
131211
aaa
aaa
aaa
A
bxA bxUL
[ U ][ L ]
33
2322
131211
3231
21
00
0
1
01
001
u
uu
uuu
ll
l
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
''
'
''
''
3
2
1
3
2
1
33
2322
131211
00
0
b
b
b
x
x
x
a
aa
aaa
5
3
2
1
3
2
1
333231
232221
131211
b
b
b
x
x
x
aaa
aaa
aaa
Gauss Elimination
bxA bxUL
[ U ]
1
01
001
3231
21
ll
lLCoefficients used during the elimination step
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
6
''
''
33
2322
131211
3231
21
333231
232221
131211
00
0
1
01
001
a
aa
aaa
ll
l
aaa
aaa
aaa
A
[ L . U ]
?32
11
3131
11
2121
l
a
al
a
al
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
7
300
140
55.21
134
012
001
20224
1192
55.21
Example: A = L . U
20224
1192
55.21Coefficients
l21 = -2/-1= 2
l31 = 4/-1= -4
0120
140
55.21
l32 = -12/4= -3
Gauss Elimination
[ U ]
[ L ]
1??4
012
001
L
134
012
001
L
0120
140
55.21
300
140
55.21
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.8
Example: A = L . U
55.21
1192
20224Coefficients
l21 = -2/4= -.5
l31 = -1/4= -.25
10 0
030
20224
120
030
20224Coefficients
l32 = -2/-3
Gauss Elimination with pivoting
[ U ]
pivoting
20224
1192
55.21
120
030
20224
pivoting
1??25.0
01
001
0.5L
1??
0125.0
001
0.5
1
0125.0
001
0.660.5
55.21
1192
20224
030
0
20224
12
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
9
• Gauss Elimination can be used to decompose [A] into [L] and [U]. Therefore, it requires the same total FLOPs as for Gauss elimination:
In the order of (proportional to) N3 where N is the # of unknowns.
• lij values (the factors generated during the elimination step) can be stored in the lower part of the matrix to save storage. This can be done because these are converted to zeros anyway and unnecessary for the future operations.
• Provides efficient means to compute the matrix inverse
LU decomposition
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10
MATRIX INVERSE
A. A-1 = I
100
010
001
333231
232221
131211
333231
232221
131211
xxx
xxx
xxx
aaa
aaa
aaa
0
0
1
31
21
11
333231
232221
131211
x
x
x
aaa
aaa
aaa
Solve in n=3 major phases
1 2 3
0
1
0
32
22
12
333231
232221
131211
x
x
x
aaa
aaa
aaa
1
0
0
33
23
13
333231
232221
131211
x
x
x
aaa
aaa
aaa
Solve each one
using A=L.U method e.g.
0
0
1
31
21
11
x
x
x
LU
Solve Problem 10.6. Solution file is available on the web
Each solution takesO(n2) steps.
Therefore, The Total time = O(n3)