Finally we make a step out of strictly linear algebra to discuss quadratic forms. A quadratic form is a function which assigns a number to each vector, in such a way that it is sum of products of two coordinates, e.g. . The square of the norm is also an example of a quadratic form ().
We can classify forms with respect to possible sign of results:
- form is positively definite, if for all , we get .
- form is negatively definite, if for all , we get .
- form is positively semidefinite, if for all , we get .
- form is negatively semidefinite, if for all , we get .
Obviously a form may not fall in any of those categories, if for some we have and . Such forms are called indefinite.
Matrix of a form
Notice, that for any quadratic form we can consider a matrix , such that (so we multiply this matrix by a vector from the left and by the same but vertical vector from the right). We shall also assume that is symmetrical (with respect to its diagonal). E.g., let , then:
so notice, that the coefficients are divided by outside the diagonal, because the same expression is generated twice.
Sylvester’s criterion determines whether a form is positively definite or negatively definite. Notice that it does not tell anything about the categories with semidefinite forms!
How does it work? We study determinants of minors: let be the matrix of size in the left upper corner of the matrix of a form we study. Let be the size of the matrix of this form. Sylvester’s criterion consists of the two following facts:
- if for any we have , the form is positively definite,
- if for any we have for even , and , for odd , then the form is negatively definite.
E.g. let , so its matrix: , so and , therefore and , so form is positively definite.
E.g., let , so its matrix: , so and , also , therefore and and , so form is negatively definite.
Finally let , its matrix: , so and , therefore and , so form is neither positively definite nor negatively definite.
Fine, but how to check everything. Also the other two categories. The answer is given by eigenvalues. Notice that if we find a basis of eigenvectors, everything will be clear in such a basis. Moreover, symmetric matrices are always diagonalizable.
Therefore if is the matrix of and matrix :
- has only positive eigenvalues, then is positively definite,
- has only negative eigenvalues, then is negatively definite,
- has only non-negative eigenvalues, then is positively semidefinite,
- has only non-positive eigenvalues, then is negatively semidefinite,
- has a positive and a negative eigenvalue is indefinite.
E.g.: let , the matrix: , so its characteristic polynomial: has zeroes in and , so it has eigenvalues of both signs, so is is indefinite.