Search

Search papers and lessons

Eigenvalues and Eigenvectors

Level 2 · 10 min read

An eigenvector is a direction that a matrix only stretches, never turns, and its eigenvalue is the stretch factor.

On this page

  • Colour = topic mix
  • Linear algebra
  • Discrete math
  • Sign in to see your progress

TL;DR

Most vectors change direction when a matrix acts on them. A few special vectors only get longer or shorter. Those are the eigenvectors, and the factor by which each one is stretched is its eigenvalue. Together they describe the matrix's action in the simplest possible terms: along each eigenvector, the matrix is just multiplication by a number.

To find them, you solve det⁡(A−λI)=0\det(A - \lambda I) = 0 for the eigenvalues λ\lambda, then solve (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0} for each eigenvector v\mathbf{v}.

Where you'll see it: in principal component analysis, which finds the directions of greatest variance in data, in the steady state of a Markov chain, and in the stability of repeated matrix updates such as iterative training or dynamical systems.

Intuition

Directions that do not turn

Apply a matrix to a vector (a Linear Transformation, computed by Matrix Multiplication) and you get a new vector, usually pointing somewhere else. Take the matrix

A=(2112).A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}.

Feed in (1,0)(1, 0) and you get (2,1)(2, 1). That output points in a different direction, so (1,0)(1, 0) is not special. Feed in (1,1)(1, 1) and you get (3,3)(3, 3). That is 33 times the input, pointing in exactly the same direction. So (1,1)(1, 1) is special: AA does nothing to its direction except stretch it by 33.

The same happens for (1,−1)(1, -1). Feeding it in gives (1,−1)(1, -1) itself, so AA stretches that direction by 11. Those two directions are the eigenvectors of AA, and 33 and 11 are their eigenvalues.

This matters because the matrix becomes easy to understand along these directions. Any vector can be split into a piece along (1,1)(1, 1) and a piece along (1,−1)(1, -1). Each piece is simply scaled. The complicated mixing that AA does in standard coordinates is just stretching along two axes that happen to be tilted.

flowchart LR
  V[Vector v] --> S[Split into eigen-directions]
  S --> E1[Scale piece along first eigenvector by its eigenvalue]
  S --> E2[Scale piece along second eigenvector by its eigenvalue]
  E1 --> R[Add the scaled pieces]
  E2 --> R
  R --> Out[Result A v]

Why it exists

Repeated operations are where eigenvectors earn their keep. Applying AA a hundred times to a generic vector gives a mess. But along an eigenvector, applying AA a hundred times just multiplies by λ100\lambda^{100}. If λ\lambda is larger than 1 in size, that direction grows. If it is smaller than 1, it shrinks toward zero. The eigenvalues tell you the long-run behaviour, and the eigenvectors tell you which directions drive it.

The math

Definition

Definition: Eigenvector and eigenvalue

Let AA be a square n×nn \times n matrix. A nonzero vector v\mathbf{v} is an eigenvector of AA with eigenvalue λ\lambda if

Av=λv.A\mathbf{v} = \lambda \mathbf{v}.

Here λ\lambda is a number, a scalar, and v\mathbf{v} must not be the zero vector. The zero vector satisfies the equation for every λ\lambda, so it is excluded.

Read the equation as: applying AA to v\mathbf{v} gives the same result as multiplying v\mathbf{v} by λ\lambda. The direction is preserved, and only the length changes, by a factor λ\lambda. If λ\lambda is negative, the direction flips. If λ=0\lambda = 0, the vector is squashed to zero, which means AA is not invertible.

Finding eigenvalues

Rewrite the equation as (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}, where II is the identity matrix. This homogeneous system has a nonzero solution v\mathbf{v} exactly when the matrix A−λIA - \lambda I is singular, meaning its Determinant is zero. So the eigenvalues are the roots of the characteristic equation

det⁡(A−λI)=0.\det(A - \lambda I) = 0.

For an n×nn \times n matrix this is a polynomial of degree nn in λ\lambda, so there are at most nn eigenvalues. Over the real numbers there may be fewer, as the tradeoffs section shows.

Finding eigenvectors

