Tutorials › Linear Algebra › Positive Semidefinite Forms And Null Directions

Quadratic Forms and Definiteness · Tutorial 772 of 1000

Positive Semidefinite Forms And Null Directions

Learn how zero eigenvalues identify the directions in which a positive semidefinite quadratic form vanishes.

Advanced 10 min read

What You'll Learn

  • Define positive semidefinite and positive definite quadratic forms
  • Read a quadratic form in orthogonal eigenvector coordinates
  • Identify null directions from the zero eigenvalues
  • Relate vanishing of a semidefinite form to the matrix null space
  • Distinguish nonnegative diagonal entries from positive semidefiniteness

When a Nonnegative Form Can Vanish

A positive semidefinite quadratic form never takes a negative value, but it may still take the value zero at nonzero vectors. Those vectors are its null directions. Finding them matters because they show precisely where the form fails to be positive definite. Orthogonal diagonalization makes the distinction visible: positive eigenvalues contribute positive squares, while zero eigenvalues leave some directions unpenalized.

Throughout, let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) be symmetric, and define its quadratic form by \(q_{\mathbf{A}}(\mathbf{x})=\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\) for \(\mathbf{x}\in\mathbb{R}^n\). The symmetry assumption is essential for the orthogonal diagonalization used here. The real spectral theorem says that a real symmetric matrix has an orthonormal basis of eigenvectors. Thus there is an orthogonal matrix \(\mathbf{Q}\), satisfying \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\), and a diagonal matrix \(\mathbf{D}\) such that \(\mathbf{A}=\mathbf{Q}\mathbf{D}\mathbf{Q}^{\top}\).

Definition: The quadratic form \(q_{\mathbf{A}}\) is positive semidefinite if \(q_{\mathbf{A}}(\mathbf{x})\ge 0\) for every \(\mathbf{x}\in\mathbb{R}^n\). It is positive definite if \(q_{\mathbf{A}}(\mathbf{x})>0\) for every nonzero \(\mathbf{x}\in\mathbb{R}^n\). A null direction is a nonzero vector \(\mathbf{x}\) for which \(q_{\mathbf{A}}(\mathbf{x})=0\).

The zero vector gives value zero for every quadratic form, so it does not count as a null direction under this definition. The important question is whether any nonzero vector also gives zero. For a symmetric positive semidefinite matrix, those nonzero vectors are exactly the nonzero vectors in \(\operatorname{Nul}\mathbf{A}\), as we will prove.

Orthogonal Coordinates Separate the Directions

Write the orthogonal diagonalization as \(\mathbf{A}=\mathbf{Q}\mathbf{D}\mathbf{Q}^{\top}\), where \(\mathbf{D}=\operatorname{diag}(\lambda_1,\dots,\lambda_n)\). The columns of \(\mathbf{Q}\) are orthonormal eigenvectors, and the diagonal entries of \(\mathbf{D}\) are their corresponding eigenvalues. For a vector \(\mathbf{x}\), set \(\mathbf{y}=\mathbf{Q}^{\top}\mathbf{x}\). Since \(\mathbf{Q}\) is orthogonal, this is a change to coordinates along the eigenvectors.

$$ q_{\mathbf{A}}(\mathbf{x}) =\mathbf{x}^{\top}\mathbf{Q}\mathbf{D}\mathbf{Q}^{\top}\mathbf{x} =\mathbf{y}^{\top}\mathbf{D}\mathbf{y} =\lambda_1y_1^2+\cdots+\lambda_ny_n^2. $$

This expression describes each eigenvector direction separately. A positive eigenvalue contributes a nonnegative square that is positive whenever its coordinate is nonzero. A zero eigenvalue contributes nothing, regardless of that coordinate. A negative eigenvalue contributes a negative term for a nonzero coordinate, which is incompatible with positive semidefiniteness.

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) be symmetric, with orthogonal diagonalization \(\mathbf{A}=\mathbf{Q}\operatorname{diag}(\lambda_1,\dots,\lambda_n)\mathbf{Q}^{\top}\). Then \(q_{\mathbf{A}}\) is positive semidefinite if and only if every \(\lambda_i\ge 0\), and it is positive definite if and only if every \(\lambda_i>0\).

