Skip to content
DeepForgeby svx
All articles
Linear Algebra8 min read · 1 interactive demo

Eigenvectors You Can See

Most arrows change direction when a matrix acts on them. A few stay on their own line — and those are the ones worth finding.

Stop thinking of a matrix as a table of numbers and start with what it does. A vector is a list of numbers, which you can picture as an arrow starting at the origin. A 2x2 matrix is a machine that takes in an arrow and returns a new arrow: it can stretch it, shrink it, turn it, or flip it. Feed the whole plane through the machine and the square grid warps into a parallelogram.

You can read the machine straight off its four numbers. The first column says where the arrow (1, 0) lands. The second column says where (0, 1) lands. Every other arrow is just a combination of those two.

Almost every arrow comes out pointing somewhere new. For a few special directions, the machine only resizes the arrow. It may get longer, shorter, or flip to the opposite side, but it stays on the same line through the origin.

Those directions are the eigenvectors, and the stretch factors are the eigenvalues. In symbols, A v = λ v. Here A is the matrix, v is an eigenvector (and never the zero arrow), and λ — the Greek letter lambda — is its eigenvalue. Read it in words: applying the matrix to v gives the same result as multiplying v by the single number λ. Along that one direction, an entire matrix collapses into one scale factor.

For a 2x2 matrix, the eigenvalues come out of the equation det(A − λI) = 0. Here I is the identity matrix, the do-nothing matrix with ones on the diagonal and zeros elsewhere, and det is the determinant, the number that says how much the matrix scales area. Why zero? Because A v = λ v can be rewritten as (A − λI) v = 0, which asks when the matrix A − λI crushes some nonzero arrow to nothing. That happens only when its determinant is zero.

Expanding the equation gives the quadratic λ² − tr(A)·λ + det(A) = 0. The trace tr(A) is the sum of the two diagonal entries. Two free sanity checks follow: the two eigenvalues always add up to the trace and multiply to the determinant. If your hand calculation fails either test, it is wrong. One more clue: if tr² − 4·det is negative, the eigenvalues are complex numbers. The matrix has no real eigendirection, which means it contains a rotation.

Eigenvectors are the skeleton of repeated multiplication. Write an arrow v as a mixture of eigenvectors, apply the matrix k times, and each eigenvector is simply multiplied by its eigenvalue k times: λ_i^k. As k grows, the largest-magnitude eigenvalue dominates. That is why power iteration — apply the matrix to a vector over and over — finds the dominant eigenvector, and why the same trick computes Google's PageRank.

The idea reaches everywhere. In statistics, the eigenvectors of a covariance matrix (a table that records how each feature moves with every other) are the principal components: the directions where the data spreads out most. In dynamic systems, an eigenvalue larger than 1 in size means growth and one smaller than 1 means decay.

The matrix as a transformation

Drag the tip of v (or focus the canvas and use the arrow keys) to hunt for an eigendirection. Dashed blue lines are the real eigendirections of A.

v
(1.60, 0.60)
Av
(3.80, 1.40)
angle
0.3°
Rayleigh
2.370
eigenvalues
2.37, 0.63

v is (nearly) an eigenvector: Av = 2.370 v. The arrows are parallel.

Drag the tip of the arrow labeled v and watch two arrows. The dark one is v. The warm one is A v, the result of feeding v through the matrix.

In general the two point in different directions. The angle between them measures how far v is from an eigendirection. Slide v until the arrows line up: you have found an eigenvector, and the ratio of their lengths is its eigenvalue.

The dashed lines mark the true eigendirections for the current matrix. The readout shows the Rayleigh quotient, (v·Av)/(v·v) — the best single-number estimate of the eigenvalue along your chosen direction. It always lies between the two true eigenvalues. The little dot in v·Av means multiply matching entries and add the products.

A two by two transform acting on a grid and on two vectorsTwo panels of the same unit grid. On the left, vector v sits on a true eigendirection, drawn as a dashed line through the origin, and vector w does not. On the right the grid is warped by the matrix: Av is longer but still lies on the dashed line, exactly lambda times v, while Aw has rotated off the direction of w.before · unit gridv on the dashed eigendirection, w off itafter · the same grid, warped by AA = [[2, 1], [0.5, 1]] · straight lines stay straightvwtrue eigendirectionrotatesAwrotatesAv stays on the dashed line — every other direction leaves its line.
A matrix warps the whole grid, but an eigenvector only stretches: A v stays on the same dashed line as v, while w visibly turns off its own.

When a matrix has two independent eigenvectors, we can switch to a coordinate system built from them: A = VΛV⁻¹. V has the eigenvectors as its columns, Λ (capital lambda) is a diagonal table holding the eigenvalues, and V⁻¹ is the inverse of V — the matrix that undoes V. In that basis, the matrix does nothing more than scale each axis separately, so powers and equations become easy.

Not every matrix cooperates. Repeated eigenvalues can leave only one eigendirection, creating a shear that no change of coordinates can flatten; those defective matrices are what the Jordan form describes. Symmetric matrices — ones that look the same when flipped across their diagonal — are always well behaved: their eigenvalues are real and their eigenvectors meet at right angles.

The practical habit is to look for eigenvectors before doing expensive work. If some direction is nearly unchanged, the leftover A v − λ v is tiny, and you have found real structure.

The problems below start by checking a claimed eigenpair, move through the 2x2 quadratic, and finish with power iteration, which finds the dominant eigenvector without ever writing down the characteristic equation.

Practice this

Open a problem and implement the idea from scratch. Progress saves to this browser.