12. Quadratic forms

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. q(x,y,z)=x^2-2xy+4xz-5z^2. The square of the norm is also an example of a quadratic form (\|(x,y,z)\|^2=x^2+y^2+z^2).

In other words, a quadratic form can be described as q(v)=h(v,v), where h is a bilinear form. We can always take a symmetric bilinear form, if the characteristic of the field is not equal to 2, 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 q\colon V\to\mathbb{R} is positively definite, if for all v\in V, we get q(v)>0.
  • form q\colon V\to\mathbb{R} is negatively definite, if for all v\in V, we get q(v)<0.
  • form q\colon V\to\mathbb{R} is positively semidefinite, if for all v\in V, we get q(v)\geq 0.
  • form q\colon V\to\mathbb{R} is negatively semidefinite, if for all v\in V, we get q(v)\leq 0.

Obviously a form may not fall in any of those categories, if for some v,w\in V we have q(v)>0 and q(w)<0. Such forms are called indefinite.

Matrix of a form

The matrix of a quadratic form q with respect to basis \mathcal{A} is the matrix G(h,\mathcal{A}), where h is a symmetric bilinear form such that h(v,v)=q(v). E.g., let q(x,y,z)=x^2-2xy+4xz-5z^2, then:

    \[q(x,y,z)=[x,y,z]\cdot \left[\begin{array}{ccc}1&-1&2\\-1&0&0\\2&0&-5\end{array}\right]\cdot \left[\begin{array}{c}x\\y\\z\end{array}\right]\]

so notice, that the coefficients are divided by 2 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 A_k be the matrix of size k\times k in the left upper corner of the matrix of a form we study. Let n\times n be the size of the matrix of this form. Sylvester’s criterion consists of the two following facts:

  • if for any k\leq n we have \det A_k > 0, the form is positively definite,
  • if for any k\leq n we have \det A_k > 0 for even k, and \det A_k<0, for odd k, then the form is negatively definite.

E.g. let q(x,y)=2x^2+y^2-2xy, so its matrix: \left[\begin{array}{cc}2&-1\\-1&1\end{array}\right], so A_1=[2] and A_2=\left[\begin{array}{cc}2&-1\\-1&1\end{array}\right], therefore \det A_1=2>0 and \det A_2=2-1=1>0, so form q is positively definite.

E.g., let q(x,y)=-x^2-5y^2-4xy-z^2, so its matrix: \left[\begin{array}{ccc}-1&-2&0\\-2&-5&0\\0&0&-1\end{array}\right], so A_1=[-1] and A_2=\left[\begin{array}{cc}-1&-2\\-2&-5\end{array}\right], also A_3=\left[\begin{array}{ccc}-1&-2&0\\-2&1&0\\0&0&-1\end{array}\right], therefore \det A_1=-1<0 and \det A_2=5-4=1>0 and \det A_3=-5+4=-1<0, so form q is negatively definite.

Finally let q(x,y)=-2x^2+y^2-2xy, its matrix: \left[\begin{array}{cc}-2&-1\\-1&1\end{array}\right], so A_1=[-2] and A_2=\left[\begin{array}{cc}-2&-1\\-1&1\end{array}\right], therefore \det A_1=-2<0 and \det A_2=-2-1=-3<0, so form q 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 q is positive definite,
  • it has only negative entrees on the diagonal, then q is negative definite,
  • it has only nonnegative entrees on the diagonal, then q is positive definite,
  • it has only nonpositive entrees on the diagonal, then q is negative semi definite,
  • it has a positive and a negative entree on the diagonal, then q 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.

    \[q(x,y,z)=x^2+2xy-4xz+6yz=(x+y-2z)^2-y^2-4z^2+2yz=\]

    \[=(x+y-2z)^2-(y-z)^2+3z^2=x'^2-y'^2+3z'^2,\]

where x'=x+y-2z, y'=y-z i z'=z, so the form is non-definite. The basis \mathcal{A}, in which the formula is expressed is (1,0,0),(-1,1,0),(1,1,1), because

    \[M(id)_{st}^{\mathcal{A}}=\left[\begin{array}{ccc}1&1&-2\\0&1&-1\\0&0&1\end{array}\right].\]

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 q(x,y)=-2x^2+y^2-2xy, the matrix: \left[\begin{array}{cc}-2&-1\\-1&1\end{array}\right], so its characteristic polynomial: (-2-\lambda)(1-\lambda)+1=\lambda^2+\lambda-1 has zeroes in \frac{-1-\sqrt{5}}{2} and \frac{-1+\sqrt{5}}{2}, so it has eigenvalues of both signs, so is q is indefinite.