Tutorials › Linear Algebra › Algebra of Spectral Projectors

Symmetric Matrices and the Spectral Theorem · Tutorial 741 of 1000

Algebra of Spectral Projectors

Prove the algebraic identities for eigenspace projectors and use them to reconstruct a symmetric matrix from its eigenvalues and projectors.

Advanced 10 min read

What You'll Learn

  • Define the orthogonal projector onto each eigenspace using an orthonormal basis.
  • Prove that each eigenspace projector is symmetric and idempotent.
  • Show that projectors for distinct eigenvalues multiply to zero.
  • Prove that all eigenspace projectors sum to the identity matrix.
  • Reconstruct a symmetric matrix as a sum of its eigenvalues times their projectors.
  • Check projector identities when an eigenvalue has multiplicity greater than one.

From Eigenspaces to Projectors

For a real symmetric matrix, the spectral theorem gives an orthonormal basis of eigenvectors. Grouping the vectors by eigenvalue gives mutually orthogonal eigenspaces. An orthogonal projector selects the component of a vector lying in one specified subspace and discards its orthogonal component. The algebra of these projectors records how the eigenspaces fit together: projecting twice onto the same eigenspace changes nothing, projecting onto two distinct eigenspaces in succession gives zero, and projecting onto all the eigenspaces recovers the original vector.

Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) be symmetric, and let \(\lambda_1,\dots,\lambda_r\) be its distinct eigenvalues. For each \(i\), its eigenspace is \(E_{\lambda_i}=\{\mathbf{x}\in\mathbb{R}^n:\mathbf{A}\mathbf{x}=\lambda_i\mathbf{x}\}\). Each eigenspace is nonzero. By the spectral theorem, we can choose an orthonormal basis of each \(E_{\lambda_i}\), and the union of these bases is an orthonormal basis of \(\mathbb{R}^n\). Distinct eigenspaces are orthogonal.

Definition: Let the columns of \(\mathbf{U}_i\) be an orthonormal basis of \(E_{\lambda_i}\). The orthogonal projector onto \(E_{\lambda_i}\) is the matrix \(\mathbf{P}_i=\mathbf{U}_i\mathbf{U}_i^{\top}\). For any \(\mathbf{x}\in\mathbb{R}^n\), \(\mathbf{P}_i\mathbf{x}\) is the component of \(\mathbf{x}\) in \(E_{\lambda_i}\). The columns of \(\mathbf{U}_i\) are orthonormal, so \(\mathbf{U}_i^{\top}\mathbf{U}_i\) is the identity matrix of the appropriate size.

In particular, the projector is defined for the whole eigenspace, not just for one eigenvector chosen from it. If an eigenvalue has a multidimensional eigenspace, its projector includes every direction in that space. The choice of orthonormal basis within an eigenspace does not change the projector; the identities below describe it using the full orthogonal decomposition into eigenspaces.

The Algebra of the Eigenspace Projectors

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) be symmetric, with distinct eigenvalues \(\lambda_1,\dots,\lambda_r\), and let \(\mathbf{P}_i\) be the orthogonal projector onto \(E_{\lambda_i}\). Then, for all \(i,j\), $$ \mathbf{P}_i^{\top}=\mathbf{P}_i,\qquad \mathbf{P}_i^2=\mathbf{P}_i,\qquad \mathbf{P}_i\mathbf{P}_j=\mathbf{O}\ \ (i\ne j),\qquad \sum_{i=1}^r\mathbf{P}_i=\mathbf{I}_n. $$

