Eigenvectors, the Spectral Theorem, and Why the SVD Always Exists

8 minute read

Published:

TL;DR: An eigenvector satisfies \(Av = \lambda v\) — a direction the map only rescales. Some matrices have too few of them to form a basis and cannot be diagonalised at all. Symmetric matrices are the happy case: the spectral theorem gives real eigenvalues and an orthonormal eigenbasis. The SVD drops the requirement that input and output directions be the same, and in exchange it exists for every matrix: \(A = U\Sigma V^\top\), read as rotate, scale, rotate. Truncating it gives the provably best low-rank approximation.

Invariant directions

For a square $A$, a non-zero $v$ with

\[ Av = \lambda v \]

is an eigenvector with eigenvalue $\lambda$: the map does not turn $v$ at all, it only scales it by $\lambda$. Find $n$ independent such directions and you have found the basis in which $A$ is trivial. Stack them as the columns of $P$ and, using the change-of-basis reading,

\[ A = P\Lambda P^{-1}, \qquad \Lambda = \operatorname{diag}(\lambda_1,\dots,\lambda_n). \]

Applying $A$ a hundred times becomes $P\Lambda^{100}P^{-1}$: raise the diagonal entries to the hundredth power and stop. This is why eigenvalues govern the long-run behaviour of any repeated linear process — power iteration, Markov chains, linear recurrences, the stability of a linearised dynamical system.

When diagonalisation fails

It fails when there are not enough independent eigenvectors. The standard counterexample is the shear

\[ N = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}. \]

Its characteristic polynomial is $(1-\lambda)^2$, so $\lambda = 1$ twice. But solving $(N - I)v = 0$ gives only the line spanned by $(1,0)^\top$: one eigendirection where two are needed. $N$ is defective and no $P$ exists. Nothing pathological is happening — a shear genuinely has only one invariant direction — but the eigendecomposition simply has no answer to give.

Even when diagonalisation succeeds, for non-symmetric $A$ the eigenvectors need not be orthogonal, $P$ can be badly conditioned, and the eigenvalues can be complex.

The symmetric case is different

If $A = A^\top$ with real entries, the spectral theorem guarantees all of the following: the eigenvalues are real, eigenvectors for distinct eigenvalues are orthogonal, and there is always an orthonormal basis of eigenvectors even with repeated eigenvalues. So

\[ A = Q\Lambda Q^\top, \qquad Q^\top Q = I . \]

The inverse is now a transpose, which is numerically ideal. Covariance matrices, Gram matrices $X^\top X$, graph Laplacians and Hessians are all symmetric, which is why the spectral theorem does so much work in machine learning — PCA is exactly this decomposition applied to a covariance matrix.

The SVD: weaken the question, always get an answer

The eigenvalue question insists the output direction equal the input direction. Drop that. Ask instead for orthonormal directions $v_i$ in the domain that map to orthogonal directions $u_i$ in the codomain, with $Av_i = \sigma_i u_i$ and $\sigma_i \ge 0$. That question always has an answer, for any real $m \times n$ matrix, square or not:

\[ A = U\Sigma V^\top, \qquad U^\top U = I_m,\quad V^\top V = I_n,\quad \Sigma = \operatorname{diag}(\sigma_1 \ge \sigma_2 \ge \dots \ge 0). \]

Geometrically, since $U$ and $V$ are orthogonal, this reads rotate, scale along axes, rotate. Every linear map, however messy, is a rotation followed by an axis-aligned stretch followed by another rotation. The unit sphere is always sent to an ellipsoid whose semi-axis lengths are the singular values.

The connection to eigenvalues is one line of algebra:

\[ A^\top A = V\Sigma^\top U^\top U \Sigma V^\top = V(\Sigma^\top\Sigma)V^\top . \]

$A^\top A$ is symmetric positive semi-definite, so this is its spectral decomposition: the right singular vectors are its eigenvectors, and $\sigma_i = \sqrt{\lambda_i(A^\top A)}$. Symmetrically, the left singular vectors are eigenvectors of $AA^\top$. (In practice nobody forms $A^\top A$ to compute an SVD — squaring the matrix squares its condition number — but the identity is the right mental model.)

A worked $2\times2$ example, exactly

Take

\[ A = \begin{pmatrix} 3 & 0 \\ 4 & 5 \end{pmatrix}. \]

It is triangular, so its eigenvalues are 3 and 5, with eigenvectors $(1,-2)^\top/\sqrt5$ and $(0,1)^\top$ — not orthogonal, since $A$ is not symmetric.

Now the SVD. \(A^\top A = \begin{pmatrix} 25 & 20 \\ 20 & 25\end{pmatrix}\), whose eigenvalues are $25 \pm 20$, that is $45$ and $5$, with eigenvectors $(1,1)^\top/\sqrt2$ and $(1,-1)^\top/\sqrt2$. Hence

\[ \sigma_1 = \sqrt{45} = 3\sqrt5 \approx 6.708, \qquad \sigma_2 = \sqrt5 \approx 2.236 . \]

The left singular vectors follow from $u_i = Av_i/\sigma_i$. With $v_1 = (1,1)^\top/\sqrt2$ we get $Av_1 = (3, 9)^\top/\sqrt2$, and dividing by $3\sqrt5$ gives $u_1 = (1,3)^\top/\sqrt{10}$. Likewise $Av_2 = (3,-1)^\top/\sqrt2$ gives $u_2 = (3,-1)^\top/\sqrt{10}$, which is orthogonal to $u_1$ as promised.

Two sanity checks: $\sigma_1\sigma_2 = 3\sqrt5 \cdot \sqrt5 = 15 = \lvert\det A\rvert$, and $\sigma_1^2 + \sigma_2^2 = 45 + 5 = 50 = 3^2 + 0^2 + 4^2 + 5^2 = \lVert A\rVert_F^2$.

