Counting the Signs of a Symmetric Form
A real symmetric bilinear form assigns a real number \(B(\mathbf{v},\mathbf{v})\) to each vector, but those values need not all have the same sign. Some directions may give positive values, some negative values, and some zero values. Counting these three kinds of directions gives a compact description of the form: its inertia. The counts also determine the signature, a signed measure of the balance between positive and negative directions.
Let \(V\) be a finite-dimensional vector space over \(\mathbb{R}\), and let \(B:V\times V\to\mathbb{R}\) be a symmetric bilinear form. Symmetry means \(B(\mathbf{u},\mathbf{v})=B(\mathbf{v},\mathbf{u})\) for all \(\mathbf{u},\mathbf{v}\in V\). Its associated quadratic form is \(q(\mathbf{v})=B(\mathbf{v},\mathbf{v})\). In a chosen basis, if \(\mathbf{x}\) is the coordinate column of \(\mathbf{v}\) and \(\mathbf{A}\) is the symmetric matrix of \(B\), then \(q(\mathbf{v})=\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\).
The earlier material on diagonalizing symmetric forms by congruence gives a basis in which the form has a diagonal matrix. Thus, in suitable coordinates, its quadratic form is \(d_1x_1^2+\cdots+d_nx_n^2\). The signs of the diagonal coefficients supply the counts.
Each coefficient is counted with its multiplicity in the diagonal list. In particular, repeated positive or negative entries contribute repeatedly, and every zero entry contributes to \(n_0\). The counts satisfy \(n_++n_-+n_0=n\), where \(n=\dim V\), because each of the \(n\) diagonal entries has exactly one of the three signs.
Inertia is commonly used as a basis-independent description of the form. The standard result that makes the counts independent of the diagonalization chosen is Sylvester’s law of inertia; its proof comes later in the course. Here, the diagonal counts define the quantities in a displayed diagonal form, and the eigenvalue method below uses the orthogonal diagonalization supplied by the real Spectral Theorem.
Reading Inertia from a Diagonal Form
For a diagonal form, no additional computation is needed beyond classifying each coefficient as positive, negative, or zero. A zero coefficient is not a positive or negative direction: its squared-coordinate term contributes nothing to the value of the form. For example, the form may be nonzero on many vectors and still have a zero index greater than zero.
Worked Example: Counting from a Diagonal Form
Consider the form on \(\mathbb{R}^4\) given by \(q(\mathbf{x})=5x_1^2-2x_2^2+0x_3^2-7x_4^2\). Find its inertia and signature.
The diagonal coefficient list is \(5,-2,0,-7\). The positive coefficients are \(5\), so \(n_+=1\). The negative coefficients are \(-2\) and \(-7\), so \(n_-=2\). There is one zero coefficient, so \(n_0=1\). Therefore the inertia is \((1,2,1)\), and the signature is \(1-2=-1\).
Check: the counts add to the dimension: \(1+2+1=4\). The form takes a positive value at \((1,0,0,0)^{\top}\), since \(q=5\), a negative value at \((0,1,0,0)^{\top}\), since \(q=-2\), and the value zero at \((0,0,1,0)^{\top}\), since the third coefficient is zero.
The zero index has a direct interpretation in diagonal coordinates. A coordinate whose coefficient is zero does not affect \(q\), regardless of its value. More formally, for a diagonal matrix \(\mathbf{D}=\operatorname{diag}(d_1,\dots,d_n)\), the vectors in its null space satisfy \(d_ix_i=0\) for every \(i\). Each nonzero \(d_i\) forces \(x_i=0\), while each zero \(d_i\) allows \(x_i\) to be free. Hence the nullity of this diagonal matrix is exactly the number of zero diagonal entries.
Proof. Every real number \(d_i\) is exactly one of positive, negative, or zero, so counting the entries in these disjoint categories gives \(n_++n_-+n_0=n\). The equation \(\mathbf{D}\mathbf{x}=\mathbf{0}\) has coordinate equations \(d_ix_i=0\). If \(d_i\ne0\), division by \(d_i\) gives \(x_i=0\). If \(d_i=0\), the coordinate equation is \(0=0\), so \(x_i\) is unrestricted. Thus the number of free coordinates is precisely the number of zero coefficients, which is \(n_0\). \(\square\)
Using Eigenvalues of a Symmetric Matrix
Suppose \(\mathbf{A}\in\mathbb{R}^{n\times n}\) is symmetric and represents the form in a chosen basis. The real Spectral Theorem says that \(\mathbf{A}\) has an orthonormal basis of eigenvectors. In that basis its matrix is diagonal, with the eigenvalues of \(\mathbf{A}\) on the diagonal, counted with algebraic multiplicity. Consequently, counting the positive, negative, and zero eigenvalues gives the indices for this orthogonal diagonal form. A zero eigenvalue must be counted; omitting it loses the zero index.
Proof. By the real Spectral Theorem, there is an orthogonal matrix \(\mathbf{Q}\) and a diagonal matrix \(\boldsymbol{\Lambda}=\operatorname{diag}(\lambda_1,\dots,\lambda_n)\) such that \(\mathbf{A}=\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}\). Set \(\mathbf{y}=\mathbf{Q}^{\top}\mathbf{x}\). Since \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\), this is an invertible orthogonal change of coordinates, and \(q(\mathbf{x})=\mathbf{x}^{\top}\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}\mathbf{x}=\mathbf{y}^{\top}\boldsymbol{\Lambda}\mathbf{y}=\sum_{i=1}^n\lambda_i y_i^2\). The diagonal coefficients are thus the eigenvalues \(\lambda_i\), including repetitions and zeros. The definition of the indices applied to this diagonal form gives the stated counts. \(\square\)
This result requires symmetry: it is the real Spectral Theorem for symmetric matrices that provides a real orthonormal eigenbasis and a real diagonal form. The eigenvalues are counted with multiplicity, not merely as distinct values. For instance, if \(2\) is an eigenvalue with multiplicity two, it contributes two to the positive index.
Worked Example: A Positive Definite Form from Its Eigenvalues
Let \(\mathbf{A}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\). Find the inertia and signature of \(q(\mathbf{x})=\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\).
The matrix is symmetric. Its eigenvalues solve \(\det(\mathbf{A}-\lambda\mathbf{I}_2)=0\):
The eigenvalues are \(1\) and \(3\), both positive. For \(\lambda=3\), \(\mathbf{v}_1=(1,1)^{\top}\) is an eigenvector, since \(\mathbf{A}\mathbf{v}_1=(3,3)^{\top}=3\mathbf{v}_1\). For \(\lambda=1\), \(\mathbf{v}_2=(1,-1)^{\top}\) is an eigenvector, since \(\mathbf{A}\mathbf{v}_2=(1,-1)^{\top}=\mathbf{v}_2\). These eigenvectors are orthogonal; normalizing them gives an orthonormal eigenbasis. Thus \(n_+=2\), \(n_-=0\), and \(n_0=0\). The inertia is \((2,0,0)\), and the signature is \(2\).
Check: the eigenvector computations above verify both eigenvalues directly. In the orthonormal eigenbasis, the form is \(3y_1^2+y_2^2\), whose diagonal coefficients are indeed both positive. The indices add to \(2=\dim\mathbb{R}^2\).
Worked Example: An Indefinite Form with a Zero Index
For \(\mathbf{A}=\begin{bmatrix}1&1&0\\1&1&0\\0&0&-2\end{bmatrix}\), find the inertia and signature of \(q(\mathbf{x})=\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\).
The matrix is symmetric. Consider \(\mathbf{v}_1=(1,1,0)^{\top}\), \(\mathbf{v}_2=(1,-1,0)^{\top}\), and \(\mathbf{v}_3=(0,0,1)^{\top}\). Multiplication gives
These eigenvectors are nonzero and mutually orthogonal, so normalizing them gives an orthonormal eigenbasis. The eigenvalues are \(2,0,-2\). There is one positive eigenvalue, one zero eigenvalue, and one negative eigenvalue. Therefore the inertia is \((1,1,1)\) and the signature is \(1-1=0\).
Check: direct expansion gives \(q(x,y,z)=x^2+2xy+y^2-2z^2=(x+y)^2-2z^2\). This expression has a positive square, no term in the direction \((1,-1,0)^{\top}\), and a negative square. It agrees with the positive, zero, and negative eigenvalue counts; the indices sum to \(3\).
What the Counts Tell You—and What They Do Not
The inertia distinguishes several situations that a single number cannot. If \(n_-=0\), the diagonal form has no negative coefficients; if also \(n_0=0\), every diagonal coefficient is positive. If \(n_+=0\) and \(n_0=0\), every diagonal coefficient is negative. If both \(n_+\) and \(n_-\) are positive, the form has positive and negative terms in its diagonal representation. A nonzero zero index records degeneracy in that representation; it should not be folded into either sign count.
Signature alone does not determine inertia. The form with eigenvalues \(2,0,-2\) has signature \(0\), but its inertia is \((1,1,1)\), not \((0,0,0)\). More generally, \(n_+-n_-\) records a difference, so different positive and negative counts can produce the same signature. Retain the full triple when the zero directions or the separate positive and negative counts matter.
Also distinguish the eigenvalues of a symmetric matrix from the diagonal entries obtained by an arbitrary congruence. The spectral method is valid because the real Spectral Theorem gives an orthogonal diagonalization, with eigenvalues as the diagonal entries. An arbitrary change of basis for a form gives a congruence, not generally a similarity, so its diagonal entries need not be the matrix’s eigenvalues. Sylvester’s law of inertia is the result that ensures the sign counts agree across diagonalizations; it is not a claim that the diagonal entries themselves are unchanged.
Common Pitfall: A Determinant Does Not Give the Inertia
A determinant can provide partial information, but it does not give all three indices. For example, the symmetric matrices \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\) and \(\begin{bmatrix}-1&0\\0&-1\end{bmatrix}\) both have determinant \(1\). The first has inertia \((2,0,0)\) and signature \(2\); the second has inertia \((0,2,0)\) and signature \(-2\). The same determinant does not distinguish these cases.
A tempting but incorrect calculation is: “The determinant is positive, so both eigenvalues are positive.” The correction is to compute or otherwise determine the eigenvalues, then count their signs. In the second matrix, the characteristic equation gives \(\det(\mathbf{A}-\lambda\mathbf{I}_2)=(-1-\lambda)^2\), so the eigenvalue is \(-1\) with multiplicity two. Both eigenvalues are negative even though the determinant is positive. A determinant-zero result likewise tells only that at least one eigenvalue is zero for a symmetric matrix; it does not identify how many positive and negative eigenvalues remain.
For a reliable calculation, first confirm that the representing matrix is real and symmetric. Then either count signs in a diagonal form or use the eigenvalues, including their multiplicities and any zeros. Finally, check that the three indices sum to the dimension and compute the signature as \(n_+-n_-\) under the convention used here.
Check Your Understanding
For each question, state which information you use and check that the three indices add to the dimension whenever applicable.
- Find the inertia and signature of \(q(x,y,z)=4x^2-3y^2+0z^2\).
- A real symmetric \(4\times4\) matrix has eigenvalues \(5,2,0,-1\), counted with multiplicity. Find its inertia and signature.
- Can a symmetric \(3\times3\) matrix with eigenvalues \(-2,-2,0\) have positive index \(1\)? Explain using the eigenvalue counts.
- Give an example of two symmetric matrices with the same determinant but different signatures, and explain the calculation.
- For a diagonal form, explain why each zero coefficient contributes one free coordinate to \(\mathbf{D}\mathbf{x}=\mathbf{0}\).