SCIENCE IN MOTION

Eigenvectors

drag the green and pink tips · scroll to zoom
space morph · ←→ morph step · R identity · P random · E eigen · G grid · H menu
λ Eigenvectors · Eduardo Correia

Eigenvector hunt

Most vectors are knocked off their line by a matrix. Only a few directions stay on their own line: there Av = λv. Turn v and find them. The chart on the right shows how far Av turns away from v: the eigenvectors are where the curve crosses zero (or ±180°, when λ is negative).

Level
0

Turn the vector

Angle from v to Av

For each direction θ of v (0° to 180° covers every line). Zero: Av points along v. ±180°: Av points the opposite way.

angle from v to Av your v found

Multiply again and again

Start with any vector and keep applying A. Each step multiplies the part along each eigenvector by its λ. The part with the biggest |λ| wins, so the direction converges to the dominant eigenvector. The speed depends on the ratio |λ₂/λ₁|. This is the power method, the idea behind PageRank.

—
estimate of λ₁ (Rayleigh quotient)

The iterates

Angle to the dominant eigenvector

Log scale. Yellow: measured. Dashed: the prediction |λ₂/λ₁|ᵏ.

Rayleigh quotient

r = x·Ax / x·x guesses λ from the current vector. The dashed line is the true λ₁.

click to release a particle · scroll to zoom

Trace–determinant map

Every 2×2 matrix is a point here. The white dot is yours. Click anywhere to jump.

Rabbits, sunflowers and a 2×2 matrix

Each Fibonacci number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8… Keep the last two numbers in a vector. Then one step of the sequence is one multiplication by a matrix, and step n is the matrix to the power n. Its eigenvalues say how fast the sequence grows: the golden ratio φ.

—

One step = one multiplication

Eigenvalues and the closed formula

The ratio of neighbors

x(n+1) / x(n) for each n. It zigzags around the biggest eigenvalue and closes in, because the other eigenvalue is smaller in size.

The vector (x(n), x(n+1)) in the plane

Each step is one multiplication. The points line up along the eigenvector of the biggest eigenvalue. The view zooms out to follow.

Squares and the spiral

click: page · drag page → page: link · double-click: delete

Visits vs. eigenvector

Pink: share of the surfer's visits so far. Yellow: the eigenvector of the Google matrix for λ = 1, by power iteration. They meet as the surfer keeps clicking.

Power iteration

The Google matrix G

Column j holds the chances of going from page j to each page. Every column adds up to 1. The ranking r is the vector that does not change: G r = 1 · r. It is an eigenvector with eigenvalue 1.

click: add · drag: move · double-click: delete · white handle: your direction

An image is a matrix

The singular value decomposition writes any matrix as a sum of simple layers σ1u1v1ᵀ + σ2u2v2ᵀ + …, biggest first. Each layer is a column times a row. Keep the first k layers and you get the best possible image of rank k. The σ are the square roots of the eigenvalues of AᵀA.

—
error (relative)

Original

What is missing

Original minus the rank-k image (×4). Gray is zero.

Singular values

Log scale. The error is the square root of the sum of the σ² that are left out. Click to choose k.

kept left out energy kept

The first layers

Layer i is σᵢ·uᵢ·vᵢᵀ: one column times one row. Yellow is positive, blue negative. Click one to keep up to it.

Compare with Fourier compression →

drag a mass sideways and let go

The normal modes

The eigenvectors of K. In a mode all masses move with the same frequency. Click one to play it alone.

Stiffness matrix

Newton: m x″ = −K x. Try x = v cos(ωt): then K v = m ω² v. So each eigenvalue gives a frequency ω = √(λ/m).

How much of each mode

Positions over time

One mode alone: clean waves. A mixture: beats and patterns that repeat only if the frequencies fit.

A plate has infinitely many modes. Their nodal lines are the Chladni figures →

1

A matrix moves the whole plane

A 2×2 matrix is a rule that moves every point of the plane. It keeps the origin fixed and keeps grid lines straight, parallel and evenly spaced. That is what linear means.

You only need to know where î = (1, 0) and ĵ = (0, 1) land: they are the two columns. Every other vector is a mix of î and ĵ, so it lands on the same mix of the columns.

2

“Eigen” means “own”

Most vectors are turned off their line. An eigenvector stays on its own line: the matrix only stretches it by a number λ, the eigenvalue. λ = 2 doubles it, λ = 0.5 halves it, λ = −1 flips it, λ = 0 squashes it to the origin. Eigen is German for “own”, the word David Hilbert used in 1904.

3

The characteristic polynomial

Av = λv means (A − λI)v = 0 for a vector v that is not zero. So A − λI squashes a direction, and its determinant (the area factor) is zero. For 2×2 this is a quadratic equation: the trace is λ₁ + λ₂ and the determinant is λ₁λ₂.

4

When no direction survives

If tr² < 4 det the roots are complex. A rotation turns every vector, so no real line stays put. The complex pair still tells the story: |λ| is the scaling and the angle of λ is the turn. If the two roots are equal, there can be a whole plane of eigenvectors (A = λI) or just one line, as in a shear. Then the matrix is called defective.

5

Symmetric matrices are special

If A = Aᵀ, the eigenvalues are real and the eigenvectors of different eigenvalues are perpendicular. Proof: λ₁(v₁·v₂) = Av₁·v₂ = v₁·Av₂ = λ₂(v₁·v₂), and λ₁ ≠ λ₂, so v₁·v₂ = 0. Covariance matrices (PCA) and stiffness matrices (springs) are symmetric.

6

Diagonalize, then powers are easy

In the basis of eigenvectors the matrix is just a list of stretches. Then Aᵏ only raises each λ to the power k. This explains the power method, the golden ratio in Fibonacci, and why dx/dt = Ax is solved by eλt along each eigenvector.

7

Where eigenvectors work

  • Google: the ranking of pages is the eigenvector of a giant Markov matrix for λ = 1.
  • Statistics: PCA finds the directions of biggest spread, the eigenvectors of the covariance matrix.
  • Images: the SVD keeps the few layers that carry most of the picture.
  • Vibrations: bridges, guitar strings and molecules vibrate in normal modes; the eigenvalues give the frequencies.
  • Quantum mechanics: Hψ = Eψ. The energy levels of an atom are the eigenvalues of an operator.
  • Growth: populations, Fibonacci and epidemics grow like the biggest eigenvalue to the power n.
🏆

Challenges

  1. Find a matrix with eigenvalues 3 and −1. Watch the flip.
  2. Make the unit square vanish (det = 0). What happens to one eigenvalue?
  3. Drag the tips until the two eigenvectors merge into one. What kind of matrix is it?
  4. Score 15 in the hunt at the hard level.
  5. In the power method, pick a matrix that needs more than 50 steps. What is |λ₂/λ₁|?
  6. Find a sequence with x(n) = a·x(n−1) + b·x(n−2) that repeats forever.
  7. Build a web where one page gets more than half of the rank. Then lower the damping.
  8. Which built-in image needs only 2 layers? Why?
  9. With 2 masses, make the two frequencies almost equal and watch the beats.
Eduardo Correia

About

Science in Motion is created and maintained by Eduardo Correia, sponsored by Apliant.

⌨️

Shortcuts

space play/pause · R reset · P random · ←→ step (morph, n, k) · E eigenvectors · G grid · A apply A again · 123 PCA views · H hide/show the menu