Beruflich Dokumente
Kultur Dokumente
6-1
Positive-Definite Matrices
A real matrix is said to be positive definite if
6-2
(SPD) matrices.
Consequence 1: A is nonsingular
Consequence 2: the eigenvalues of A are (real) positive
6-3
6-4
is SPD.
6-5
The mapping :
x, y
1/2
kxkA = (Ax, x)
= xT Ax
Related measure in Machine Learning, Vision, Statistics:
two vectors:
the Mahalanobis distance between
p
dA(x, y) = kx ykA = (x y)T A(x y)
Appropriate distance (measured in # standard deviations)
if x is a sample generated by a Gaussian distribution with
covariance matrix A and center y.
6-6
More terminology
A matrix is Positive Semi-Definite if
6-7
6-8
LDM
| {z }
MT
6-9
Consider L1ALT = DM T LT
Matrix on the right is upper triangular. But it is also
6-10
6-11
row-oriented LDLT
6-12
1. For k = 1 : n Do:
p
2.
A(k, k : n) = A(k, k : n)/ A(k, k) ;
3.
For i := k + 1 : n Do :
4.
A(i, i : n) = A(i, i : n) A(k, i) A(k, i : n);
5.
End
6. End
Result: Upper triangular matrix U such A = U T U .
6-13
Example:
1 1 2
A = 1 5 0
2 0 9
- Is A symmetric positive definite?
- What is the LDLT factorization of A ?
- What is the Cholesky factorization of A ?
6-14
Column Cholesky.
Let A = GGT with G = lower triangular. Then equate
j-th columns:
Pj
a(i, j) = k=1 g(j, k)g T (k, i)
A(:, j) =
j
X
G(j, k)G(:, k)
k=1
= G(j, j)G(:, j) +
j1
X
k=1
6-15
j1
X
G(j, k)G(:, k)
G(j, k)G(:, k)
k=1
v = A(:, j)
j1
X
G(j, k)G(:, k)
k=1
p
Compute
v(j) scale v to get j-th column of G.
6-16
ALGORITHM : 2
Column Cholesky
1. For j = 1 : n do
2.
For k = 1 : j 1 do
3.
A(j : n, j) = A(j : n, j) A(j, k) A(j : n, k)
4.
EndDo
5.
If A(j, j)
0 ExitError(Matrix not SPD)
p
6.
A(j, j) = A(j, j)
7.
A(j + 1 : n, j) = A(j + 1 : n, j)/A(j, j)
8. EndDo
Example:
1 1 2
A = 1 5 0
2 0 9
6-17
Banded matrices
Banded matrices arise in many applications
A has upper bandwidth q if aij = 0 for j i > q
A has lower bandwidth p if aij = 0 for i j > p
6-18
2.
3.
4.
5.
6.
7.
6-19
For i = 2 : n Do:
ai1 := ai1/a11 (pivots)
For j := 2 : n Do :
aij := aij ai1 a1j
End
End
6-20
6-21
Example:
A=
0
0
6-22
1
1
2
0
0
0
1
1
2
0
0
0
1
1
2