Definiteness and the Eigenvalue Sign Test
A quadratic form assigns a real number to each vector. Its definiteness describes whether those values keep one sign, and whether they can equal zero for nonzero vectors. For a real symmetric matrix, its eigenvalues provide a compact way to make this classification: the signs matter, and zero eigenvalues mark important boundary cases.
Throughout, let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) be symmetric, with \(n\geq 1\), and define its quadratic form by \(q(\mathbf{x})=\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\) for \(\mathbf{x}\in\mathbb{R}^n\). The definitions below compare the value of \(q\) with zero. In the definite cases the comparison is required only for nonzero vectors; in the semidefinite cases it is required for every vector.
Each definition has a different boundary requirement. A positive semidefinite form may equal zero at some nonzero vector, while a positive definite form cannot. Negative semidefinite and negative definite have the corresponding distinction. The zero form is both positive semidefinite and negative semidefinite, but is neither definite nor indefinite. Thus the classifications are not five mutually exclusive labels: the two semidefinite categories overlap when every value is zero.
The real-symmetric hypothesis is essential to this test as stated: the spectral theorem gives a real orthogonal diagonalization. Specifically, 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}\). For \(\mathbf{y}=\mathbf{Q}^{\top}\mathbf{x}\), the quadratic form can then be written as
This identity is a useful way to organize the calculation: each eigenvalue contributes its sign to one squared coordinate. The classification theorem turns those signs into the stated equivalences; its full justification is treated in the following discussion of why the signs determine definiteness. Here, the theorem is the decision rule, and the examples show how to apply and check it.
Applying the Sign Test
Worked Example: A Positive Definite Form
Classify the quadratic form associated with \(\mathbf{A}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\).
Compute the characteristic equation using the convention \(p_{\mathbf{A}}(\lambda)=\det(\mathbf{A}-\lambda\mathbf{I})\):
The eigenvalues are \(1\) and \(3\), both positive. The sign test therefore classifies the form as positive definite.
Check: the vectors \(\begin{bmatrix}1\\-1\end{bmatrix}\) and \(\begin{bmatrix}1\\1\end{bmatrix}\) verify the eigenvalues directly:
For a direct value check, \(q(x_1,x_2)=2x_1^2+2x_1x_2+2x_2^2\). In the corresponding orthogonal coordinates \(y_1=(x_1-x_2)/\sqrt{2}\) and \(y_2=(x_1+x_2)/\sqrt{2}\), this is \(y_1^2+3y_2^2\), which is positive whenever \((x_1,x_2)\ne(0,0)\).
Worked Example: An Indefinite Form
Classify the form for \(\mathbf{B}=\begin{bmatrix}1&2\\2&1\end{bmatrix}\).
Its characteristic equation is
The eigenvalues are \(3\) and \(-1\). One is positive and the other negative, so the form is indefinite. To check that both signs actually occur, use the eigenvectors \(\begin{bmatrix}1\\1\end{bmatrix}\) and \(\begin{bmatrix}1\\-1\end{bmatrix}\):
The values have opposite signs, as required by the definition of indefinite. In general, exhibiting vectors that produce opposite signs is a direct check of indefiniteness.
Worked Example: Positive Semidefinite but Not Positive Definite
Consider \(\mathbf{C}=\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\). Compute its characteristic equation:
The eigenvalues are \(0\) and \(2\). They are both nonnegative, so the form is positive semidefinite. Because one eigenvalue is zero, it is not positive definite.
Check: for \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\end{bmatrix}\), direct multiplication gives \(q_{\mathbf{C}}(\mathbf{x})=x_1^2-2x_1x_2+x_2^2=(x_1-x_2)^2\geq0\). For the nonzero vector \(\begin{bmatrix}1\\1\end{bmatrix}\), this value is \(0\), confirming why the form is not positive definite. The eigenvectors also verify the eigenvalues:
Worked Example: Negative Semidefinite but Not Negative Definite
Let \(\mathbf{D}=\begin{bmatrix}-3&0&0\\0&0&0\\0&0&-1\end{bmatrix}\). This matrix is already diagonal, so its eigenvalues are \(-3,0,-1\). All are nonpositive and one is zero. Therefore its form is negative semidefinite, but not negative definite.
Check: multiplication gives \(q_{\mathbf{D}}(\mathbf{x})=-3x_1^2-x_3^2\leq0\) for every \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}\). At the nonzero vector \(\begin{bmatrix}0\\1\\0\end{bmatrix}\), the value is \(0\), so the strict inequality required for negative definiteness fails. Indeed, \(\mathbf{D}\begin{bmatrix}0\\1\\0\end{bmatrix}=\mathbf{0}\), verifying the zero eigenvalue as well.
What Zero Eigenvalues Change
A zero eigenvalue does not by itself tell you whether a form is positive or negative semidefinite: the other eigenvalues must also be inspected. The examples show three distinct patterns. A list consisting of positive values and zero gives a positive semidefinite form that is not positive definite. A list consisting of negative values and zero gives a negative semidefinite form that is not negative definite. A list containing both a positive and a negative value gives an indefinite form, whether or not zero is also present.
In particular, \((4,0,0)\) passes the nonnegative test but fails the strictly positive test; \((-4,0,0)\) passes the nonpositive test but fails the strictly negative test; and \((4,-1,0)\) is indefinite. These sign checks apply to all eigenvalues, not merely to the largest or smallest one. Repeated eigenvalues are counted in the eigenvalue list, but repetition does not create a new sign condition.
Proof. Let \(q\) be the original form and consider \(cq\). If \(c>0\), then for every vector \(\mathbf{x}\), \(q(\mathbf{x})\) and \(cq(\mathbf{x})\) have the same sign, and \(q(\mathbf{x})=0\) exactly when \(cq(\mathbf{x})=0\). Thus each strict or non-strict sign condition in the definitions is unchanged, and a pair of values with opposite signs remains a pair with opposite signs. If \(c<0\), multiplication reverses the sign of every nonzero value and leaves zero values equal to zero. Therefore positive and negative conditions exchange, while values of both signs remain values of both signs. \(\square\)
The same bookkeeping is visible in eigenvalues: if \(\mathbf{A}=\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}\), then \(-\mathbf{A}=\mathbf{Q}(-\boldsymbol{\Lambda})\mathbf{Q}^{\top}\), so negating the matrix negates every eigenvalue. This gives a convenient cross-check when a matrix is the negative of one already classified.
Common Pitfall: Determinant Sign Is Not the Classification
A positive determinant does not imply positive definiteness. For a concrete counterexample, take \(\mathbf{E}=\begin{bmatrix}-1&0\\0&-2\end{bmatrix}\). Its determinant is \((-1)(-2)=2>0\). The incorrect conclusion “the determinant is positive, so the form is positive definite” ignores the signs of the eigenvalues. The eigenvalues are \(-1\) and \(-2\), so the form is negative definite; directly, \(q_{\mathbf{E}}(x_1,x_2)=-x_1^2-2x_2^2<0\) for every nonzero vector.
For a \(2\times2\) symmetric matrix, a negative determinant does imply eigenvalues of opposite signs, but a positive determinant alone cannot distinguish two positive eigenvalues from two negative ones. For larger matrices, determinant sign is even less informative about the full sign pattern. Use the eigenvalue list for this classification task, and keep strict versus non-strict inequalities in view.
| Eigenvalue signs | Classification | Boundary note |
|---|---|---|
| All positive | Positive definite | No zero eigenvalues |
| All nonnegative | Positive semidefinite | Positive definite only if none is zero |
| All negative | Negative definite | No zero eigenvalues |
| All nonpositive | Negative semidefinite | Negative definite only if none is zero |
| At least one positive and one negative | Indefinite | Zero eigenvalues may also occur |
A reliable workflow is to first confirm that the matrix is real and symmetric, then find all eigenvalues with multiplicity, and finally check which sign condition the complete list satisfies. If the classification is semidefinite, look specifically for a zero eigenvalue before calling the form definite. If it is indefinite, verify that both signs occur; a zero eigenvalue alone is not enough.
Check Your Understanding
For each question, use the eigenvalue signs and attend carefully to whether the inequality is strict.
- Classify a real symmetric matrix whose eigenvalues are \(2,5,5\).
- Classify a real symmetric matrix whose eigenvalues are \(-3,0,-1\). Is its form negative definite?
- A real symmetric matrix has eigenvalues \(4,-2,0\). Which classification applies, and what sign values must its quadratic form attain?
- Explain why eigenvalues \(0,0,0\) give a form that is both positive semidefinite and negative semidefinite, but neither definite.
- Give a diagonal \(2\times2\) matrix with positive determinant whose quadratic form is not positive definite, and justify the classification from its eigenvalues.