Chapter 13

Eigenvectors & Eigenvalues

Most vectors change direction when you apply a transformation. But some special vectors just get scaled -- they stay on their own line. Those are eigenvectors.

We've spent many chapters looking at what transformations do to space. They stretch it, rotate it, shear it, collapse it. We've measured area change with determinants, tracked what survives with rank, and identified what gets destroyed with null spaces. But we haven't asked one of the most revealing questions: are there any vectors that a transformation doesn't knock off course?

It turns out that for most transformations, there are. A few special directions go in, get scaled up or down (or flipped), and come back out pointing the same way. These are eigenvectors, and the scaling factors are eigenvalues. They reveal the skeleton of a transformation -- the directions along which the transformation acts most simply.

Most vectors change direction

Consider the matrix:

A=[2101]A = \begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix}

This is a shear-stretch: it doubles the xx-component and adds the yy-component to it, while leaving yy alone. Let's apply it to several vectors and see what happens.

(0,1) -> (1,1) (1,1) -> (3,1) (1,2) -> (4,2) Most vectors change direction under A

The faint arrows are the original vectors; the bolder arrows show where they land after applying AA. Each one points in a different direction than it started. The transformation has knocked them off course.

The vector (0,1)(0, 1) pointed straight up but landed at (1,1)(1, 1) -- tilted to the right. The vector (1,1)(1, 1) was at 45 degrees but landed at (3,1)(3, 1) -- almost horizontal. The vector (1,2)(1, 2) was steep but landed at (4,2)(4, 2) -- much flatter. In every case, the direction shifted. That's what most transformations do to most vectors.

Eigenvectors stay on their line

Now look at the same transformation, but focus on two special directions. The vector (1,0)(1, 0) -- pointing along the xx-axis -- and the vector (1,1)(-1, 1).

Apply A=[2101]A = \begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix} to each:

A[10]=[20]=2[10]A \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \end{bmatrix} = 2 \begin{bmatrix} 1 \\ 0 \end{bmatrix}

A[11]=[11]=1[11]A \begin{bmatrix} -1 \\ 1 \end{bmatrix} = \begin{bmatrix} -1 \\ 1 \end{bmatrix} = 1 \begin{bmatrix} -1 \\ 1 \end{bmatrix}

The vector (1,0)(1, 0) got doubled in length but stayed on the xx-axis. The vector (1,1)(-1, 1) didn't change at all -- it came back as itself. Both stayed on their own lines. These are the eigenvectors of AA, with eigenvalues λ=2\lambda = 2 and λ=1\lambda = 1.

changed direction (1,0) -> (2,0) lambda = 2 (-1,1) -> (-1,1) lambda = 1 Eigenvectors stay on their purple lines

The purple vectors are eigenvectors. The vector (1,0)(1, 0) gets stretched to (2,0)(2, 0) -- doubled in length, same direction. The vector (1,1)(-1, 1) maps to itself -- unchanged. The gray vector (1,2)(1, 2) changes direction, like everything else. The faint purple lines show the eigenspaces: directions that the transformation preserves.

This is the core idea. While the transformation twists and shears most of the plane, there are preferred directions where its behavior is simple: just scaling. Finding those directions is what eigenvalue analysis is all about.

Eigenvalue = 2: pure scaling

Let's isolate what an eigenvalue means. Take an eigenvector v\vec{v} with eigenvalue λ=2\lambda = 2. When you apply the transformation, you get Av=2vA\vec{v} = 2\vec{v}. The output is exactly twice the input -- same direction, double the length.

v = (1, 1) Av = (2, 2) lambda = 2 x2 Same direction, twice the length

The faint arrow is the original eigenvector (1,1)(1, 1). The bold arrow is the result after applying the transformation: (2,2)(2, 2). It's exactly twice as long, pointing in exactly the same direction. The eigenvalue λ=2\lambda = 2 is just this scaling factor.

The eigenvalue is the answer to a simple question: "by how much does this vector get scaled?" If λ=2\lambda = 2, the vector doubles. If λ=3\lambda = 3, it triples. If λ=0.5\lambda = 0.5, it shrinks to half. The direction never changes -- that's what makes it an eigenvector.

Eigenvalue = negative: flip and scale

But eigenvalues don't have to be positive. What if λ=0.5\lambda = -0.5? The vector gets scaled by 0.5-0.5: it shrinks to half its length and flips to point the opposite direction. It's still an eigenvector -- it stays on the same line through the origin. It just ends up on the other side.

v = (2, 1) Av = (-1, -0.5) lambda = -0.5 flipped + shrunk Still on the same line -- reversed and halved

The faint arrow is the original eigenvector (2,1)(2, 1). The bold arrow is the result: (1,0.5)(-1, -0.5). It flipped direction and shrank to half its length. The eigenvalue λ=0.5\lambda = -0.5 captures both effects: the negative sign means "flip", the magnitude 0.50.5 means "shrink by half". The vector still lies on the same purple line through the origin.

Negative eigenvalues show up in reflections and certain rotational-like transformations. The key insight is the same: the vector stays on its line. Whether it gets stretched, shrunk, flipped, or any combination -- as long as it doesn't rotate off that line, it's an eigenvector.

The formal bit

An eigenvector of a matrix AA is a nonzero vector v\vec{v} such that:

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

