MathLabs

Algebra

Eigenvalues and diagonalization

Special scalars and vectors that reveal the simplest form of a linear transformation.

IntuitionWhat an eigenvector really is

Most vectors get pushed off in a completely new direction when a linear map AA acts on them, and often get rotated as well as stretched. But for a special few directions, the map only stretches or shrinks the vector along the same line it already lay on — it never rotates it. Those special directions are the eigenvectors of AA, and the stretching factor along each one is the corresponding eigenvalue: Av=λvA\mathbf{v} = \lambda \mathbf{v}. Picture a rubber sheet being stretched: most marked points slide sideways, but a couple of lines on the sheet only get longer or shorter, staying put on the same axis. Those axes are exactly the eigenvectors.

3D bowl-shaped surface generated by a quadratic form, rotatable to reveal its principal axes.
For a symmetric matrix (a12=a21a_{12}=a_{21}), the two green dashed eigenvector axes are orthogonal: vectors along those axes only stretch by λ1,λ2\lambda_1, \lambda_2 without rotating.

SchoolFrom geometric picture to precise definition

Definition: Eigenvalue and eigenvector

Let AA be an n×nn \times n matrix. A nonzero vector v\mathbf{v} is called an eigenvector of AA if there is a scalar λ\lambda such that Av=λvA\mathbf{v} = \lambda \mathbf{v}; the scalar λ\lambda is the eigenvalue attached to v\mathbf{v}. Geometrically, AA maps the whole line through v\mathbf{v} to itself, merely rescaling it by λ\lambda.

Av=λvA\mathbf{v} = \lambda \mathbf{v}

Rewriting the defining equation as (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0} shows that v≠0\mathbf{v} \neq \mathbf{0} can only exist when A−λIA - \lambda I is singular, i.e. when its determinant vanishes: det⁡(A−λI)=0\det(A - \lambda I) = 0. Expanding this determinant gives a degree-nn polynomial in λ\lambda, the characteristic polynomial; its roots are exactly the eigenvalues of AA.

det⁡(A−λI)=0\det(A - \lambda I) = 0
Types of eigenvalues and what they mean geometrically
CaseGeometric meaning
nn distinct real eigenvaluesnn independent stretch axes; AA is always diagonalizable
Repeated eigenvalue, full eigenspaceStill diagonalizable: an entire plane (or higher) is stretched by the same factor
Repeated eigenvalue, defective eigenspaceNot diagonalizable: some directions get sheared, not just stretched
Complex conjugate pairNo real invariant line; the map rotates while it scales, like a spiral

UndergraduateDiagonalization and the spectral theorem

If λ1,…,λk\lambda_1, \dots, \lambda_k are pairwise distinct eigenvalues of AA with eigenvectors v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k, then {v1,…,vk}\{\mathbf{v}_1, \dots, \mathbf{v}_k\} is a linearly independent set.

Why is it true?

Each eigenvector marks out its own private invariant direction with its own private scaling factor; if one such direction could be built out of the others, applying AA would have to scale it by every one of those different factors at once, which is impossible unless the vector is zero.

Proof

We argue by induction on kk. For k=1k = 1 the claim is trivial: a single nonzero vector is automatically linearly independent.

Assume the result holds for k−1k - 1 distinct eigenvalues, and suppose toward contradiction that v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k are linearly dependent. Then there is a relation c1v1+⋯+ckvk=0c_1 \mathbf{v}_1 + \cdots + c_k \mathbf{v}_k = \mathbf{0} with not all cic_i zero.

Apply AA to both sides: since Avi=λiviA\mathbf{v}_i = \lambda_i \mathbf{v}_i, this gives c1λ1v1+⋯+ckλkvk=0c_1 \lambda_1 \mathbf{v}_1 + \cdots + c_k \lambda_k \mathbf{v}_k = \mathbf{0}. Now multiply the original relation by λk\lambda_k and subtract it from this new equation; the terms with vk\mathbf{v}_k cancel exactly, leaving c1(λ1−λk)v1+⋯+ck−1(λk−1−λk)vk−1=0c_1(\lambda_1 - \lambda_k)\mathbf{v}_1 + \cdots + c_{k-1}(\lambda_{k-1} - \lambda_k)\mathbf{v}_{k-1} = \mathbf{0}.

By the induction hypothesis, v1,…,vk−1\mathbf{v}_1, \dots, \mathbf{v}_{k-1} are linearly independent, so every coefficient in this last relation must vanish: ci(λi−λk)=0c_i(\lambda_i - \lambda_k) = 0 for i<ki < k. Since the eigenvalues are pairwise distinct, λi−λk≠0\lambda_i - \lambda_k \neq 0, forcing ci=0c_i = 0 for all i<ki < k.