For each eigenvalue λ\lambda, solve (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}. The solutions form a subspace called the eigenspace. Any nonzero multiple of an eigenvector is also an eigenvector, so eigenvectors are usually reported up to scaling.

Two useful identities

For a square matrix AA with eigenvalues λ1,…,λn\lambda_1, \dots, \lambda_n, counted with multiplicity:

tr⁡(A)=∑iλi,det⁡(A)=∏iλi.\operatorname{tr}(A) = \sum_{i} \lambda_i, \qquad \det(A) = \prod_{i} \lambda_i.

Here tr⁡(A)\operatorname{tr}(A) is the trace, the sum of the diagonal entries of AA. These give a fast check on hand calculations.

Symmetric matrices

When AA is symmetric, meaning A⊤=AA^\top = A, all its eigenvalues are real, and eigenvectors for different eigenvalues are perpendicular. This is why symmetric matrices are so common in statistics and physics: covariance matrices are symmetric, and their eigenvectors give orthogonal directions of spread.

Worked examples

Example
Eigenvalues and eigenvectors of a 2 by 2 matrix

Let A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}.

  1. Form A−λI=(2−λ112−λ)A - \lambda I = \begin{pmatrix} 2 - \lambda & 1 \\ 1 & 2 - \lambda \end{pmatrix}.
  2. Compute the determinant: (2−λ)2−1=λ2−4λ+3(2 - \lambda)^2 - 1 = \lambda^2 - 4\lambda + 3.
  3. Set it to zero and factor: λ2−4λ+3=(λ−1)(λ−3)=0\lambda^2 - 4\lambda + 3 = (\lambda - 1)(\lambda - 3) = 0. So λ=1\lambda = 1 or λ=3\lambda = 3.
  4. For λ=3\lambda = 3: A−3I=(−111−1)A - 3I = \begin{pmatrix} -1 & 1 \\ 1 & -1 \end{pmatrix}. The equation −v1+v2=0-v_1 + v_2 = 0 gives v2=v1v_2 = v_1. An eigenvector is (1,1)(1, 1).
  5. Check: A(1,1)=(2+1,1+2)=(3,3)=3(1,1)A(1, 1) = (2 + 1, 1 + 2) = (3, 3) = 3(1, 1). Correct.
  6. For λ=1\lambda = 1: A−I=(1111)A - I = \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}. The equation v1+v2=0v_1 + v_2 = 0 gives v2=−v1v_2 = -v_1. An eigenvector is (1,−1)(1, -1).
  7. Check the identities: the trace is 2+2=4=1+32 + 2 = 4 = 1 + 3, and the determinant is 4−1=3=1⋅34 - 1 = 3 = 1 \cdot 3. Both match.

The matrix stretches (1,1)(1, 1) by 33 and (1,−1)(1, -1) by 11. Any other vector is a combination of these two directions, and AA acts on each piece separately.

Example
The steady state of a two-state Markov chain

A customer switches each month between two brands. Let PP be the matrix whose columns give the probabilities of moving from one brand to the other. Column 1 says brand 1 keeps 90% of its customers and loses 10%. Column 2 says brand 2 keeps 80% and loses 20%:

P=(0.90.20.10.8).P = \begin{pmatrix} 0.9 & 0.2 \\ 0.1 & 0.8 \end{pmatrix}.

Each column sums to 1, so the total market stays the same.

  1. Try v=(2,1)\mathbf{v} = (2, 1). Then Pv=(0.9⋅2+0.2⋅1,  0.1⋅2+0.8⋅1)=(2,1)P\mathbf{v} = (0.9 \cdot 2 + 0.2 \cdot 1, \; 0.1 \cdot 2 + 0.8 \cdot 1) = (2, 1).
  2. So v\mathbf{v} is an eigenvector with eigenvalue 11.
  3. The trace is 0.9+0.8=1.70.9 + 0.8 = 1.7, so the other eigenvalue is 1.7−1=0.71.7 - 1 = 0.7.
  4. Its eigenvector: P−0.7I=(0.20.20.10.1)P - 0.7I = \begin{pmatrix} 0.2 & 0.2 \\ 0.1 & 0.1 \end{pmatrix}, and 0.2v1+0.2v2=00.2 v_1 + 0.2 v_2 = 0 gives (1,−1)(1, -1).

