Tutorials › Linear Algebra › Maximal Positive Subspaces and Inertia

Dual Spaces and Bilinear Forms · Tutorial 897 of 1000

Maximal Positive Subspaces and Inertia

Learn how the positive diagonal entries determine the largest dimension of any subspace on which a quadratic form is positive definite.

Advanced 9 min read

What You'll Learn

  • Define the positive index of a real diagonal quadratic form.
  • Distinguish positive definiteness on a subspace from positivity on individual vectors.
  • Prove the upper bound on the dimension of every positive-definite subspace.
  • Construct a subspace whose dimension attains that bound.
  • Explain why the positive index is unchanged by an invertible change of coordinates.
  • Identify a common error when testing a subspace using only basis vectors.

Positive Directions and Subspaces

A real quadratic form can be positive on some vectors, negative on others, and zero on still others. Its positive index counts the positive entries in a diagonal representation of the form. That count has a geometric interpretation: it is the largest dimension a subspace can have while the form remains strictly positive on every nonzero vector in that subspace. Establishing this interpretation explains why the positive index is an invariant of the form, rather than a feature of a particular diagonalizing basis.

Let \(D=\operatorname{diag}(d_1,\dots,d_n)\) be a real diagonal matrix, and let \(q:\mathbb{R}^n\to\mathbb{R}\) be the quadratic form \(q(\mathbf{x})=\mathbf{x}^{\top}D\mathbf{x}\). Reordering coordinates if necessary, write its entries so the positive ones come first, then the negative ones, then the zero entries. Let \(p\) be the number of positive entries, \(m\) the number of negative entries, and \(r\) the number of zero entries, so \(p+m+r=n\). In these coordinates, write \(\mathbf{x}=(\mathbf{x}_+,\mathbf{x}_-,\mathbf{x}_0)\). Then

$$ q(\mathbf{x}) =\sum_{i=1}^{p}d_i x_i^2 +\sum_{i=p+1}^{p+m}d_i x_i^2, \qquad d_i>0\ (1\le i\le p),\quad d_i<0\ (p<i\le p+m). $$

The zero coordinates do not appear in the value of \(q\). The positive index is \(p\); the negative index is \(m\), and the number of zero entries is \(r\). We will focus on the positive index.

Definition: A subspace \(U\subseteq\mathbb{R}^n\) is positive definite for \(q\) if \(q(\mathbf{x})>0\) for every \(\mathbf{x}\in U\) with \(\mathbf{x}\ne\mathbf{0}\). The positive index of the diagonal form is the number \(p\) of positive entries of \(D\).

The condition on a subspace concerns every nonzero vector in it, not merely a selected list of vectors. This matters because combinations of vectors can change the value of the form. In particular, showing that each vector in a basis has positive value does not by itself show that the subspace they span is positive definite.

The Largest Possible Dimension

Theorem (Maximal positive dimension): Let \(q(\mathbf{x})=\mathbf{x}^{\top}D\mathbf{x}\) be a real diagonal quadratic form on the finite-dimensional space \(\mathbb{R}^n\), and suppose \(D\) has \(p\) positive diagonal entries. The largest dimension of a subspace on which \(q\) is positive definite is \(p\).

Proof. First we construct a positive-definite subspace of dimension \(p\). Let \(U_+\) be the span of the standard basis vectors in the \(p\) coordinates corresponding to positive entries. If \(\mathbf{x}\in U_+\) is nonzero, then at least one of its first \(p\) coordinates is nonzero, and

$$ q(\mathbf{x})=\sum_{i=1}^{p}d_i x_i^2>0, $$

because each \(d_i>0\) and each \(x_i^2\ge 0\). Thus \(U_+\) is positive definite, and its dimension is \(p\).

Now let \(U\) be any positive-definite subspace. Project each vector onto its first \(p\) coordinates, defining the linear map \(\pi_+:U\to\mathbb{R}^p\) by \(\pi_+(\mathbf{x})=\mathbf{x}_+\). We show this map is injective. If \(\mathbf{x}\in U\) satisfies \(\pi_+(\mathbf{x})=\mathbf{0}\), then its positive coordinates all vanish, so

$$ q(\mathbf{x})=\sum_{i=p+1}^{p+m}d_i x_i^2\le 0, $$

since every \(d_i\) in this sum is negative and every square is nonnegative. If \(\mathbf{x}\ne\mathbf{0}\), positive definiteness of \(U\) instead requires \(q(\mathbf{x})>0\). Therefore \(\mathbf{x}=\mathbf{0}\), and \(\pi_+\) is injective. An injective linear map sends a basis of \(U\) to a linearly independent list in \(\mathbb{R}^p\), which has at most \(p\) vectors. Hence \(\dim U\le p\). Together, the constructed subspace and this upper bound show that the largest possible dimension is exactly \(p\). If \(p=0\), the same argument maps \(U\) injectively into the zero-dimensional space \(\mathbb{R}^0\), so \(U=\{\mathbf{0}\}\); the conclusion still holds. \(\square\)