Proof. Fix \(i\), and write \(\mathbf{P}_i=\mathbf{U}_i\mathbf{U}_i^{\top}\). Transposing gives \(\mathbf{P}_i^{\top}=(\mathbf{U}_i\mathbf{U}_i^{\top})^{\top}=\mathbf{U}_i\mathbf{U}_i^{\top}=\mathbf{P}_i\). Using \(\mathbf{U}_i^{\top}\mathbf{U}_i=\mathbf{I}\) for the identity matrix of the column size of \(\mathbf{U}_i\), we also have \(\mathbf{P}_i^2=\mathbf{U}_i(\mathbf{U}_i^{\top}\mathbf{U}_i)\mathbf{U}_i^{\top}=\mathbf{U}_i\mathbf{U}_i^{\top}=\mathbf{P}_i\). If \(i\ne j\), the eigenspaces \(E_{\lambda_i}\) and \(E_{\lambda_j}\) are orthogonal. Therefore \(\mathbf{U}_i^{\top}\mathbf{U}_j=\mathbf{O}\), since every entry is an inner product between a column of \(\mathbf{U}_i\) and a column of \(\mathbf{U}_j\). It follows that \(\mathbf{P}_i\mathbf{P}_j=\mathbf{U}_i(\mathbf{U}_i^{\top}\mathbf{U}_j)\mathbf{U}_j^{\top}=\mathbf{O}\). Finally, concatenate the orthonormal bases of the eigenspaces into the square matrix \(\mathbf{U}=[\mathbf{U}_1\ \cdots\ \mathbf{U}_r]\). The spectral theorem says these columns form an orthonormal basis of \(\mathbb{R}^n\), so \(\mathbf{U}\mathbf{U}^{\top}=\mathbf{I}_n\). Multiplying out in blocks gives \(\mathbf{U}\mathbf{U}^{\top}=\sum_{i=1}^r\mathbf{U}_i\mathbf{U}_i^{\top}=\sum_{i=1}^r\mathbf{P}_i\). Thus the projectors sum to \(\mathbf{I}_n\), completing all four claims. \(\square\)

These identities have direct interpretations. Symmetry says that the projector is a symmetric matrix. Idempotence says that once a vector has been projected into an eigenspace, projecting again leaves it there. The zero product says that distinct eigenspaces have no nonzero component in common. The sum identity says that every vector is the sum of its components in the eigenspaces.

Worked Example: Two Distinct Eigenspaces in R²

Let \(\mathbf{A}=\begin{bmatrix}3&1\\1&3\end{bmatrix}\). Find its eigenspace projectors and check the identities and spectral reconstruction.

The vectors \(\mathbf{q}_1=\frac{1}{\sqrt{2}}(1,1)^{\top}\) and \(\mathbf{q}_2=\frac{1}{\sqrt{2}}(1,-1)^{\top}\) are orthonormal. Direct multiplication gives \(\mathbf{A}\mathbf{q}_1=4\mathbf{q}_1\) and \(\mathbf{A}\mathbf{q}_2=2\mathbf{q}_2\). Thus the projectors are

$$ \mathbf{P}_4=\mathbf{q}_1\mathbf{q}_1^{\top} =\frac12\begin{bmatrix}1&1\\1&1\end{bmatrix}, \qquad \mathbf{P}_2=\mathbf{q}_2\mathbf{q}_2^{\top} =\frac12\begin{bmatrix}1&-1\\-1&1\end{bmatrix}. $$

For example, squaring the first projector gives \(\mathbf{P}_4^2=\frac14\begin{bmatrix}2&2\\2&2\end{bmatrix}=\mathbf{P}_4\). Both projectors are symmetric because their displayed matrices equal their transposes. Their product and sum are

$$ \mathbf{P}_4\mathbf{P}_2 =\frac14\begin{bmatrix}1&1\\1&1\end{bmatrix} \begin{bmatrix}1&-1\\-1&1\end{bmatrix} =\mathbf{O}, \qquad \mathbf{P}_4+\mathbf{P}_2 =\begin{bmatrix}1&0\\0&1\end{bmatrix} =\mathbf{I}_2. $$

Reconstruct the matrix by weighting each projector by its eigenvalue:

$$ 4\mathbf{P}_4+2\mathbf{P}_2 =\begin{bmatrix}2&2\\2&2\end{bmatrix} +\begin{bmatrix}1&-1\\-1&1\end{bmatrix} =\begin{bmatrix}3&1\\1&3\end{bmatrix} =\mathbf{A}. $$

Check: the result is the original matrix, and its action on the two eigenvectors agrees with the eigenvalues: \(\mathbf{A}\mathbf{q}_1=4\mathbf{q}_1\) and \(\mathbf{A}\mathbf{q}_2=2\mathbf{q}_2\).

Spectral Reconstruction from the Projectors

Theorem (Spectral decomposition): Under the hypotheses above, the symmetric matrix is the sum $$ \mathbf{A}=\sum_{i=1}^r\lambda_i\mathbf{P}_i. $$

