Tutorials › Linear Algebra › Rank-One Spectral Decomposition

Symmetric Matrices and the Spectral Theorem · Tutorial 739 of 1000

Rank-One Spectral Decomposition

Learn how an orthogonal diagonalization becomes a sum of rank-one matrices and how to reconstruct and check a symmetric matrix from its eigenpairs.

Advanced 9 min read

What You'll Learn

  • Expand \(Q\Lambda Q^{\top}\) as a sum of eigenvalue-weighted outer products.
  • Explain why each term \( \lambda_i\mathbf{q}_i\mathbf{q}_i^{\top}\) has rank at most one.
  • Reconstruct symmetric matrices from paired eigenvalues and orthonormal eigenvectors.
  • Verify reconstructed matrices by checking their action on each eigenvector.
  • Identify and correct errors caused by mismatching eigenvalues and eigenvectors.

From Orthogonal Diagonalization to a Sum

An orthogonal diagonalization describes a symmetric matrix using an orthonormal basis of eigenvectors. The matrix \(Q\) collects those vectors as columns, while the diagonal entries of \(\boldsymbol{\Lambda}\) are their corresponding eigenvalues. Multiplying \(Q\boldsymbol{\Lambda}Q^{\top}\) in another way reveals a useful structure: the original matrix is a sum of simple matrices, one for each eigenvector. Each summand records the contribution of a single eigenvalue and its paired eigenvector.

Throughout, the scalars are real. Suppose \(\mathbf{A}\in\mathbb{R}^{n\times n}\) is symmetric and has an orthogonal diagonalization \(\mathbf{A}=\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}\). Here \(\mathbf{Q}=[\mathbf{q}_1\ \cdots\ \mathbf{q}_n]\) is orthogonal, so its columns satisfy \(\mathbf{q}_i^{\top}\mathbf{q}_j=1\) if \(i=j\) and \(0\) otherwise. The diagonal matrix \(\boldsymbol{\Lambda}\) has entries \(\lambda_1,\dots,\lambda_n\) in the same order as the columns of \(\mathbf{Q}\). In particular, \(\mathbf{A}\mathbf{q}_i=\lambda_i\mathbf{q}_i\).

Definition: For a column vector \(\mathbf{q}\), the matrix \(\mathbf{q}\mathbf{q}^{\top}\) is its outer product. If \(\mathbf{q}\ne\mathbf{0}\), this matrix has rank one: for every \(\mathbf{x}\), \(\mathbf{q}\mathbf{q}^{\top}\mathbf{x}=(\mathbf{q}^{\top}\mathbf{x})\mathbf{q}\), so its outputs lie in the span of \(\mathbf{q}\), and taking \(\mathbf{x}=\mathbf{q}\) gives the nonzero output \((\mathbf{q}^{\top}\mathbf{q})\mathbf{q}\). For an orthonormal eigenvector \(\mathbf{q}_i\), the matrix \(\lambda_i\mathbf{q}_i\mathbf{q}_i^{\top}\) is therefore a rank-one term when \(\lambda_i\ne0\), and is the zero matrix when \(\lambda_i=0\).

The Rank-One Spectral Decomposition

Theorem (Rank-one spectral decomposition): Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) have an orthogonal diagonalization \(\mathbf{A}=\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}\), where \(\mathbf{Q}=[\mathbf{q}_1\ \cdots\ \mathbf{q}_n]\) is orthogonal and \(\boldsymbol{\Lambda}=\operatorname{diag}(\lambda_1,\dots,\lambda_n)\). Then $$ \mathbf{A}=\sum_{i=1}^{n}\lambda_i\mathbf{q}_i\mathbf{q}_i^{\top}. $$ Conversely, if \(\mathbf{q}_1,\dots,\mathbf{q}_n\) are an orthonormal basis of \(\mathbb{R}^n\), and \(\lambda_1,\dots,\lambda_n\in\mathbb{R}\), then the matrix defined by this sum is symmetric and satisfies \(\mathbf{A}\mathbf{q}_j=\lambda_j\mathbf{q}_j\) for every \(j\).

