### Quadratic form

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 ().

In other words, a quadratic form can be described as , where is a bilinear form. We can always take a symmetric bilinear form, if the characteristic of the field is not equal to , and we are going to make such an assumption from now on.

### Positive and negative definite forms

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

The matrix of a quadratic form with respect to basis is the matrix , where is a symmetric bilinear form such that . 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

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.

### Diagonalization of quadratic forms

But to check everything (including semi definiteness), we have to diagonalize the form, i.e. find a basis in which its matrix is diagonal (a diagonal congruent matrix). Then, obviously if:

- it has only positive entrees on the diagonal, then is positive definite,
- it has only negative entrees on the diagonal, then is negative definite,
- it has only nonnegative entrees on the diagonal, then is positive definite,
- it has only nonpositive entrees on the diagonal, then is negative semi definite,
- it has a positive and a negative entree on the diagonal, then is nondefinite.

It can be done it the tree following methods

### Diagonalization of a form: complementing to squares

We may complement a formula of a form to squares making sure to use all expressions with the first variable first, and then all with the second one, and so on.

E.g.

where , i , so the form is non-definite. The basis , in which the formula is expressed is , because

### Diagonalization of a form: orthogobal basis

We may also find an orthogonal basis with respect to the symmetrical bilinear form related to the considered quadratic form. Then the entrees on the diagonal are the values of the form on the vectors from this basis.

### Diagonalization of a form: eigenvalues

Finally, we shall remind ourselves that there exists a basis consisting of eigenvectors of a self-adjoint endomorphism described by the same matrix, which is orthogonal with respect to the symmetrical bilinear form related to the considered quadratic form. Then the entrees on the diagonal are the eigenvalues of the matrix.

E.g.: let , the matrix: , so its characteristic polynomial: has zeroes in and , so it has eigenvalues of both signs, so is is indefinite.