next | previous | forward | backward | up | top | index | toc | home

ldl -- LDL' factorization of a positive semidefinite matrix

Synopsis

Description

If A is a positive semidefinite matrix, ldl returns a lower triangular matrix L with ones in the diagonal, a diagonal matrix D and a permuation matrix P such that L'*D*L = P'*A*P.
i1 : A = matrix{{5,3,5},{3,2,4},{5,4,10}}

o1 = | 5 3 5  |
     | 3 2 4  |
     | 5 4 10 |

              3        3
o1 : Matrix ZZ  <--- ZZ
i2 : (L,D,P,err) = ldl(A)

o2 = (| 1   0   0 |, | 10 0   0 |, | 0 1 0 |, 0)
      | 1/2 1   0 |  | 0  5/2 0 |  | 0 0 1 |
      | 2/5 2/5 1 |  | 0  0   0 |  | 1 0 0 |

o2 : Sequence