The scalar λ\lambda is the corresponding eigenvalue. The equation says: applying AA to v\vec{v} has the same effect as multiplying v\vec{v} by a scalar. The transformation, which could do anything to space, acts on this particular direction as pure scaling.

To find eigenvalues, rearrange the equation:

Avλv=0A\vec{v} - \lambda\vec{v} = \vec{0}

(AλI)v=0(A - \lambda I)\vec{v} = \vec{0}

This says v\vec{v} is in the null space of (AλI)(A - \lambda I). For a nonzero v\vec{v} to exist, the matrix (AλI)(A - \lambda I) must be singular -- its determinant must be zero:

det(AλI)=0\det(A - \lambda I) = 0

This is the characteristic equation. For a 2×22 \times 2 matrix A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}:

det[aλbcdλ]=(aλ)(dλ)bc=0\det\begin{bmatrix} a - \lambda & b \\ c & d - \lambda \end{bmatrix} = (a - \lambda)(d - \lambda) - bc = 0

This expands to a quadratic in λ\lambda:

λ2(a+d)λ+(adbc)=0\lambda^2 - (a + d)\lambda + (ad - bc) = 0

The quantity (a+d)(a + d) is the trace (sum of the diagonal), and (adbc)(ad - bc) is the determinant. So the characteristic equation is:

λ2tr(A)λ+det(A)=0\lambda^2 - \text{tr}(A) \cdot \lambda + \det(A) = 0

Solve the quadratic, and you get the eigenvalues. Plug each eigenvalue back into (AλI)v=0(A - \lambda I)\vec{v} = \vec{0} to find the eigenvectors.

Let's verify with our matrix A=[2101]A = \begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix}. The trace is 2+1=32 + 1 = 3, and the determinant is (2)(1)(1)(0)=2(2)(1) - (1)(0) = 2:

λ23λ+2=0(λ2)(λ1)=0\lambda^2 - 3\lambda + 2 = 0 \quad \Rightarrow \quad (\lambda - 2)(\lambda - 1) = 0

So λ=2\lambda = 2 and λ=1\lambda = 1 -- exactly the eigenvalues we found geometrically.

Worked example: repeated transformations in animation

In animation and physics simulations, you often apply a transformation repeatedly. Each frame, you multiply by the same matrix. What happens after 10 frames? 100? The answer depends entirely on the eigenvectors and eigenvalues.

Consider a transformation that stretches along one direction and shrinks along another:

A=[2000.5]A = \begin{bmatrix} 2 & 0 \\ 0 & 0.5 \end{bmatrix}

This is a diagonal matrix, so the eigenvectors are obvious: (1,0)(1, 0) with λ=2\lambda = 2, and (0,1)(0, 1) with λ=0.5\lambda = 0.5.

Now start with an arbitrary vector, say (1,1)(1, 1). Apply AA repeatedly:

Application Result What's happening
A0vA^0 \vec{v} (1,1)(1, 1) Starting point
A1vA^1 \vec{v} (2,0.5)(2, 0.5) Stretched horizontally, shrunk vertically
A2vA^2 \vec{v} (4,0.25)(4, 0.25) More so
A3vA^3 \vec{v} (8,0.125)(8, 0.125) The xx-component dominates
A10vA^{10} \vec{v} (1024,0.001)(1024, 0.001) Almost purely horizontal

After many applications, the vector points almost entirely in the (1,0)(1, 0) direction -- the eigenvector with the largest eigenvalue. The component along the λ=0.5\lambda = 0.5 eigenvector shrinks exponentially (0.5n00.5^n \to 0), while the component along λ=2\lambda = 2 grows exponentially (2n2^n \to \infty).

This is why eigenvectors matter in practice. They're the stable directions of a repeated transformation. In a physics simulation, objects stretch along the dominant eigenvector over time. In a Markov chain, the system converges toward the eigenvector with eigenvalue 1. In Google's PageRank, the steady-state distribution of web traffic is the dominant eigenvector of the link matrix.

In code, computing this iteratively looks like:

function applyRepeated(matrix, vector, steps) {
  let v = [...vector];
  for (let i = 0; i < steps; i++) {
    v = [
      matrix[0][0] * v[0] + matrix[0][1] * v[1],
      matrix[1][0] * v[0] + matrix[1][1] * v[1]
    ];
  }
  return v;
}

const A = [[2, 0], [0, 0.5]];
applyRepeated(A, [1, 1], 10); // [1024, ~0.001]

After enough iterations, no matter what vector you started with (as long as it has some component in the dominant eigenvector direction), the result aligns with the eigenvector whose eigenvalue has the largest absolute value. The other directions fade away. That's the power of eigenvalue analysis -- it tells you the long-term behavior of a system without running the simulation.

Key Takeaway: Eigenvectors are the axes that survive a transformation -- they only get scaled, never rotated. Eigenvalues tell you how much they stretch. Finding them reveals the skeleton of any linear transformation: the directions where its behavior is simplest.

What's next

Eigenvectors point in directions that stay clean under a transformation. But what makes a set of vectors "clean" in general? When eigenvectors are perpendicular to each other, the math gets especially elegant -- decompositions become simple, and transformations factor into independent scalings along independent axes. That's orthogonality -- perpendicularity and its consequences.