1

I ask this because I'm programming a function that does only take a symmetric positive definite matrix as input. But now I'm told give to the function the negation of such a matrix. That makes no sense to me, because I think it's negative definite then.

To check for a matrix to be symmetric positive definite, does it suffice to check, that it is symmetric and then to check that all its real eigenvalues are positive?

2 Answers2

4

If $x^TAx>0$ for all $x\neq 0$, then $x^T(-A)x=-x^TAx<0$ for all $x\neq 0$. So yes, if $A$ is symmetric positive definite, then $-A$ is (symmetric) negative definite.

The cheapest way how to check whether a symmetric matrix is positive definite is to compute the $LDL^T$ factorization of $A$. If all the pivots on the diagonal of $D$ are positive, then $A$ is SPD. This test is much cheaper than to compute all the eigenvalues of $A$.

1

You are correct that if $A$ is positive definite, then $-A$ is negative definite, since $$(-A)^T=-(A^T)$$ and $$z^T(-A)z=-(z^TAz)<0$$ for all non-zero real vectors $z$ of appropriate size.

Cameron Buie
  • 102,994