Substituting back into the original relation leaves ckvk=0c_k \mathbf{v}_k = \mathbf{0}; since vk≠0\mathbf{v}_k \neq \mathbf{0} by definition of eigenvector, ck=0c_k = 0 as well. Every coefficient is zero, contradicting our assumption that not all cic_i vanish. Hence no such dependence relation exists, and the eigenvectors are linearly independent.

If AA is a real n×nn \times n symmetric matrix, A⊤=AA^\top = A, then there is an orthogonal matrix QQ (meaning Q⊤Q=IQ^\top Q = I) and a real diagonal matrix Λ\Lambda such that A=QΛQ⊤A = Q \Lambda Q^\top. Equivalently, AA has nn real eigenvalues and an orthonormal basis of eigenvectors.

Why is it true?

Symmetric matrices show up constantly — covariance matrices, moments of inertia, Hessians of smooth functions — and this theorem guarantees you can always rotate to a coordinate frame where the matrix acts by pure independent scaling along perpendicular axes, with no shearing and no complex behaviour whatsoever.

Proof

We first record a lemma: every eigenvalue of a real symmetric matrix is real. If Av=λvA\mathbf{v} = \lambda \mathbf{v} with v≠0\mathbf{v} \neq \mathbf{0} possibly complex, consider v∗Av\mathbf{v}^{*}A\mathbf{v} where v∗\mathbf{v}^{*} is the conjugate transpose. Since AA is real and symmetric, v∗Av=(v∗Av)∗\mathbf{v}^{*}A\mathbf{v} = (\mathbf{v}^{*}A\mathbf{v})^{*}, so this quantity is real; but it also equals λ v∗v\lambda \, \mathbf{v}^{*}\mathbf{v}, and v∗v>0\mathbf{v}^{*}\mathbf{v} > 0 is a positive real number, forcing λ\lambda itself to be real.

We now prove the theorem by induction on nn. The case n=1n = 1 is trivial: any 1×11 \times 1 matrix is already diagonal, with Q=(1)Q = (1).

For the inductive step, assume the theorem holds for all real symmetric matrices of size n−1n - 1. Since AA is n×nn \times n real symmetric, by the lemma its characteristic polynomial has a real root λ1\lambda_1; choose a corresponding eigenvector and normalize it to a unit vector v1\mathbf{v}_1.

Let WW be the orthogonal complement of the line spanned by v1\mathbf{v}_1, an (n−1)(n-1)-dimensional subspace. We claim WW is invariant under AA: for any w∈W\mathbf{w} \in W (so w⊤v1=0\mathbf{w}^\top \mathbf{v}_1 = 0), we compute (Aw)⊤v1=w⊤A⊤v1=w⊤Av1=λ1w⊤v1=0(A\mathbf{w})^\top \mathbf{v}_1 = \mathbf{w}^\top A^\top \mathbf{v}_1 = \mathbf{w}^\top A \mathbf{v}_1 = \lambda_1 \mathbf{w}^\top \mathbf{v}_1 = 0, using symmetry of AA in the middle step. So AwA\mathbf{w} is again orthogonal to v1\mathbf{v}_1, i.e. Aw∈WA\mathbf{w} \in W.

Choose an orthonormal basis of WW; in this basis, the restriction of AA to WW is represented by an (n−1)×(n−1)(n-1) \times (n-1) matrix A′A', and A′A' is symmetric because AA is (restricting a symmetric bilinear form to a subspace, in an orthonormal basis, keeps it symmetric). By the induction hypothesis, A′A' has an orthonormal basis of eigenvectors v2,…,vn\mathbf{v}_2, \dots, \mathbf{v}_n inside WW, with real eigenvalues λ2,…,λn\lambda_2, \dots, \lambda_n; since WW is AA-invariant, these are also genuine eigenvectors of AA itself.

Collecting v1,v2,…,vn\mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n gives an orthonormal basis of Rn\mathbb{R}^n made entirely of eigenvectors of AA. Assembling them as the columns of a matrix QQ makes QQ orthogonal, and AQ=QΛAQ = Q\Lambda where Λ=diag(λ1,…,λn)\Lambda = \mathrm{diag}(\lambda_1, \dots, \lambda_n); since Q−1=Q⊤Q^{-1} = Q^\top for an orthogonal matrix, this rearranges exactly to A=QΛQ⊤A = Q \Lambda Q^\top, completing the induction.

UndergraduateReal-World Applications and Worked Examples

Eigenvalues and eigenvectors are the hidden variables behind vibration frequencies of bridges and buildings, the ranking algorithm behind web search, and the principal directions used to compress data.

Example: Natural frequencies of a two-mass spring system

Two equal masses mm slide on a frictionless line; each is tied to a wall by a spring of stiffness kk, and the two masses are also tied to each other by a third spring of stiffness kk. Find the natural frequencies of oscillation and describe the corresponding modes of vibration.

