1
$\begingroup$

I need to determine whether a real dense symmetric matrix is positive definite or not.

One possible way is to obtain all the eigen values and check the sign of the minimum eigen value but requires computing all eigen values which seems unnecessary.

It was said congruent transform should be more efficient to do this.

Does C++ Eigen template library have such congruent transform implementation or efficient way to immediately determine whether a symmetric matrix is positive definite or not?

Or any other C++ implementation to do this?

$\endgroup$
1
$\begingroup$

An LDLT decomposition will give you the information you need. If the diagonal $D$ matrix from the LDLT decomposition of your matrix is positive definite, your matrix is also positive definite. Here is a link to some documentation discussing the LDLT decomposition in Eigen: http://eigen.tuxfamily.org/dox-2.0/TutorialAdvancedLinearAlgebra.html

$\endgroup$
  • $\begingroup$ Thank you very much . This should also be desired congruent transform for symmmetric matrix. $\endgroup$ – LCFactorization Dec 23 '13 at 3:42
  • 1
    $\begingroup$ Related: An non-pivoted LU factorization gives the same result. If it fails, there are non-positive eigenvalues, if it succeeds, the L is the same as in the LDLT factorization and the diagonal of U has the entries of D. But if you have LDLT available, use it. $\endgroup$ – LutzL Dec 23 '13 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.