Professional Documents
Culture Documents
06w1 Decomposition Methods
06w1 Decomposition Methods
Decomposition Methods
mustafaaggul@hacettepe.edu.tr
Consider the simple linear equation, 18x = 486. To solve this equation
for x, our intuition leads us to cancel multiples of 2 or 3 from both sides
instead of 18 directly. The idea is to factorize the number 18 as 2 · 3 · 3
first and then perform easier divisions.
For an analog of this idea in the system of linear equations, consider
Ax = b. Assume A = LU such that L is a lower triangular and U is an
upper triangular matrix1 . Hence,
Ax = b ⇒ LU x = b ⇒ Ly = b and U x = y.
Lk . . . L2 L1 A = U.
Multiply this equality from the left by L−1 −1 −1
k , . . . , L2 , L1 in the given
order to get
A = L−1 −1 −1
1 L2 . . . Lk U.
Choosing2 L = L−1 −1 −1
1 L2 . . . Lk , we obtain L and U matrices.
2
Li ’s are always lower triangular matrices. Inverses of such matrices and
their products with one another are always lower triangular matrices.
Dr. Mustafa Ağgül Hacettepe University
Decomposition by Gaussian Elimination
MAT307 Numerical Analysis Doolittle and Crout Decompositions
Cholesky Decomposition
Example
Multiply given A from the left by L1 , L2 and L3 in the given order.
1 0 0 0 3 −7 −2 2 3 −7 −2 2
1 1 0 0 −3 5 1 0 = 0 −2 −1 2
−9
−2 0 1 0
6 −4 0 −5 0 10 4
3 0 0 1 −9 5 −5 12 0 −16 −11 18
| {z }| {z }
L1 A
1 0 0 0 3 −7 −2 2 3 −7 −2 2
0 1 0 0 0 −2 −1 2 = 0 −2 −1 2
−1
0 5 1 0
0 10 4 −9 0 0 1
0 −8 0 1 0 −16 −11 18 0 0 −3 2
| {z }| {z }
L2 L1 A
1 0 0 0 3 −7 −2 2 3 −7 −2 2
0 1 0 0 0 −2 −1 2 = 0 −2 −1 2 .
−1 −1
0 0 1 0
0 0 1
0 0 1
0 0 −3 1 0 0 −3 2 0 0 0 −1
| {z }| {z } | {z }
L3 L2 L1 A U
Example
Therefore, L3 L2 L1 A = U . Then the matrix L for which A = LU should
be L = (L3 L2 L1 )−1 . Start with finding the matrix L3 L2 L1 :
1 0 0 0 1 0 0 0 1 0 0 0
1 1 0 0 0 1 0 0 0 1 0 0
L3 L2 L1 =
−2
0 1 0
0 5 1 0
0 0 1 0
3 0 0 1 0 −8 0 1 0 0 −3 1
1 0 0 0
1 1 0 0 .
=
−2
5 1 0
3 −8 −3 1
1 0 0 0
−1 1 0 0
By the theorem, L = (L3 L2 L1 )
−1
=
can be found.
−5
2 1 0
−3 8 3 1
Example
" #
1 2 −1
Consider the matrix A = 2 0 1 .
0 1 2
" #" # " # " #
1 0 0 1 2 −1 1 2 −1 1 0 0
−2 1 0 2 0 1 = 0 −4 3 , 2 1 0 .
0 0 1 0 1 2 0 1 2 0 0 1
| {z }
=L−1
1
" #" # " # " #
1 0 0 1 2 −1 1 2 −1 1 0 0
0 1 0 0 −4 3 = 0 −4 3 , 0 1 0 .
0 1 1 0 1 2 11 1
4 0 0 4
0 −4 1
| {z } | {z }
=U =L−1
2
" # " #" #
1 2 −1 1 0 0 1 2 −1
Thus, A = 2 0 1 = 2 1 0 0 −4 3 .
0 1 2 0 1
−4 1 0 0 11
4
| {z }| {z }
=L=L−1 −1
1 L2
=U
Definition
Doolittle’s and Crout’s methods are also LU decompositions. Doolittle
decomposition assumes 1’s on the diagonal of the matrix L, while Crout’s
approach requires the same for the matrix U .
5 4 1 1 0 0 5 4 1
A = 10 4 = 2 2 → Doolittle
9 1 0 0 1
10 13 15 2 5 1 0 0 3
4 1
5 4 1 5 0 0 1 5 5
A = 10 4 = 10 2 → Crout
9 1 0 0 1
10 13 15 10 5 3 0 0 1
Example
Consider the following matrix for Doolittle Decomposition:
a11 a12 ... a1n 1 0 ... 0 u11 u12 ... u1n
a21 a22 ... a2n `21 1 ... 0 0 u22 ... u2n
. . . . = . . . . . . . .
. . .. . . . .. . . . . .
.
. . .
. . .
. . .
an1 an2 ... ann `n1 `n2 ... 1 0 0 ... unn
Algorithm
Consider the following matrix for Doolittle Decomposition:
a11 a12 ... a1n 1 0 ... 0 u11 u12 ... u1n
a21 a22 ... a2n `21 1 ... 0 0 u22 ... u2n
. . . . = . . . . . . . .
. . . . . . . . . . . .
. . .
. . .
. . .
. . .
an1 an2 ... ann `n1 `n2 ... 1 0 0 ... unn
Example
5 4 1 1 0 0 u11 u12 u13
= `21 u22 u23
10 9 4 1 0 0
10 13 15 `31 `32 1 0 0 u33
Example
5 4 1 1 0 0 5 4 1
= 2 u22 u23
10 9 4 1 0
0
10 13 15 2 `32 1 0 0 u33
`32 = 5.
Example
5 4 1 1 0 0 5 4 1
= 2
10 9 4 1 0
0 1 2
10 13 15 2 5 1 0 0 u33
u33 = 3.
5 4 1 1 0 0 5 4 1
= 2
10 9 4 1 0
0 1 2
10 13 15 2 5 1 0 0 3
Example
Consider the following matrix for Crout Decomposition:
a11 a12 ... a1n `11 0 ... 0 1 u12 ... u1n
a21 a22 ... a2n `21 `22 ... 0 0 1 ... u2n
. . . . = . . . . . . . .
. . .. . . . .. . . . .. .
. . . . . . . . .
an1 an2 ... ann `n1 `n2 ... `nn 0 0 ... 1
Algorithm
Consider the following matrix for Crout Decomposition:
a11 a12 ... a1n 1 0 ... 0 u11 u12 ... u1n
a21 a22 ... a2n `21 1 ... 0 0 u22 ... u2n
. . . . = . . . . . . . .
. . . . . . . . . . . .
. . .
. . .
. . .
. . .
an1 an2 ... ann `n1 `n2 ... 1 0 0 ... unn
Example
5 4 1 `11 0 0 1 u12 u13
= `21 `22 u23
10 9 4 0 0 1
10 13 15 `31 `32 `33 0 0 1
Example
4 1
5 4 1 5 0 0 1 5 5
= 10 `22 u23
10 9 4 0 0 1
10 13 15 10 `32 `33 0 0 1
u23 = 2.
Example
4 1
5 4 1 5 0 0 1 5 5
= 10
10 9 4 1 0 0 1 2
10 13 15 10 5 `33 0 0 1
`33 = 3.
4 1
5 4 1 5 0 0 1 5 5
= 10
10 9 4 1 0
0 1 2
10 13 15 10 5 3 0 0 1
Definition
An n × n symmetric matrix A is positive-definite if and only if xT Ax > 0
for all ~0 6= x ∈ Rn .
Definition
The Cholesky decomposition of a positive-definite matrix A is a
decomposition of the form A = LLT , where L is upper triangular with
positive diagonal entries.
Algorithm
Consider the following matrix for Cholesky Decomposition:
a11 a21 ... an1 `11 0 ... 0 `11 `21 ... `n1
a21 a22 ... an2 `21 `22 ... 0 0 `22 ... `n2
. . . . = . . . . . . . .
. . .. . . . .. . . . .. .
. . . . . . . . .
an1 an2 ... ann `n1 `n2 ... `nn 0 0 ... `nn
Algorithm
a11 a21 ... an1 `11 0 ... 0 `11 `21 ... `n1
a21 a22 ... an2 `21 `22 ... 0 0 `22 ... `n2
. . . . = . . . . . . . .
. . .. . . . .. . . . .. .
. . . . . . . . .
an1 an2 ... ann `n1 `n2 ... `nn 0 0 ... `nn
Example
25 15 −5 `11 0 0 `11 `21 `31
= `21 `22 `22 `32
15 18 0 0 0
−5 0 11 `31 `32 `33 0 0 `33
`11 = 5.
25 15 −5 5 0 0 5 `21 `31
= `21 `22 `22 `32
15 18 0 0
0
−5 0 11 `31 `32 `33 0 0 `33
Example
25 15 −5 5 0 0 5 3 −1
= 3 `22 `22 `32
15 18 0 0
0
−5 0 11 −1 `32 `33 0 0 `33
`22 = 3.
25 15 −5 5 0 0 5 3 −1
= 3 `32
15 18 0 3 0
0 3
−5 0 11 −1 `32 `33 0 0 `33
`32 = 1.
Example
25 15 −5 5 0 0 5 3 −1
= 3
15 18 0 3 0
0 3 1
−5 0 11 −1 1 `33 0 0 `33
`33 = 3.
25 15 −5 5 0 0 5 3 −1
= 3
15 18 0 3 0
0 3 1
−5 0 11 −1 1 3 0 0 3