Proof. For the forward statement, the diagonal matrix can be written as \(\boldsymbol{\Lambda}=\sum_{i=1}^{n}\lambda_i\mathbf{e}_i\mathbf{e}_i^{\top}\), where \(\mathbf{e}_i\) is the \(i\)th standard basis vector. Substituting this into the orthogonal diagonalization and distributing matrix multiplication over the sum gives $$ \mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top} =\sum_{i=1}^{n}\lambda_i(\mathbf{Q}\mathbf{e}_i)(\mathbf{Q}\mathbf{e}_i)^{\top} =\sum_{i=1}^{n}\lambda_i\mathbf{q}_i\mathbf{q}_i^{\top}, $$ because \(\mathbf{Q}\mathbf{e}_i=\mathbf{q}_i\). For the converse, each \(\mathbf{q}_i\mathbf{q}_i^{\top}\) is symmetric, since its transpose is itself. Thus their real weighted sum is symmetric. Applying the sum to \(\mathbf{q}_j\) gives $$ \mathbf{A}\mathbf{q}_j =\sum_{i=1}^{n}\lambda_i\mathbf{q}_i(\mathbf{q}_i^{\top}\mathbf{q}_j) =\lambda_j\mathbf{q}_j, $$ since orthonormality makes every factor \(\mathbf{q}_i^{\top}\mathbf{q}_j\) zero except the one for \(i=j\), which is one. \(\square\)

The formula has a direct entry-by-entry interpretation. If \((\mathbf{q}_i)_r\) denotes the \(r\)th coordinate of \(\mathbf{q}_i\), then the entry in row \(r\), column \(s\) is $$ a_{rs}=\sum_{i=1}^{n}\lambda_i(\mathbf{q}_i)_r(\mathbf{q}_i)_s. $$ This follows because the \((r,s)\) entry of \(\mathbf{q}_i\mathbf{q}_i^{\top}\) is \((\mathbf{q}_i)_r(\mathbf{q}_i)_s\). It also explains how the sum remains symmetric: swapping \(r\) and \(s\) does not change any product in the expression.

The converse in the theorem is a reconstruction rule. Given an orthonormal basis and a real number for each basis vector, form every outer product, multiply it by its paired number, and add. The theorem guarantees that the resulting matrix has exactly the specified eigenvector-eigenvalue pairs. This statement does not require the eigenvalues to be distinct; repeated values and zero values are allowed.

Reconstructing a Matrix in Two Dimensions

Worked Example: A Symmetric \(2\times2\) Matrix

Reconstruct the matrix with eigenvalue \(3\) for \(\mathbf{q}_1=\frac{1}{\sqrt{2}}(1,1)^{\top}\) and eigenvalue \(-1\) for \(\mathbf{q}_2=\frac{1}{\sqrt{2}}(1,-1)^{\top}\).

First check the vectors: each has squared length \((1+1)/2=1\), and their dot product is \((1-1)/2=0\). They are an orthonormal basis. Their outer products are

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

Weight each outer product by its corresponding eigenvalue and add:

$$ \begin{aligned} \mathbf{A} &=3\mathbf{q}_1\mathbf{q}_1^{\top} -\mathbf{q}_2\mathbf{q}_2^{\top}\\ &=\frac32\begin{bmatrix}1&1\\1&1\end{bmatrix} -\frac12\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\\ &=\begin{bmatrix}1&2\\2&1\end{bmatrix}. \end{aligned} $$

Check: Multiplication by the first vector gives \(\mathbf{A}\mathbf{q}_1=\frac{1}{\sqrt{2}}(3,3)^{\top}=3\mathbf{q}_1\). Multiplication by the second gives \(\mathbf{A}\mathbf{q}_2=\frac{1}{\sqrt{2}}(-1,1)^{\top}=-\mathbf{q}_2\). Both specified eigenpairs are recovered, and the displayed matrix is symmetric.

This example illustrates why the eigenvalue must stay paired with its vector. The scalar \(3\) weights the outer product formed from \(\mathbf{q}_1\); the scalar \(-1\) weights the one formed from \(\mathbf{q}_2\). Changing that pairing generally changes the matrix, even though the same two vectors and the same two numbers still appear.

A Three-Dimensional Reconstruction

Worked Example: Three Orthonormal Eigenvectors

Use eigenvalues \(4,-2,1\), paired respectively with \(\mathbf{q}_1=\frac{1}{\sqrt{2}}(1,1,0)^{\top}\), \(\mathbf{q}_2=\frac{1}{\sqrt{2}}(1,-1,0)^{\top}\), and \(\mathbf{q}_3=(0,0,1)^{\top}\), to reconstruct \(\mathbf{A}\).

