Reading and display settings

Appearance

System follows your operating system and keeps following it, even if you change it later. The header's sun, moon and monitor cycle the same three options.

Text size (%) 100%

Default. Scales every text size on the site, equations and tables included.

Reading width 70ch

How much text runs across one line of prose. Narrower is easier to track; wider fits more on screen.

Line spacing 1.6

The leading on body text. Taller leading helps a tired eye stay on the line.

Density

Padding and gaps around controls, cards, and tables — how much breathing room the layout leaves itself.

Motion

System follows your operating system. Reduced removes every transition on this site. Full keeps them on unless your system asks for less.

1

The question

One input direction survives, and it tells you a lot

The previous parts built up linear maps as things that move the plane, and they gave you the machinery to compute with them: columns, determinants, bases, change of basis. But knowing how to apply a matrix is not the same as understanding what it does. A matrix can shear, rotate, stretch and squash all at once, and the sheer number of entries hides the few simple motions it is really made of. The eigenvector question is the one that opens the machine up.

Here is the question in its plainest form. Take a matrix A and a vector v. Multiply v by A and look at the result Av. Usually Av points in some new direction, unrelated to where v was pointing. But sometimes the image lands on the very same line the original vector was on, and the only thing that changed is the length. Sometimes it lands on the opposite side of the origin, still on the same line. The directions where this happens are special, and so are the stretch factors that go with them. Almost everything useful about a matrix — whether iterating it settles or explodes, how a covariance matrix summarises data, why a rotation has no preferred axis in the plane — is decided by those directions and those numbers.

The plan is to find them three ways: geometrically by sweeping a vector around a circle and watching when it stops turning, algebraically by editing a matrix and solving for the stretch factors, and structurally by noticing how two simple numbers, the trace and the determinant, already know the answer.

💡 By the end of this part you'll see why some vectors pass through a matrix without changing direction, why those directions are found by solving Av = λv, and why the trace and determinant of a matrix are just the sum and product of those stretch factors in disguise.
2

Sweep a vector around the circle

Watch the image, not the matrix

Below, an input vector v of length one slides around the unit circle as you move the angle slider. The matrix A is fixed, and its image of the unit circle — the faint ellipse — is where the tip of Av travels. The solid arrow is the current image. For most angles, Av points along a different line than v: the map has rotated the input on top of stretching it.

To decide when the two arrows are parallel, use the 2D cross product, also called the determinant of the pair. The quantity vx(Av)y − vy(Av)x is twice the signed area of the parallelogram they span, and it is zero exactly when the arrows line up. As you sweep, the cross product wobbles and passes through zero at two opposite angles. Those are the invariant directions: the eigen-directions. The two dashed lines in the picture are those directions, drawn permanently; they brighten as v swings towards one of them, and the angle slider is the only control you need.

At the moment of alignment the report shows the stretch factor. Because v has length one, the factor is simply the signed length of Av, with the sign telling you whether the image stayed on the same side of the origin or flipped to the other. That signed number is the eigenvalue, written λ. Push the slider slowly through an alignment and watch it pass smoothly through the value, then leave it behind.

Rotate v around the unit circle. The dashed lines are the eigen-directions; they light up as v reaches them. The faint ellipse is the image of the circle.

The picture makes a point that the algebra will only confirm. The eigen-directions are a property of the map, not of any particular input vector. The lines stay put while v spins around them; they are the axes along which the map acts as a plain scaling. In the basis built from those two axes the matrix does nothing but stretch, and that is the subject of the next part.

Notice also what the ellipse is telling you. A map with two real eigen-directions stretches the circle into an ellipse whose principal axes are those two directions, and the two stretch factors are the half-lengths of those axes. That is why the ellipse and the eigen-directions carry the same information, and it is the seed of the singular-value picture that arrives later in the series. When you see an ellipse in one of these demos, you are looking at a map's whole attitude towards distance, written as a shape.

3

The eigenvalue equation

Turning the condition into algebra

The condition “the image lies on the same line as the input” is exactly the statement that Av is a multiple of v. Write that multiple as λ and you have the definition:

$$A\mathbf{v} = \lambda \mathbf{v}, \qquad \mathbf{v} \neq \mathbf{0}.$$

A nonzero vector satisfying this is an eigenvector, and the corresponding number λ is its eigenvalue. The zero vector is excluded for a boring but important reason: it satisfies the equation for every λ, so allowing it would make the definition useless. Only nonzero directions count.

How do you find the vectors that satisfy it? Rearrange to (A − λI)v = 0. This is a homogeneous system, and it always has the trivial solution v = 0. The interesting case is a nonzero solution, and a square system has a nonzero solution exactly when its matrix is singular, which happens exactly when its determinant is zero. So the eigenvalues are the numbers that make A − λI collapse, and they are the roots of the characteristic polynomial:

$$\det(A - \lambda I) = 0, \qquad \lambda^{2} - (\operatorname{tr}A)\,\lambda + \det A = 0.$$

For a two-by-two matrix this is an ordinary quadratic, so there are two eigenvalues counted with multiplicity. They may be two distinct real numbers, one repeated real number, or a complex-conjugate pair. Each real eigenvalue hands you an eigen-direction by solving (A − λI)v = 0 for a nonzero vector. A complex pair, as you will see, means the map has no real invariant direction at all.

