Professional Documents
Culture Documents
Choleskyfactorisation PDF
Choleskyfactorisation PDF
6. Cholesky factorization
triangular matrices
forward and backward substitution
the Cholesky factorization
solving Ax = b with A positive definite
inverse of a positive definite matrix
permutation matrices
sparse Cholesky factorization
6-1
Triangular matrix
a square matrix A is lower triangular if aij = 0 for j > i
a11
a21
..
0
a22
..
A=
an1,1 an1,2
an1
an2
0
0
0
0
...
0
0
an1,n1
0
an,n1 ann
Cholesky factorization
6-2
Forward substitution
solve Ax = b when A is lower triangular with nonzero diagonal elements
b1
x1
a11
0 0
a21 a22 0 x2 b2
.
..
..
...
.. = ..
.
bn
xn
an1 an2 ann
algorithm:
x1 := b1/a11
x2 := (b2 a21x1)/a22
6-3
Back substitution
solve Ax = b when A is upper triangular with nonzero diagonal elements
x1
a11
a1,n1
a1n
b1
..
..
...
.. ..
..
6-4
X1 X2 Xn
e1 e2 en
6-5
Cholesky factorization
every positive definite matrix A can be factored as
A = LLT
where L is lower triangular with positive diagonal elements
cost: (1/3)n3 flops if A is of order n
Cholesky factorization
6-6
a11,
L21 =
1
l11
A21
6-7
1
A21AT21
a11
Cholesky factorization
6-8
Example
5 3 1
5 0
0
25 15 5
15 18
0 = 3 l22 0 0 l22 l32
0 0 l33
1 l32 l33
5 0 11
second column of L
18 0
3
l22 0
l22 l32
3 1 =
0 11
1
l32 l33
0 l33
Cholesky factorization
9 3
3 10
3 0
1 l33
3 1
0 l33
6-9
2
third column of L: 10 1 = l33
, i.e., l33 = 3
conclusion:
5 3 1
5 0 0
25 15 5
15 18
1
0 = 3 3 0 0 3
0 0
3
1 1 3
5 0 11
Cholesky factorization
6-10
algorithm
factor A as A = LLT
solve LLT x = b
forward substitution Lz = b
back substitution LT x = z
cost: (1/3)n3 flops
factorization: (1/3)n3
forward and backward substitution: 2n2
Cholesky factorization
6-11
X = LT L1 is a left inverse of A:
XA = LT L1LLT = LT LT = I
6-12
Summary
if A is positive definite of order n
Cholesky factorization
6-13
6-14
Effect of ordering
sparse equation (a is an (n 1)-vector with kak < 1)
T
u
b
1 a
=
v
c
a I
factorization
T
T
1 a
1 0
1 a
=
where I aaT = L22LT22
T
a L22
a I
0 L22
6-15
reordered equation
I
aT
a
1
v
u
c
b
factorization
I
aT
a
1
I
aT
0
1 aT a
I a
0
1 aT a
6-16
Permutation matrices
a permutation matrix is the identity matrix with its rows reordered, e.g.,
0 1 0
0 1 0
0 0 1
1 0 0 ,
1 0 0
0 0 1
the vector Ax is a permutation of x
x2
x1
0 1 0
0 0 1 x2 = x3
x1
x3
1 0 0
AT x is the inverse permutation applied to x
x3
x1
0 0 1
1 0 0 x2 = x1
x2
x3
0 1 0
AT A = AAT = I, so A is invertible and A1 = AT
Cholesky factorization
6-17
example
1.5
x1
0 1 0
0 0 1 x2 = 10.0
2.1
x3
1 0 0
solution is x = (2.1, 1.5, 10.0)
Cholesky factorization
6-18
Cholesky factorization
6-19
Example
sparsity pattern of A
Cholesky factor of A
pattern of P T AP
Cholesky factor of P T AP
Cholesky factorization
6-20
interpretation: we solve
(P T AP ) y = b
Cholesky factorization
6-21