The first two vectors each have length one and have dot product \((1-1)/2=0\). The third has length one and dot product zero with each of the first two, so the three vectors are orthonormal. Their weighted outer products are

$$ 4\mathbf{q}_1\mathbf{q}_1^{\top} =\begin{bmatrix}2&2&0\\2&2&0\\0&0&0\end{bmatrix}, \qquad -2\mathbf{q}_2\mathbf{q}_2^{\top} =\begin{bmatrix}-1&1&0\\1&-1&0\\0&0&0\end{bmatrix}, \qquad \mathbf{q}_3\mathbf{q}_3^{\top} =\begin{bmatrix}0&0&0\\0&0&0\\0&0&1\end{bmatrix}. $$

Adding the first two terms gives \(\begin{bmatrix}1&3&0\\3&1&0\\0&0&0\end{bmatrix}\). Adding the third gives \(\mathbf{A}=\begin{bmatrix}1&3&0\\3&1&0\\0&0&1\end{bmatrix}\).

Check: The first product is \(\mathbf{A}\mathbf{q}_1=\frac{1}{\sqrt{2}}(4,4,0)^{\top}=4\mathbf{q}_1\). The second is \(\mathbf{A}\mathbf{q}_2=\frac{1}{\sqrt{2}}(-2,2,0)^{\top}=-2\mathbf{q}_2\). The third is \(\mathbf{A}\mathbf{q}_3=(0,0,1)^{\top}=\mathbf{q}_3\). Thus all three eigenpairs check, and the reconstructed matrix is symmetric.

Why the Coefficients Are Determined

For a fixed orthonormal basis, the eigenvalue attached to each vector is determined by the reconstructed matrix. In fact, if the matrix has the rank-one decomposition, multiplying on the left by \(\mathbf{q}_j^{\top}\) and on the right by \(\mathbf{q}_j\) isolates the \(j\)th coefficient.

Proposition: If \(\mathbf{q}_1,\dots,\mathbf{q}_n\) are orthonormal and \(\mathbf{A}=\sum_{i=1}^{n}c_i\mathbf{q}_i\mathbf{q}_i^{\top}\), then \(c_j=\mathbf{q}_j^{\top}\mathbf{A}\mathbf{q}_j\) for every \(j\).

Proof. Substitute the sum for \(\mathbf{A}\) and use associativity of matrix multiplication: $$ \mathbf{q}_j^{\top}\mathbf{A}\mathbf{q}_j =\sum_{i=1}^{n}c_i(\mathbf{q}_j^{\top}\mathbf{q}_i)(\mathbf{q}_i^{\top}\mathbf{q}_j). $$ If \(i\ne j\), both inner products in that summand are zero by orthogonality. If \(i=j\), both equal one. Therefore the sum has the single remaining term \(c_j\), proving the formula. \(\square\)

This result also gives a useful check on input data. If a proposed matrix and orthonormal eigenvectors are given, the eigenvalue for \(\mathbf{q}_j\) must agree with \(\mathbf{q}_j^{\top}\mathbf{A}\mathbf{q}_j\). More directly, one can test the eigenpair by computing \(\mathbf{A}\mathbf{q}_j\) and comparing it with \(\lambda_j\mathbf{q}_j\). A full reconstruction should pass these checks for every vector in the basis.

Repeated and Zero Eigenvalues

Worked Example: Repeated Eigenvalue and a Zero Term

Let \(\mathbf{q}_1=\frac13(1,2,2)^{\top}\), \(\mathbf{q}_2=\frac13(2,-2,1)^{\top}\), and \(\mathbf{q}_3=\frac13(2,1,-2)^{\top}\), with eigenvalues \(5,5,0\), respectively. Reconstruct \(\mathbf{A}\).

Each numerator vector has squared length \(9\), so each \(\mathbf{q}_i\) has length one. The numerator dot products are \(2-4+2=0\), \(2+2-4=0\), and \(4-2-2=0\), so the vectors are pairwise orthogonal. Their weighted outer products give $$ \begin{aligned} \mathbf{A} &=5\mathbf{q}_1\mathbf{q}_1^{\top} +5\mathbf{q}_2\mathbf{q}_2^{\top} +0\mathbf{q}_3\mathbf{q}_3^{\top}\\ &=\frac{5}{9}\left( \begin{bmatrix}1&2&2\\2&4&4\\2&4&4\end{bmatrix} + \begin{bmatrix}4&-4&2\\-4&4&-2\\2&-2&1\end{bmatrix} \right)\\ &=\frac{5}{9}\begin{bmatrix}5&-2&4\\-2&8&2\\4&2&5\end{bmatrix}. \end{aligned} $$

