Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Saharudin Haron
Page 4 - 1
LU Decomposition
[A ]{X } = {C } Decomposition [U ] [L ] [L ]{ D } = {C } {D } [U ] { X } = { D } {X }
Page 4 - 2
Back substitution
Doolittle LU Decomposition
1) For matrices operation, [A ]{X } = {C }, [A] is decomposed into [L][U]: through nave gauss elimination on matrix A : factors to eliminate element a21, a31 and a32 is used to form matrix [L]
f 21 = a21 a11 f31 = a31 a11 = f32 a32 a22
a11 [U] = 0 0
a12 a22 0
So,
1 [L] = f 21 f 31
0 1 f 32
0 0 1
Page 4 - 3
Doolittle LU Decomposition
2) Intermediate vector {D} is generated,
1 f 21 f 31 0 1 f 32 [L] 0 d1 c1 0 d 2 = c2 1 c3 d3 {D} {C}
d1 = c1
f21d1 + d2 = c2 d2 = c2 - f21d1
Page 4 - 4
Doolittle LU Decomposition
3) Unknown elements, xn can be solved by back substitution on equation [U]{X} = {D},
Crout LU Decomposition
An alternative approach for the formation of matrices [L] and [U]. i.e. : n = 3, l11 0 [L] = l l 21 22 l31 l 32 0 0 l33 1 u12 [U] = 0 1 0 0 u13 u23 1
Matrices [L] and [U] are generated by sweeping through the matrix by columns and rows : a) Elements of column 1 matrix [L] : li,1 = ai,1 Elements of row 1 matrix [U] : u1,j = a1,j / l1,1 for i = 1, 2, .., n for j = 2, 3, .., n
Page 4 - 6
Crout LU Decomposition
b) Elements of column 2 to n-1matrix [L] :
lij = aij
k = j 1 k =1
lik ukj
l jj
Page 4 - 7
0 0 l33
d) Intermediate vector {D} is generated, [L ]{ D } = {C } e) Unknown elements, xn can be solved by back substitution on equation [U]{X} = {D}.
Page 4 - 8
LU Decomposition
(assignment in class)
Use the Doolittle and Crout decomposition method to solve the following equations. 2x1 - 5x2 + x3 = 12 -x1 + 3x2 - x3 = -8 3x1 - 4x2 + 2x3 = 16
Page 4 - 9
Cholesky Decomposition
A method use to decompose a symmetric matrix (aij = aji) The resulting matrices are the transpose of each other
i.e.
Cholesky Decomposition
Therefore,
Cholesky Decomposition
Steps to decompose matrix [A],
j =i 1 j =1
l21 =
for i = 1, 2, .., k-1
lki =
l31 = l32 =
lkk = akk l
j =1
j =k 1
l11 = a11
kj
2 l22 = a11 l21
Page 4 - 12