Proof. Let \(\mathbf{y}=\mathbf{Q}^{\top}\mathbf{x}\). If every \(\lambda_i\ge0\), then \(q_{\mathbf{A}}(\mathbf{x})=\sum_{i=1}^n\lambda_i y_i^2\ge0\) for every \(\mathbf{x}\), so the form is positive semidefinite. Conversely, suppose the form is positive semidefinite. For each \(i\), let \(\mathbf{q}_i\) be column \(i\) of \(\mathbf{Q}\). This is a unit eigenvector, and \(q_{\mathbf{A}}(\mathbf{q}_i)=\mathbf{q}_i^{\top}\mathbf{A}\mathbf{q}_i=\lambda_i\). Since the form is nonnegative on every vector, \(\lambda_i\ge0\). For positive definiteness, if every \(\lambda_i>0\), then any nonzero \(\mathbf{x}\) has \(\mathbf{y}\ne\mathbf{0}\), because \(\mathbf{Q}^{\top}\) is invertible. At least one \(y_i\ne0\), so \(\sum_i\lambda_i y_i^2>0\). Conversely, if the form is positive definite, evaluating it at each nonzero unit eigenvector \(\mathbf{q}_i\) gives \(\lambda_i=q_{\mathbf{A}}(\mathbf{q}_i)>0\). \(\square\)

The theorem shows why positive semidefinite is weaker than positive definite: semidefiniteness permits zero eigenvalues, while definiteness does not. The next result identifies what those zeros mean for vectors, not just for eigenvalues.

Theorem: If \(\mathbf{A}\in\mathbb{R}^{n\times n}\) is symmetric and positive semidefinite, then \(q_{\mathbf{A}}(\mathbf{x})=0\) if and only if \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Consequently, the null directions are exactly the nonzero vectors in \(\operatorname{Nul}\mathbf{A}\), and the form is positive definite if and only if \(\operatorname{Nul}\mathbf{A}=\{\mathbf{0}\}\).

Proof. Use an orthogonal diagonalization with \(\lambda_i\ge0\), and put \(\mathbf{y}=\mathbf{Q}^{\top}\mathbf{x}\). If \(\mathbf{A}\mathbf{x}=\mathbf{0}\), then \(q_{\mathbf{A}}(\mathbf{x})=\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=0\). In the other direction, suppose \(q_{\mathbf{A}}(\mathbf{x})=0\). Then \(\sum_i\lambda_i y_i^2=0\), a sum of nonnegative terms. Each term must be zero: if one term were positive, the entire sum would be positive. Thus \(\lambda_i y_i=0\) for each \(i\): when \(\lambda_i>0\), the equality \(\lambda_i y_i^2=0\) forces \(y_i=0\); when \(\lambda_i=0\), the product \(\lambda_i y_i\) is already zero. Therefore \(\mathbf{D}\mathbf{y}=\mathbf{0}\), and \(\mathbf{A}\mathbf{x}=\mathbf{Q}\mathbf{D}\mathbf{Q}^{\top}\mathbf{x}=\mathbf{Q}\mathbf{D}\mathbf{y}=\mathbf{0}\). The equivalence follows. A positive semidefinite form is positive definite exactly when no nonzero vector has value zero, which by the equivalence holds exactly when its null space contains only \(\mathbf{0}\). \(\square\)

Worked Examples

Worked Example: A Zero Eigenvalue Gives a Null Direction

Consider \(\mathbf{A}=\begin{bmatrix}4&0\\0&0\end{bmatrix}\). Determine whether its quadratic form is positive semidefinite or positive definite, and find its null directions.