The construction proves that the bound can be attained, while the projection argument proves that no positive-definite subspace can be larger. The upper bound is the key step: negative and zero coordinates cannot provide additional independent directions while preserving strict positivity on every nonzero vector.

Worked Examples

Worked Example: A Diagonal Form with a Zero Direction

Consider \(q(\mathbf{x})=4x_1^2+x_2^2-2x_3^2\) on \(\mathbb{R}^4\). Its matrix is \(D=\operatorname{diag}(4,1,-2,0)\). Find its positive index and exhibit a subspace of maximal positive dimension.

The diagonal entries are \(4,1,-2,0\), so the positive index is \(p=2\). Take \(U=\operatorname{span}\{\mathbf{e}_1,\mathbf{e}_2\}\). A vector in \(U\) has the form \(\mathbf{x}=(a,b,0,0)^{\top}\), and

$$ q(\mathbf{x})=4a^2+b^2. $$

If \(\mathbf{x}\ne\mathbf{0}\), then at least one of \(a,b\) is nonzero, so \(4a^2+b^2>0\). Thus \(U\) is positive definite and has dimension \(2\). The maximal positive dimension theorem shows that no positive-definite subspace can have dimension greater than \(2\), even though the full space has dimension \(4\). The fourth coordinate contributes zero to the form and does not create another positive direction.

Check: \(q(\mathbf{e}_1)=4\), \(q(\mathbf{e}_2)=1\), and \(q(\mathbf{e}_3)=-2\), while \(q(\mathbf{e}_4)=0\). These values agree with the signs of the diagonal entries.

Worked Example: A Positive Subspace Not Spanned by Coordinate Axes

For \(q(x_1,x_2,x_3)=x_1^2+x_2^2-x_3^2\), find a two-dimensional positive-definite subspace and verify its dimension is maximal.

The matrix is \(\operatorname{diag}(1,1,-1)\), so the positive index is \(2\). Consider \(\mathbf{u}=(1,0,\tfrac12)^{\top}\) and \(\mathbf{v}=(0,1,\tfrac12)^{\top}\), and let \(U=\operatorname{span}\{\mathbf{u},\mathbf{v}\}\). If \(a\mathbf{u}+b\mathbf{v}=\mathbf{0}\), then its first two coordinates give \(a=0\) and \(b=0\). Thus \(\mathbf{u},\mathbf{v}\) are independent and \(\dim U=2\).

An arbitrary vector of \(U\) is

$$ a\mathbf{u}+b\mathbf{v} =\begin{bmatrix}a\\b\\(a+b)/2\end{bmatrix}. $$

Substituting into the form gives

$$ q(a\mathbf{u}+b\mathbf{v}) =a^2+b^2-\left(\frac{a+b}{2}\right)^2 =\frac{3a^2-2ab+3b^2}{4} =\frac{2a^2+2b^2+(a-b)^2}{4}. $$

For \((a,b)\ne(0,0)\), \(2a^2+2b^2>0\), so the last expression is positive. Therefore \(U\) is positive definite. Its dimension \(2\) equals the positive index, so the theorem confirms that it has maximal possible dimension.

Check: \(q(\mathbf{u})=1-\tfrac14=\tfrac34\) and \(q(\mathbf{v})=1-\tfrac14=\tfrac34\). More importantly, the calculation for arbitrary \(a,b\) verifies positivity on the whole subspace, not just on its two basis vectors.

Why the Positive Index Is Intrinsic

A diagonal matrix represents a form in a chosen coordinate system. Changing basis for a bilinear form changes its matrix by congruence: if \(\mathbf{P}\) is the change-of-coordinates matrix, the new matrix is \(\mathbf{P}^{\top}D\mathbf{P}\). The vector coordinates change, but the underlying subspaces and the values of the form correspond under the invertible coordinate map. The maximal-dimension characterization therefore gives a way to compare positive counts from different diagonal representations.

Corollary: If two diagonal matrices represent the same real quadratic form in coordinate systems related by an invertible change of basis, then they have the same number of positive diagonal entries.