Check: Write \(\mathbf{M}=\begin{bmatrix}5&-2&4\\-2&8&2\\4&2&5\end{bmatrix}\), so \(\mathbf{A}=(5/9)\mathbf{M}\). Direct multiplication gives \(\mathbf{M}(1,2,2)^{\top}=(9,18,18)^{\top}\), hence \(\mathbf{A}\mathbf{q}_1=(5/27)(9,18,18)^{\top}=(5/3,10/3,10/3)^{\top}=5\mathbf{q}_1\). Also \(\mathbf{M}(2,-2,1)^{\top}=(18,-18,9)^{\top}\), so \(\mathbf{A}\mathbf{q}_2=(10/3,-10/3,5/3)^{\top}=5\mathbf{q}_2\). Finally, \(\mathbf{M}(2,1,-2)^{\top}=(0,0,0)^{\top}\), so \(\mathbf{A}\mathbf{q}_3=\mathbf{0}=0\mathbf{q}_3\). The repeated eigenvalue contributes two separate terms, while the zero eigenvalue contributes the zero matrix.

Repeated eigenvalues do not create a difficulty in the sum: each vector is still paired with its eigenvalue, and the terms are still added individually. The zero-eigenvalue term can be omitted in arithmetic because it is zero, but keeping it in the written formula makes the eigenpair correspondence explicit.

Common Pairing Mistake

Wrong calculation: In the first example, suppose the eigenvalues are accidentally swapped, assigning \(3\) to \(\mathbf{q}_2\) and \(-1\) to \(\mathbf{q}_1\). The resulting matrix is $$ 3\mathbf{q}_2\mathbf{q}_2^{\top}-\mathbf{q}_1\mathbf{q}_1^{\top} =\frac32\begin{bmatrix}1&-1\\-1&1\end{bmatrix} -\frac12\begin{bmatrix}1&1\\1&1\end{bmatrix} =\begin{bmatrix}1&-2\\-2&1\end{bmatrix}. $$ This is not the matrix reconstructed from the original pairings. The correction is to preserve the original correspondence: use \(3\mathbf{q}_1\mathbf{q}_1^{\top}\) and \(-\mathbf{q}_2\mathbf{q}_2^{\top}\). As a check on the wrong matrix, multiplying it by \(\mathbf{q}_1\) gives \(-\mathbf{q}_1\), not \(3\mathbf{q}_1\).

When eigenvalues are listed in an order, the eigenvectors in \(\mathbf{Q}\) must be ordered to match. A simultaneous reordering of the eigenvalues and their vectors leaves the sum unchanged, because it only changes the order of its terms. Reordering one list without the other changes the matrix in general.

Why the Decomposition Is Useful

The rank-one form separates a symmetric matrix into contributions along orthonormal eigenvector directions. It gives a compact way to move between an orthogonal diagonalization and the entries of the original matrix, and it makes reconstruction possible without first multiplying three full matrices. The checks are equally important: verify that the proposed vectors are orthonormal, keep each eigenvalue paired with its vector, and test the reconstructed matrix on every eigenvector. These steps detect both arithmetic mistakes and incorrect input pairings.

Check Your Understanding

Use the rank-one formula and check each reconstructed matrix by applying it to the stated eigenvectors.

  1. For eigenvalues \(2,-2\) paired with \((1,1)^{\top}/\sqrt{2}\) and \((1,-1)^{\top}/\sqrt{2}\), reconstruct the \(2\times2\) matrix.
  2. Explain why \(\mathbf{q}\mathbf{q}^{\top}\) has rank one whenever \(\mathbf{q}\ne\mathbf{0}\).
  3. If \(\mathbf{A}=\sum_i c_i\mathbf{q}_i\mathbf{q}_i^{\top}\) for an orthonormal basis, derive a formula for \(c_j\) using \(\mathbf{q}_j\) and \(\mathbf{A}\).
  4. What happens to the rank-one sum when one eigenvalue is zero?
  5. Describe the error in attaching an eigenvalue to the wrong eigenvector, and name a direct multiplication check that can reveal it.

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