Proof. Let \(\mathbf{x}\in\mathbb{R}^n\). The identity \(\sum_{i=1}^r\mathbf{P}_i=\mathbf{I}_n\) gives \(\mathbf{x}=\sum_{i=1}^r\mathbf{P}_i\mathbf{x}\). Each \(\mathbf{P}_i\mathbf{x}\) belongs to \(E_{\lambda_i}\), because it is a linear combination of the columns of \(\mathbf{U}_i\). By the definition of that eigenspace, \(\mathbf{A}(\mathbf{P}_i\mathbf{x})=\lambda_i\mathbf{P}_i\mathbf{x}\). Applying \(\mathbf{A}\) to the decomposition of \(\mathbf{x}\) therefore gives \(\mathbf{A}\mathbf{x}=\sum_{i=1}^r\lambda_i\mathbf{P}_i\mathbf{x}\). This holds for every \(\mathbf{x}\in\mathbb{R}^n\), so the two matrices \(\mathbf{A}\) and \(\sum_{i=1}^r\lambda_i\mathbf{P}_i\) act identically on every vector and are equal. \(\square\)

The formula is valid whether the eigenvalues are distinct or repeated, provided the sum is indexed by the distinct eigenvalues and \(\mathbf{P}_i\) projects onto the entire corresponding eigenspace. The rank of a projector is the dimension of the eigenspace onto which it projects; it need not be one.

Worked Example: A Repeated Eigenvalue

Consider the symmetric matrix \(\mathbf{A}=\begin{bmatrix}2&0&0\\0&3&1\\0&1&3\end{bmatrix}\). Its eigenvalue \(2\) has a two-dimensional eigenspace, while \(4\) has a one-dimensional eigenspace. Find the projectors and verify the decomposition.

The vectors \(\mathbf{e}_1=(1,0,0)^{\top}\) and \(\mathbf{u}=\frac{1}{\sqrt{2}}(0,1,-1)^{\top}\) are orthonormal eigenvectors for eigenvalue \(2\): multiplication gives \(\mathbf{A}\mathbf{e}_1=2\mathbf{e}_1\) and \(\mathbf{A}\mathbf{u}=2\mathbf{u}\). The vector \(\mathbf{v}=\frac{1}{\sqrt{2}}(0,1,1)^{\top}\) is a unit eigenvector for \(4\), since \(\mathbf{A}\mathbf{v}=4\mathbf{v}\). The projector onto the full \(2\)-eigenspace is the sum of the projectors from its two orthonormal basis vectors:

$$ \mathbf{P}_2=\mathbf{e}_1\mathbf{e}_1^{\top}+\mathbf{u}\mathbf{u}^{\top} =\begin{bmatrix}1&0&0\\0&\tfrac12&-\tfrac12\\0&-\tfrac12&\tfrac12\end{bmatrix}, \qquad \mathbf{P}_4=\mathbf{v}\mathbf{v}^{\top} =\begin{bmatrix}0&0&0\\0&\tfrac12&\tfrac12\\0&\tfrac12&\tfrac12\end{bmatrix}. $$

Both displayed matrices are symmetric. Direct multiplication gives \(\mathbf{P}_2^2=\begin{bmatrix}1&0&0\\0&\tfrac12&-\tfrac12\\0&-\tfrac12&\tfrac12\end{bmatrix}=\mathbf{P}_2\) and \(\mathbf{P}_4^2=\begin{bmatrix}0&0&0\\0&\tfrac12&\tfrac12\\0&\tfrac12&\tfrac12\end{bmatrix}=\mathbf{P}_4\). Their product is zero: the lower-right \(2\times2\) block product is \(\frac14\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\begin{bmatrix}1&1\\1&1\end{bmatrix}=\mathbf{O}\), and the first row and column of \(\mathbf{P}_4\) are zero. Their sum and the reconstruction are

$$ \mathbf{P}_2+\mathbf{P}_4=\mathbf{I}_3,\qquad 2\mathbf{P}_2+4\mathbf{P}_4 =\begin{bmatrix}2&0&0\\0&1&-1\\0&-1&1\end{bmatrix} +\begin{bmatrix}0&0&0\\0&2&2\\0&2&2\end{bmatrix} =\mathbf{A}. $$

Check: the matrix on the right is exactly \(\begin{bmatrix}2&0&0\\0&3&1\\0&1&3\end{bmatrix}\), as required. In particular, \(\mathbf{P}_2\) keeps both independent directions in \(E_2\), not just one.

A Three-Eigenspace Verification

Worked Example: Three Projectors Summing to the Identity

Let \(\mathbf{q}_1=(1,0,0)^{\top}\), \(\mathbf{q}_2=\frac{1}{\sqrt{2}}(0,1,1)^{\top}\), and \(\mathbf{q}_3=\frac{1}{\sqrt{2}}(0,1,-1)^{\top}\), with respective eigenvalues \(1,3,5\). Construct the symmetric matrix and verify its projectors.