The demo below is the same idea with the matrix in your hands. Edit any of the four entries, or snap it to a preset, and the two eigen-directions and their factors update. When the eigenvalues are real, the dashed lines show the directions that survive and the report lists each λ. When they are complex, no dashed line appears, because no real direction is left untouched; instead the report prints the pair a ± bi and recognises the map as a scaled rotation, with an angle and a scale you can read off the complex number itself.

Edit the matrix. Solid arrows are the eigen-directions that remain, labelled with their λ. A rotation preset shows the complex case, where no real direction survives.

Two of the presets are worth dwelling on because they correct a common expectation. The shear has eigenvalue 1 listed twice but only one eigen-direction: it fixes the horizontal axis pointwise, yet every other vector is tilted sideways, and there is no second independent direction that merely stretches. Repeated eigenvalues do not have to come with two independent eigenvectors. The rotation, by contrast, has an eigenvalue pair with zero real part and a nonzero imaginary part, and the plane simply turns; if you go looking for a real arrow that only changes length, you will not find one, because a quarter turn sends every direction to a perpendicular one.

4

Trace and determinant decide the story

Two numbers already know the eigenvalues

Before solving any quadratic, the trace and the determinant have already told you a great deal. Compare the coefficients of the characteristic polynomial with the roots. If the eigenvalues are λ₁ and λ₂, then

$$\lambda_1 + \lambda_2 = \operatorname{tr}A, \qquad \lambda_1 \lambda_2 = \det A.$$

Sum and product, nothing more. This is why the trace and determinant are called invariants of the map: they do not depend on which basis you happen to write the matrix in, because the eigenvalues do not either. Change basis and the four entries shuffle around, but those two combinations stay fixed, and so does the set of stretch factors. The quantity that decides everything is the discriminant of the quadratic,

$$\Delta = (\operatorname{tr}A)^2 - 4\det A, \qquad \text{equivalently} \qquad \tfrac{(\operatorname{tr}A)^2}{4} - \det A.$$

When Δ is positive there are two distinct real eigenvalues and two independent real eigen-directions. When Δ is zero the roots collide into one repeated real eigenvalue, and there may be one eigen-direction or two. When Δ is negative the roots are a complex-conjugate pair, there are no real eigen-directions, and the map contains a rotation. The demo builds a matrix from a trace slider and a determinant slider, so you can steer straight at each of those regimes.

Move the trace and determinant sliders. Real eigenvalues draw their two lines; a complex pair instead draws the image of the unit circle and reports the rotation and scale.

Reading the sign of the determinant as orientation from the determinant part pays off here. A negative determinant means the two real eigenvalues have opposite signs, so one direction is stretched and the other is flipped and shrunk; that is a saddle, and it is why negative determinants felt like a reflection. A positive determinant with a large trace means both eigenvalues are large and positive and the map inflates every direction; small trace with the same determinant means a complex pair that spirals. The trace and determinant are not just bookkeeping — they are a map from two numbers to a qualitative behaviour, and the eigenvalues are where that behaviour is stored.

5

The whole field at once

A swirl with two quiet lanes

One vector at a time is precise, but it hides the global pattern. The field below drops a ring of input vectors, each seeded so a reload draws exactly the same picture, and shows every input in pale ink next to its image in colour. The thin segments connect each vector to its image, so the pattern of motion is visible all at once. Almost every arrow has swung to a new direction and changed length; the field has a visible swirl. If you trace the motion carefully, two lanes cut through it where the arrows do not rotate at all, only grow or shrink along their own line. Those lanes are the eigen-directions, and they are the same two lines no matter how you spin the input ring.

Spin the ring with the slider and watch the images swirl around the fixed lanes. The input vectors all rotate together, but the invariant directions stay exactly where they were, because they belong to the map and not to the inputs. Change the ring radius and the arrows change length, but the lanes do not move. That invariance under everything you do to the inputs is the whole idea: an eigenvector is not a lucky vector that happens to line up, it is a direction the map has singled out.

A seeded ring of inputs. Pale arrows are v, coloured arrows are Av; the faint lines are the eigen-directions.

This is the picture to keep in your head. A matrix is a swirl plus a small set of fixed lanes; the swirl is what you see when you throw a generic vector at it, and the lanes are what the matrix is really about. When the eigenvalues are complex the lanes disappear entirely and the swirl becomes a rotation with no axis, which in the plane is the honest answer: a genuine rotation has no real direction it preserves, and you have to go into the complex numbers to name its eigenvalues. That contrast, real axes versus no axes, is the geometric content of the discriminant.

6

Where this shows up

One idea, two worlds

Robotics & dynamics

Principal axes and modes

A rigid body has a set of principal axes: spin it about one of those axes and it keeps rotating about that direction instead of wobbling, and the eigenvalues of its inertia tensor are the moments of inertia about them. The same idea governs the modes of a linearised system near an equilibrium — the eigenvectors are the shapes of motion and the eigenvalues decide whether a mode decays or grows. The 3D rotations part of the optimization guide uses these axes when it converts between rotation representations.

ML / AI

The dominant directions of data

A covariance matrix is symmetric, and its top eigenvector is the direction along which a dataset varies the most — the first principal component. Keeping only the largest eigenvalues compresses a point cloud while losing the least information, which is exactly the story of Part 17 on low-rank approximation and PCA. The same handedness turns up in the weight matrices of a network: the architecture chapter shows the matrices, and their dominant singular directions are what training slowly shapes.

Further reading

7

Check your understanding

0/4 answered