# How to check if a matrix is positive definite

I want to know how to check if a matrix M is positive definite ,assume that M is 3x3 real numbers matrix

I think one way is to put the matrix in a quadratic form $$X^TMX$$ , where X is a vector $$X^T=[x_1 x_2 x_3]$$ , my question is if I found that $$X^TMX = ax_1^2 + bx_1*x_2+ ........$$ can I say that the matrix M is not positive definite because the term $$bx_1*x_2$$ can be negative or I have to try to put the value of $$X^TMX$$ in the form of sum of squares e.g.,$$()^2+()^2+.....$$ and then decide?

and what is the relation between the positive definiteness of a matrix and its determinant?

• Note that, say, $x^2+xy+y^2$ is positive definite despite the $xy$ term. Jun 11 '12 at 13:34
• i know , but my situation here is not simple , and i have three variables. Jun 11 '12 at 13:42
• Gerry's point is that no, you can't say that the matrix is not positive definite just because you found an $x_1x_2$ term.
– user856
Jun 11 '12 at 13:52
• Jun 11 '12 at 18:07
• @DavidSpeyer exactly what i want.. thanks Jun 11 '12 at 23:17

Glancing at the wiki article on this alerted me to something I had not known, Sylvester's criterion which says that you can use determinants to test (a Hermitian matrix) for positive definiteness by checking to see if all the square submatrices whose upper left corner is the $(1,1)$ entry have positive determinant.