The vectors are unit length and pairwise orthogonal. Their projectors are

$$ \mathbf{P}_1=\begin{bmatrix}1&0&0\\0&0&0\\0&0&0\end{bmatrix},\quad \mathbf{P}_3=\frac12\begin{bmatrix}0&0&0\\0&1&1\\0&1&1\end{bmatrix},\quad \mathbf{P}_5=\frac12\begin{bmatrix}0&0&0\\0&1&-1\\0&-1&1\end{bmatrix}. $$

Each is symmetric. The first squares to itself. For the other two, their nonzero \(2\times2\) blocks are \(\frac12\begin{bmatrix}1&1\\1&1\end{bmatrix}\) and \(\frac12\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\); squaring either block gives that same block. Multiplying those two blocks gives \(\mathbf{O}\), so \(\mathbf{P}_3\mathbf{P}_5=\mathbf{O}\), and products with \(\mathbf{P}_1\) are zero because the other projectors have zero first row and column. Adding gives \(\mathbf{P}_1+\mathbf{P}_3+\mathbf{P}_5=\mathbf{I}_3\).

The matrix defined by this eigendata is

$$ \mathbf{A}=\mathbf{P}_1+3\mathbf{P}_3+5\mathbf{P}_5 =\begin{bmatrix}1&0&0\\0&4&-1\\0&-1&4\end{bmatrix}. $$

Check: \(\mathbf{A}\mathbf{q}_1=(1,0,0)^{\top}=\mathbf{q}_1\), \(\mathbf{A}\mathbf{q}_2=(0,3/\sqrt{2},3/\sqrt{2})^{\top}=3\mathbf{q}_2\), and \(\mathbf{A}\mathbf{q}_3=(0,5/\sqrt{2},-5/\sqrt{2})^{\top}=5\mathbf{q}_3\). Thus each claimed eigenvalue and the reconstructed matrix agree.

Common Pitfall: Projecting onto Only Part of an Eigenspace

When an eigenvalue is repeated, using just one unit eigenvector gives a projector onto one line, not onto the full eigenspace. For the repeated-eigenvalue example, suppose we incorrectly use only \(\mathbf{e}_1\) to represent the \(2\)-eigenspace. This gives the wrong projector \(\widetilde{\mathbf{P}}_2=\mathbf{e}_1\mathbf{e}_1^{\top}=\begin{bmatrix}1&0&0\\0&0&0\\0&0&0\end{bmatrix}\). It is symmetric and idempotent, but it omits the direction \(\mathbf{u}\). In particular, \(\widetilde{\mathbf{P}}_2+\mathbf{P}_4=\operatorname{diag}(1,\tfrac12,\tfrac12)\ne\mathbf{I}_3\). The resulting reconstruction also fails:

$$ 2\widetilde{\mathbf{P}}_2+4\mathbf{P}_4 =\begin{bmatrix}2&0&0\\0&2&2\\0&2&2\end{bmatrix} \ne \begin{bmatrix}2&0&0\\0&3&1\\0&1&3\end{bmatrix} =\mathbf{A}. $$

The correction is to form the projector from an orthonormal basis of the entire eigenspace. Here that means adding \(\mathbf{e}_1\mathbf{e}_1^{\top}\) and \(\mathbf{u}\mathbf{u}^{\top}\). A quick diagnostic is to check both \(\sum_i\mathbf{P}_i=\mathbf{I}_n\) and \(\mathbf{A}=\sum_i\lambda_i\mathbf{P}_i\); either check exposes a missing eigendirection.

Check Your Understanding

Use the projector identities and verify any proposed matrices by multiplication.

  1. For a projector \(\mathbf{P}=\mathbf{U}\mathbf{U}^{\top}\) with orthonormal columns in \(\mathbf{U}\), show directly that \(\mathbf{P}^{\top}=\mathbf{P}\) and \(\mathbf{P}^2=\mathbf{P}\).
  2. Why does orthogonality of two eigenspaces imply \(\mathbf{P}_i\mathbf{P}_j=\mathbf{O}\)?
  3. For the matrix in the repeated-eigenvalue example, compute \(\mathbf{P}_2\mathbf{P}_4\) entry by entry.
  4. Explain why the projector onto a two-dimensional eigenspace need not have rank one.
  5. If \(\mathbf{A}=\sum_i\lambda_i\mathbf{P}_i\), explain how the identity \(\sum_i\mathbf{P}_i=\mathbf{I}_n\) gives the decomposition of an arbitrary vector into its eigenspace components.

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