LU_factorization.pdf
description
Transcript of LU_factorization.pdf
LU Factorization
Shahid Hussain
Department of Computer Science & EngineeringBahria University, Karachi Campus
March 3, 2009
Outline
1 LU Factorization
Elimination = Factroization
Let A =[
2 16 8
]. Subtract 3 times row 1 from 2. That step is
E21 in the forward direction i.e.,
Forward: E21A =[
1 0−3 1
] [2 16 8
]=[
2 10 5
]= U
Backward: E−121 A =
[1 03 1
] [2 10 5
]=[
2 16 8
]= A
LU Decomposition
A = LU
Let A be a square matrix. An LU decomposition is adecomposition of the form
A = LU
where L and U are lower and upper triangular matrices (of thesame size), respectively. This means that L has only zeros abovethe diagonal and U has only zeros below the diagonal. For a 3× 3matrix, this becomes:a11 a12 a13
a21 a22 a23
a31 a32 a33
=
l11 0 0l21 l22 0l31 l32 l33
u11 u12 u13
0 u22 u23
0 0 u33
.
Example
8 2 94 9 46 7 79
=
l11 0 0l21 l22 0l31 l32 l33
u11 u12 u13
0 u22 u23
0 0 u33
.
Example cont.
Firs row of U , first column of L:8 2 94 9 46 7 9
=
1 0 01/2 1 03/4 l32 1
8 2 90 u22 u23
0 0 u33
.
Second row of U , second column of L:[9 47 9
]−[1/23/4
] [2 9
]=
[1 0l32 1
] [u22 u23
0 u33
][
8 −1/211/2 9/4
]=
[1 0
11/16 1
] [8 −1/20 u33
]Third row of U : u33 = 9/4 + 11/32 = 83/32.
Result
8 2 94 9 46 7 9
=
1 0 01/2 1 03/4 11/16 1
8 2 90 8 −1/20 0 83/32
.
Do it yourself
Factorize the following matrix A into its LU factors.3 2 12 1 46 2 5
The result. (How?)
3 2 12 1 46 2 5
=
1 0 02/3 1 02 6 1
3 2 10 −1/3 10/30 0 −17
.
A = LDU Factorization
A = LDU
The triangular factorization can be written as
A = LU or A = LDU
Whenever you see LDU it is understood that U has 1’s on thediagonal. For example:[
1 03 1
] [2 80 5
]=[1 03 1
] [2
5
] [1 40 1
].