The standard coordinate vectors \(\mathbf{e}_1=(1,0)^{\top}\) and \(\mathbf{e}_2=(0,1)^{\top}\) are eigenvectors. Direct multiplication gives \(\mathbf{A}\mathbf{e}_1=(4,0)^{\top}=4\mathbf{e}_1\) and \(\mathbf{A}\mathbf{e}_2=(0,0)^{\top}=0\mathbf{e}_2\). The diagonalization is already displayed, with eigenvalues \(4\) and \(0\). For \(\mathbf{x}=(x_1,x_2)^{\top}\),

$$ q_{\mathbf{A}}(\mathbf{x}) =\begin{bmatrix}x_1&x_2\end{bmatrix} \begin{bmatrix}4&0\\0&0\end{bmatrix} \begin{bmatrix}x_1\\x_2\end{bmatrix} =4x_1^2. $$

This is nonnegative for every \(\mathbf{x}\), so the form is positive semidefinite. It is not positive definite: for instance, \(\mathbf{x}=(0,1)^{\top}\ne\mathbf{0}\) gives \(q_{\mathbf{A}}(\mathbf{x})=0\). In fact, \(q_{\mathbf{A}}(\mathbf{x})=0\) exactly when \(x_1=0\), so all null directions are the nonzero vectors on the second coordinate axis.

Check: \(\mathbf{A}(0,1)^{\top}=(0,0)^{\top}\), and \((0,1)\mathbf{A}(0,1)^{\top}=0\), confirming the null direction by direct multiplication.

Worked Example: Finding a Null Line After Diagonalizing

Let \(\mathbf{A}=\begin{bmatrix}2&2\\2&2\end{bmatrix}\). Orthogonally diagonalize \(\mathbf{A}\), then describe its quadratic form and null directions.

Take the orthonormal vectors \(\mathbf{u}_1=\frac{1}{\sqrt{2}}(1,1)^{\top}\) and \(\mathbf{u}_2=\frac{1}{\sqrt{2}}(1,-1)^{\top}\). Multiplication gives \(\mathbf{A}\mathbf{u}_1=\frac{1}{\sqrt{2}}(4,4)^{\top}=4\mathbf{u}_1\) and \(\mathbf{A}\mathbf{u}_2=\frac{1}{\sqrt{2}}(0,0)^{\top}=0\mathbf{u}_2\). Thus, with these eigenvectors as the columns of \(\mathbf{Q}\),

$$ \mathbf{Q}=\frac{1}{\sqrt{2}} \begin{bmatrix}1&1\\1&-1\end{bmatrix}, \qquad \mathbf{D}=\begin{bmatrix}4&0\\0&0\end{bmatrix}, \qquad \mathbf{A}=\mathbf{Q}\mathbf{D}\mathbf{Q}^{\top}. $$

For \(\mathbf{x}=(x_1,x_2)^{\top}\), the first eigenvector coordinate is \(y_1=(x_1+x_2)/\sqrt{2}\), and the second is \(y_2=(x_1-x_2)/\sqrt{2}\). Therefore

$$ q_{\mathbf{A}}(\mathbf{x})=4y_1^2 =2(x_1+x_2)^2. $$

The form is positive semidefinite because this expression is a square multiplied by \(2\). It vanishes exactly when \(x_1+x_2=0\). Hence its null directions are the nonzero vectors in \(\operatorname{span}\{(1,-1)^{\top}\}\).

Check: For any \(t\in\mathbb{R}\), \(\mathbf{A}(t,-t)^{\top}=(2t-2t,\,2t-2t)^{\top}=(0,0)^{\top}\), and \(q_{\mathbf{A}}(t,-t)=2(t-t)^2=0\). The diagonalization also reconstructs the matrix: \(\mathbf{Q}\mathbf{D}\mathbf{Q}^{\top}=\begin{bmatrix}2&2\\2&2\end{bmatrix}\).

Worked Example: A Higher-Dimensional Null Space

