mathnet-numerics
mathnet-numerics copied to clipboard
Matrix must be positive definite
Is there a way for checking that a matrix is not "positive definite"?
Regards Martin
I am not sure this is an easy question to answer in a general way. It depends on whether the matrix is symmetric or not, or if you are interested to check if the matrix can be negative definite.
If you are just interested to check that the matrix is semi-positive definite, this would mean that there exists a vector x, such that x^T * A * x = 0. So if you find a non-trivial null space for the matrix, then you have your answer.
From https://mathworld.wolfram.com/PositiveDefiniteMatrix.html:
The following are necessary (but not sufficient) conditions for a Hermitian matrix A (which by definition has real diagonal elements $a_{ii}$) to be positive definite.
- $a_{ii}>0$ for all $i$,
- $a_{ii}+a_{jj} > 2|\Re(a_{ij})|$ for $i \neq j$,
- The element with largest modulus lies on the main diagonal,
- $\det(A)>0$.
So if any of those conditions fail, you know the matrix is not p.d.