QuantityValue
Eigenvalues of $A$$3,\ 5$
Singular values of $A$$3\sqrt5 \approx 6.708,\ \sqrt5 \approx 2.236$
Largest stretch of any unit vector$6.708$, not $5$
$\lvert\det A\rvert$$15 = 3\cdot 5 = \sigma_1\sigma_2$
The SVD sends the unit circle to an ellipse with semi-axes equal to the singular valuesOn the left, a unit circle with two perpendicular arrows marking the right singular vectors v1 along the direction (1,1)/root2 and v2 along (1,minus 1)/root2. On the right, the image under the matrix with rows (3,0) and (4,5): an ellipse whose semi-major axis has length 6.708, equal to sigma one, pointing along u1 = (1,3)/root10, and whose semi-minor axis has length 2.236, equal to sigma two, pointing along u2 = (3,minus 1)/root10. Both panels are drawn at the same scale, so the ellipse is dramatically larger than the circle. unit circle in the domain its image: an ellipse, semi-axes 6.708 and 2.236 v₁ = (1,1)/√2 v₂ = (1,−1)/√2 apply A σ₁u₁, length 6.708 σ₂u₂, length 2.236
Notice that the longest semi-axis is 6.708, larger than either eigenvalue of A (3 and 5). The maximum stretch a matrix applies is its largest singular value, never its largest eigenvalue.

Low-rank approximation and Eckart–Young

Write the SVD as a sum of rank-one pieces, $A = \sum_i \sigma_i u_i v_i^\top$, and keep the largest $k$ terms. The Eckart–Young–Mirsky theorem says this truncation $A_k$ is optimal: among all matrices of rank at most $k$, it minimises both $\lVert A - A_k\rVert_F$ and the spectral norm $\lVert A - A_k\rVert_2$, with errors

\[ \lVert A - A_k\rVert_2 = \sigma_{k+1}, \qquad \lVert A - A_k\rVert_F = \sqrt{\textstyle\sum_{i>k}\sigma_i^2}. \]

For our $A$, the rank-one truncation is \(\sigma_1 u_1 v_1^\top = \begin{pmatrix} 1.5 & 1.5 \\ 4.5 & 4.5\end{pmatrix}\), and the residual \(A - A_1 = \begin{pmatrix} 1.5 & -1.5 \\ -0.5 & 0.5\end{pmatrix}\) has Frobenius norm $\sqrt{2.25+2.25+0.25+0.25} = \sqrt5 = \sigma_2$, exactly as the theorem predicts.

Key Insight — the SVD exists because it asks less: the eigendecomposition demands one orthonormal basis that works simultaneously as input and output basis, and for most matrices no such basis exists. The SVD allows two different bases, \(V\) on the way in and \(U\) on the way out. That extra freedom is exactly what makes it unconditionally available — and why the defective shear \(N = \begin{pmatrix}1&1\\0&1\end{pmatrix}\), which has no eigendecomposition, still has a perfectly good SVD with singular values \(\varphi \approx 1.618\) and \(1/\varphi \approx 0.618\) whose product is \(1 = \lvert\det N\rvert\).
Interview trap — eigenvalues are not singular values. They coincide only when \(A\) is symmetric positive semi-definite; for symmetric indefinite \(A\), \(\sigma_i = \lvert\lambda_i\rvert\); in general they are unrelated in size, as the example above shows (eigenvalues 3 and 5, singular values 6.708 and 2.236). Two consequences people get wrong under pressure: the operator 2-norm is \(\sigma_{\max}\), not \(\lvert\lambda\rvert_{\max}\); and the right singular vectors are eigenvectors of \(A^\top A\), not of \(A\).

Where this shows up

PCA is the SVD of the centred data matrix; whitening, the pseudoinverse and stable rank-deficient least squares all come straight from $U\Sigma V^\top$. The condition number \(\kappa_2(A) = \sigma_{\max}/\sigma_{\min}\) — which governs error amplification and reappears in convergence rates — is about singular values, not eigenvalues.

Recap

  • \(Av = \lambda v\) picks out invariant directions; \(A = P\Lambda P^{-1}\) exists only when there are \(n\) independent eigenvectors, which fails for defective matrices such as the shear.
  • Spectral theorem: a real symmetric matrix always has real eigenvalues and an orthonormal eigenbasis, so \(A = Q\Lambda Q^\top\).
  • \(A = U\Sigma V^\top\) exists for every real matrix and reads as rotate–scale–rotate; the unit sphere becomes an ellipsoid with semi-axes \(\sigma_i\).
  • \(\sigma_i = \sqrt{\lambda_i(A^\top A)}\); right singular vectors are eigenvectors of \(A^\top A\), left ones of \(AA^\top\).
  • Eckart–Young: truncating the SVD at \(k\) terms is the best possible rank-\(k\) approximation, with spectral-norm error exactly \(\sigma_{k+1}\).

References

  1. Eckart, C., & Young, G. The approximation of one matrix by another of lower rank. Psychometrika 1(3), 211–218, 1936.
  2. Trefethen, L. N., & Bau, D. Numerical Linear Algebra. SIAM, 1997 — lectures 4–5 on the SVD.
  3. Golub, G. H., & Van Loan, C. F. Matrix Computations, 4th ed., ch. 2 and 8. Johns Hopkins University Press, 2013.
  4. Strang, G. Introduction to Linear Algebra, 6th ed., ch. 6–7. Wellesley-Cambridge Press, 2023.
  5. Halko, N., Martinsson, P.-G., & Tropp, J. A. Finding Structure with Randomness: Probabilistic Algorithms for Constructing Approximate Matrix Decompositions. SIAM Review 53(2), 217–288, 2011.