Consider \(\mathbf{A}=\begin{bmatrix}2&0&0\\0&1&1\\0&1&1\end{bmatrix}\). Find an orthogonal diagonalization and determine all vectors on which the form vanishes.

Use the orthonormal vectors \(\mathbf{u}_1=(1,0,0)^{\top}\), \(\mathbf{u}_2=\frac{1}{\sqrt{2}}(0,1,1)^{\top}\), and \(\mathbf{u}_3=\frac{1}{\sqrt{2}}(0,1,-1)^{\top}\). Direct multiplication gives \(\mathbf{A}\mathbf{u}_1=2\mathbf{u}_1\), \(\mathbf{A}\mathbf{u}_2=2\mathbf{u}_2\), and \(\mathbf{A}\mathbf{u}_3=\mathbf{0}\). Thus the eigenvalues in this ordered basis are \(2,2,0\). For \(\mathbf{x}=(x_1,x_2,x_3)^{\top}\),

$$ q_{\mathbf{A}}(\mathbf{x}) =2x_1^2+(x_2+x_3)^2. $$

Both terms are nonnegative, so the form is positive semidefinite. Their sum is zero exactly when both terms are zero: \(x_1=0\) and \(x_2+x_3=0\). Thus the vectors giving value zero are \((0,t,-t)^{\top}\) for \(t\in\mathbb{R}\); the null directions are those with \(t\ne0\).

Check: For \(\mathbf{x}=(0,t,-t)^{\top}\), direct multiplication yields \(\mathbf{A}\mathbf{x}=(0,t-t,t-t)^{\top}=\mathbf{0}\), and the displayed quadratic form gives \(2(0)^2+(t-t)^2=0\). Conversely, the sum of the two nonnegative squares can vanish only under the two stated coordinate conditions.

Common Pitfalls

Nonnegative is not the same as positive on nonzero vectors. For the matrix in the second example, one might see \(q_{\mathbf{A}}(\mathbf{x})=2(x_1+x_2)^2\ge0\) and incorrectly conclude that the form is positive definite. Substituting the nonzero vector \((1,-1)^{\top}\) corrects the claim: \(q_{\mathbf{A}}(1,-1)=2(1-1)^2=0\). The form is positive semidefinite, not positive definite.

Nonnegative diagonal entries alone do not prove positive semidefiniteness. For example, \(\mathbf{B}=\begin{bmatrix}1&2\\2&1\end{bmatrix}\) has positive diagonal entries, but at \(\mathbf{x}=(1,-1)^{\top}\) its quadratic form is \(1-2-2+1=-2<0\). Thus the claim that \(\mathbf{B}\) is positive semidefinite based only on its diagonal entries is false. Its eigenvectors \((1,1)^{\top}\) and \((1,-1)^{\top}\) have eigenvalues \(3\) and \(-1\), respectively, making the negative direction explicit.

For a symmetric matrix, orthogonal diagonalization gives the reliable test: every eigenvalue must be nonnegative for positive semidefiniteness, and every eigenvalue must be strictly positive for positive definiteness. When the form is positive semidefinite, the coordinates belonging to zero eigenvalues specify exactly the directions in which it vanishes.

Check Your Understanding

Use eigenvalues, quadratic-form values, or direct matrix multiplication to justify each answer.

  1. For \(\mathbf{A}=\begin{bmatrix}3&0\\0&0\end{bmatrix}\), identify all null directions and decide whether the form is positive definite.
  2. A symmetric matrix has orthogonal diagonalization with eigenvalues \(5,2,0\). Is its quadratic form positive semidefinite, positive definite, or neither?
  3. For \(\mathbf{A}=\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\), find the eigenvalues and describe the nonzero vectors where the form vanishes.
  4. Explain why a symmetric positive semidefinite matrix with \(\operatorname{Nul}\mathbf{A}=\{\mathbf{0}\}\) has a positive definite quadratic form.
  5. Give a vector that shows \(\begin{bmatrix}2&3\\3&2\end{bmatrix}\) is not positive semidefinite.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon