0

I am trying to apply Cholesky Decomposition on a symmetric, voluntarily non positive definite matrix, to see how the system behaves. The matrix I am analysing is a 3*3 matrix whose eigenvalues are: -29.5, 2, 30.5. Since there is a negative eigenvalue, the matrix is not positive definite. Despite this, by applying the llt() method offered by the Eigen library, I still manage to obtain a Cholesky decomposition of my matrix. What I would like to know is if Eigen accidentally uses alternative methods (for example pseudo inverse or pseudo determinant) to solve the problem anyway. Can we say that the llt() method works (albeit with stability problems) even for non positive definite matrices?

  • 1
    You did not check if `llt().info() == Eigen::Success`, right? For semi-definite matrices, you can use `ldlt()`, which sometimes also works for indefinite matrices (you need to try if it works for you and check the `.info()` value unless you are certain that the decomposition can't fail). – chtz Apr 14 '20 at 18:02
  • No, I haven't actually verified that llt().info() == Eigen::Success. llt() stops prematurely if it encounters a pivot that is <= 0. The part of the resulting L matrix up to this point will be "correct", but all the rows after should simply be (part of) the rows of my initial matrix.Thanks for your help. – Tommaso Ferrari Apr 16 '20 at 06:38

0 Answers0