\(\newcommand{\B}[1]{ {\bf #1} }\)
\(\newcommand{\R}[1]{ {\rm #1} }\)
\(\newcommand{\W}[1]{ \; #1 \; }\)
ldlt_rcond
View page source
Testing the LDLT Reciprocal Condition Number Approximation
Background
An LDLT factorization of a symmetric matrix A determines
a permutation matrix P,
a unitary lower triangular matrix L,
and a diagonal matrix D such that
\(P * A * P^T = L * D * L^T\) .
The condition reciprocal condition number is the minimal absolute element
of D divided by the maximum absolute element of D.
Given the elements of A,
we need to be able to compute the elements of D to test
the computation of this reciprocal condition number.
Test Case
Suppose that A is a two by two symmetric matrix
ans use the following notation for the elements of A, L, and D
\[\begin{split}A = \begin{pmatrix}
a & b \\
b & c
\end{pmatrix}
\text{ , }
L = \begin{pmatrix}
1 & 0 \\
\ell & 1
\end{pmatrix}
\text{ , }
D = \begin{pmatrix}
d & 0 \\
0 & e
\end{pmatrix}\end{split}\]
There are two cases for the matrix P.
\[\begin{split}P = \begin{pmatrix}
1 & 0 \\
0 & 1
\end{pmatrix}
\text{ , }
P = \begin{pmatrix}
0 & 1 \\
1 & 0
\end{pmatrix}\end{split}\]
Case I
In the first case, P is the identity and
\(P * A * P^T = A\) .
It follows that
\[\begin{split}\begin{pmatrix}
a & b \\
b & c
\end{pmatrix}
= &
\begin{pmatrix}
1 & 0 \\
\ell & 1
\end{pmatrix}
\begin{pmatrix}
d & 0 \\
0 & e
\end{pmatrix}
\begin{pmatrix}
1 & \ell \\
0 & 1
\end{pmatrix}
\\
= &
\begin{pmatrix}
d & 0 \\
\ell d & e
\end{pmatrix}
\begin{pmatrix}
1 & \ell \\
0 & 1
\end{pmatrix}
\\
= &
\begin{pmatrix}
d & d \ell \\
\ell d & \ell d \ell + e
\end{pmatrix}\end{split}\]
It follows for this case that the elements of L and D are given by:
\[d = a \text{ , } \ell = b / a \text { , } e = c - b^2 / a\]
Case II
In the second case define \(B = P * A * P^T\)
\[\begin{split}B = &
\begin{pmatrix}
0 & 1 \\
1 & 0
\end{pmatrix}
\begin{pmatrix}
a & b \\
b & c
\end{pmatrix}
\begin{pmatrix}
0 & 1 \\
1 & 0
\end{pmatrix}
\\
= &
\begin{pmatrix}
b & c \\
a & b
\end{pmatrix}
\begin{pmatrix}
0 & 1 \\
1 & 0
\end{pmatrix}
\\
= &
\begin{pmatrix}
c & b\\
b & a
\end{pmatrix}\end{split}\]
This is the same as the first case except
the elements a and c have swapped places.
It follows for this case that the elements of L and D are given by:
\[d = c \text{ , } \ell = b / c \text { , } e = a - b^2 / c\]