Interpretation: the eigenvector for eigenvalue 11 is the steady state after normalising to a total of 1. It gives 23\tfrac{2}{3} of customers to brand 1 and 13\tfrac{1}{3} to brand 2. The other eigenvalue, 0.70.7, is less than 1 in size, so its contribution shrinks each month. Whatever the starting split, the market converges to 23\tfrac{2}{3} and 13\tfrac{1}{3}.

Tradeoffs and failure modes

SituationWhat goes wrongBetter choice
Real rotation, such as (0−110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}Characteristic equation λ2+1=0\lambda^2 + 1 = 0 has no real roots, so no real eigenvectorsWork over complex numbers, or use the singular value decomposition
Non-symmetric matrixEigenvectors may not be perpendicular, and some matrices lack a full set of themUse the SVD, which always exists
Repeated eigenvaluesThere may be fewer independent eigenvectors than the multiplicity suggestsCheck the eigenspace dimension directly
Large matricesSolving the characteristic polynomial is numerically unstableUse iterative methods such as power iteration or library routines
Mistaking scale for meaningEigenvectors are only defined up to scaling; sign and length are arbitraryNormalise to unit length and fix a sign convention

Eigenvalues of non-symmetric matrices can be very sensitive: a tiny change in the entries can move them a lot. Numerical libraries rarely use the characteristic polynomial; they use algorithms that work directly on the matrix.

History

The idea grew out of the study of rotating bodies. In the 1700s, Leonhard Euler showed that a rigid body spinning freely has three perpendicular axes, the principal axes, around which it turns without wobbling. Those axes are eigenvectors of the inertia matrix. In the 1820s, Augustin-Louis Cauchy showed that symmetric matrices have real eigenvalues.

The name is German. Around 1904, David Hilbert used "eigen", meaning own or characteristic, for these quantities, and the term stuck. Eigenvalue methods became central in quantum mechanics in the 1920s, where observable quantities correspond to eigenvalues of operators. In the late 1990s, PageRank used the dominant eigenvector of a web link matrix to rank pages, and principal component analysis has used the same tool for data analysis since the early 1900s.

Check yourself

QuestionWhat is the defining equation of an eigenvector and its eigenvalue, and why must the eigenvector be nonzero?Show answer

An eigenvector v\mathbf{v} with eigenvalue λ\lambda satisfies Av=λvA\mathbf{v} = \lambda\mathbf{v}. The zero vector satisfies this equation for every λ\lambda, so it would say nothing about the matrix. Requiring v≠0\mathbf{v} \neq \mathbf{0} keeps only the directions that AA preserves.

QuestionFind the eigenvalues of A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} and verify them with the trace and determinant.Show answer

The characteristic equation is (2−λ)2−1=0(2 - \lambda)^2 - 1 = 0, which factors as (λ−1)(λ−3)=0(\lambda - 1)(\lambda - 3) = 0. The eigenvalues are 11 and 33. The trace is 44, which equals 1+31 + 3. The determinant is 33, which equals 1⋅31 \cdot 3. Both checks pass.

QuestionWhy does the eigenvalue 0.70.7 in the Markov example shrink toward zero, while the eigenvalue 11 does not?Show answer

Repeated application multiplies the eigen-component by its eigenvalue each step. A component with eigenvalue 0.70.7 is multiplied by 0.70.7 each month, so it decays as 0.7t0.7^t. A component with eigenvalue 11 is multiplied by 11 each month and persists. Only the steady state survives in the long run.

QuestionA data scientist has a covariance matrix of measurements. What do its eigenvectors and eigenvalues tell them, and why is the matrix guaranteed to have real eigenvalues?Show answer

The eigenvectors give the principal directions of spread in the data, and the eigenvalues give the variance along each direction. The largest eigenvalue points to the direction of greatest variation. The covariance matrix is symmetric, and symmetric matrices always have real eigenvalues and perpendicular eigenvectors, so these directions form a clean set of orthogonal axes.

Sources