Proof. Let \(D\) and \(D'\) be the two diagonal matrices, with coordinates related by an invertible matrix \(\mathbf{P}\), so \(D'=\mathbf{P}^{\top}D\mathbf{P}\). For each coordinate vector \(\mathbf{y}\) in the \(D'\) coordinates, its corresponding vector in the \(D\) coordinates is \(\mathbf{P}\mathbf{y}\), and

$$ \mathbf{y}^{\top}D'\mathbf{y} =\mathbf{y}^{\top}\mathbf{P}^{\top}D\mathbf{P}\mathbf{y} =(\mathbf{P}\mathbf{y})^{\top}D(\mathbf{P}\mathbf{y}). $$

The map \(\mathbf{y}\mapsto\mathbf{P}\mathbf{y}\) is a linear isomorphism: it sends subspaces to subspaces of the same dimension, and the displayed equality shows that a subspace is positive definite in one coordinate system exactly when its image is positive definite in the other. Consequently, the largest positive-definite subspace dimension is the same for both diagonal matrices. By the maximal positive dimension theorem, that dimension is the number of positive entries in each matrix. The two counts are therefore equal. \(\square\)

This is the positive-index part of the invariance behind Sylvester’s law of inertia. The same maximal-dimension idea can be applied to \(-q\) to interpret the negative index. The zero count requires a separate argument; equality of positive counts alone does not establish it.

Worked Example: Two Diagonal Representations with the Same Positive Index

Let \(D=\operatorname{diag}(1,-1)\) and \(\mathbf{P}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\). Compute the congruent matrix \(D'=\mathbf{P}^{\top}D\mathbf{P}\), and check the positive counts.

First, multiply \(D\mathbf{P}\):

$$ D\mathbf{P} =\begin{bmatrix}1&0\\0&-1\end{bmatrix} \begin{bmatrix}1&1\\0&1\end{bmatrix} =\begin{bmatrix}1&1\\0&-1\end{bmatrix}. $$

Since \(\mathbf{P}^{\top}=\begin{bmatrix}1&0\\1&1\end{bmatrix}\), multiplication gives

$$ D'=\mathbf{P}^{\top}D\mathbf{P} =\begin{bmatrix}1&0\\1&1\end{bmatrix} \begin{bmatrix}1&1\\0&-1\end{bmatrix} =\begin{bmatrix}1&1\\1&0\end{bmatrix}. $$

This matrix is not diagonal, so it is not yet a second diagonal representation. To keep the computation focused on diagonal forms, take instead \(\mathbf{P}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\), which swaps the two coordinates. Then

$$ \mathbf{P}^{\top}D\mathbf{P} =\begin{bmatrix}0&1\\1&0\end{bmatrix} \begin{bmatrix}1&0\\0&-1\end{bmatrix} \begin{bmatrix}0&1\\1&0\end{bmatrix} =\begin{bmatrix}-1&0\\0&1\end{bmatrix}. $$

Both diagonal matrices have exactly one positive entry. The coordinate change is invertible because \(\mathbf{P}^2=\mathbf{I}_2\). Thus the computation agrees with the corollary: the positive index does not depend on the order in which the diagonal coordinates are listed.

Check: \(\mathbf{P}^{\top}=\mathbf{P}\), and \(\mathbf{P}D\mathbf{P}=\begin{bmatrix}-1&0\\0&1\end{bmatrix}\), as claimed.

Common Pitfall: Checking Only Basis Vectors

Consider \(q(x,y)=x^2-y^2\), with diagonal matrix \(\operatorname{diag}(1,-1)\). Let \(\mathbf{u}=(1,0)^{\top}\) and \(\mathbf{v}=(2,1)^{\top}\). These vectors are independent: if \(a\mathbf{u}+b\mathbf{v}=\mathbf{0}\), then \((a+2b,b)=(0,0)\), which gives \(b=0\) and then \(a=0\). Both basis vectors have positive value:

$$ q(\mathbf{u})=1,\qquad q(\mathbf{v})=2^2-1^2=3. $$

A mistaken test would conclude that their span is positive definite. But the combination \(\mathbf{v}-2\mathbf{u}=(0,1)^{\top}\) is nonzero and

$$ q(\mathbf{v}-2\mathbf{u})=q(0,1)=0^2-1^2=-1<0. $$

So the span is not positive definite. This example shows why positivity must be checked for every nonzero linear combination, or established by a valid argument that covers them all. Here the positive index is \(1\), and the theorem also rules out any positive-definite subspace of dimension \(2\).

Also distinguish a subspace of maximal dimension from one that is merely maximal under inclusion. The theorem concerns the greatest dimension among all positive-definite subspaces. It does not assert that the positive coordinate subspace is the only subspace attaining that dimension; the second worked example exhibited another one.

Check Your Understanding

Use the definition of positive definiteness and the maximal positive dimension theorem to answer these questions.

  1. For \(q(\mathbf{x})=2x_1^2-5x_2^2+3x_3^2\), what is the positive index, and give a positive-definite subspace of that dimension.
  2. For \(q(x,y,z)=x^2+y^2-z^2\), why can no three-dimensional subspace be positive definite?
  3. In the proof of the upper bound, why does a vector in the kernel of the projection onto the positive coordinates have form value at most zero?
  4. Give an example showing why positive values on each vector of a basis do not guarantee positivity on the whole span.
  5. Explain why an invertible change of coordinates preserves the maximum dimension of a positive-definite subspace.

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