Solution

Newton's second law for displacements x1,x2x_1, x_2 gives mx¨1=−2kx1+kx2m\ddot{x}_1 = -2kx_1 + kx_2 and mx¨2=kx1−2kx2m\ddot{x}_2 = kx_1 - 2kx_2, i.e. mx¨=−Kxm\ddot{\mathbf{x}} = -K\mathbf{x} with matrix K=(2k−k−k2k)K = \begin{pmatrix} 2k & -k \\ -k & 2k \end{pmatrix}.

Seeking oscillatory solutions x(t)=vcos⁡(ωt)\mathbf{x}(t) = \mathbf{v}\cos(\omega t) turns the system into the eigenvalue problem Kv=mω2vK\mathbf{v} = m\omega^2 \mathbf{v}, so mω2m\omega^2 must be an eigenvalue of KK. The characteristic equation det⁡(K−μI)=(2k−μ)2−k2=0\det(K - \mu I) = (2k-\mu)^2 - k^2 = 0 gives μ=3k\mu = 3k or μ=k\mu = k.

For μ=3k\mu = 3k: (K−3kI)v=0(K - 3kI)\mathbf{v} = 0 gives −kv1−kv2=0-k v_1 - k v_2 = 0, i.e. v=(1,−1)\mathbf{v} = (1,-1) — the masses swing in opposite directions, and ω1=3k/m\omega_1 = \sqrt{3k/m}. For μ=k\mu = k: (K−kI)v=0(K - kI)\mathbf{v}=0 gives kv1−kv2=0k v_1 - k v_2 = 0, i.e. v=(1,1)\mathbf{v} = (1,1) — the masses swing together in phase, with ω2=k/m\omega_2 = \sqrt{k/m}.

So the two eigenvectors of KK are exactly the two normal modes of vibration, and their eigenvalues fix the two natural frequencies — precisely why this problem is, at heart, an eigenvalue problem.

Example: PageRank as a dominant eigenvector

A tiny web of three pages A,B,CA, B, C links as follows: AA links equally to BB and CC; BB links only to CC; CC links only to AA. Model a random surfer with a column-stochastic transition matrix and find the long-run fraction of time spent on each page.

Solution

The column-stochastic transition matrix (columns give outgoing link probabilities from each page) is P=(0010.5000.510)P = \begin{pmatrix} 0 & 0 & 1 \\ 0.5 & 0 & 0 \\ 0.5 & 1 & 0 \end{pmatrix} (rows/columns ordered A,B,CA,B,C). The steady-state ranking π\boldsymbol{\pi} is the eigenvector of PP for eigenvalue 11, satisfying Pπ=πP\boldsymbol{\pi} = \boldsymbol{\pi} and πA+πB+πC=1\pi_A + \pi_B + \pi_C = 1.

Writing out Pπ=πP\boldsymbol{\pi} = \boldsymbol{\pi}: πC=πA\pi_C = \pi_A, 0.5πA=πB0.5\pi_A = \pi_B, and 0.5πA+πB=πC0.5\pi_A + \pi_B = \pi_C. The first two equations already give πC=πA\pi_C = \pi_A and πB=0.5πA\pi_B = 0.5\pi_A; substituting into the third confirms 0.5πA+0.5πA=πA=πC0.5\pi_A + 0.5\pi_A = \pi_A = \pi_C, consistent.

Setting πA=x\pi_A = x gives πB=0.5x\pi_B = 0.5x, πC=x\pi_C = x, so the normalization x+0.5x+x=2.5x=1x + 0.5x + x = 2.5x = 1 gives x=0.4x = 0.4. The steady-state ranking is (πA,πB,πC)=(0.4,0.2,0.4)(\pi_A, \pi_B, \pi_C) = (0.4, 0.2, 0.4): pages AA and CC are equally and most "important", exactly as one expects since they link directly to each other in a tight cycle, while BB only receives traffic from AA.

This is precisely the idea behind PageRank: importance is not counted by counting links, but by finding the dominant eigenvector (eigenvalue 11) of the link-transition matrix, found in practice by repeatedly multiplying by PP (the power method), which always converges to the same principal eigenvector regardless of the starting guess.

What are the eigenvalues of A=(4123)A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}?

What is the key geometric property that distinguishes an eigenvector from an ordinary vector under a linear map AA?

In the PageRank model, why does the steady-state importance ranking of web pages correspond to an eigenvector?

Why is the matrix (1101)\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} not diagonalizable, even though it has a repeated eigenvalue λ=1\lambda = 1?

References

  1. Gilbert Strang (2016). Introduction to Linear Algebra
  2. Sheldon Axler (2015). Linear Algebra Done Right