Foundations

Eigenvalues & eigenvectors, visualized

Most vectors get knocked off course when a matrix acts on them — rotated and stretched. But a few special directions, the eigenvectors, only get stretched, never turned. The amount each one is stretched is its eigenvalue. Together they are the natural axes of a transformation.

This one idea powers Principal Component Analysis, PageRank, the stability of dynamical systems, and the curvature of loss surfaces. Drag the matrix entries and the dashed arrows show the eigenvectors — the directions the matrix leaves pointing the same way.

Drag the matrix entries

Determinant (area scale)

det = 3

area grows by this factor

Eigenvalues

3, 1

dashed arrows = directions only stretched, never rotated

Free · runs entirely in your browser · nothing to install

How to use it

  1. Drag the four matrix entries and watch the blue unit square get stretched, sheared, or flipped.
  2. Follow the dashed amber arrows — those are the eigenvectors, the directions that never rotate.
  3. Read the eigenvalues: each one is how much its eigenvector gets stretched (negative means flipped).

What you'll take away

  • What makes a direction an 'eigenvector' — it's only scaled, not rotated.
  • How the eigenvalue is the stretch factor along that direction.
  • Why symmetric matrices give perpendicular eigenvectors — the fact PCA relies on.

Want to actually build this?

This demo is one moment inside a full Math to Machine lesson — predict, build, and explain the concept, with an AI tutor that gives hints, not answers. The first five lessons are free.

FAQ

What is an eigenvector in simple terms?
It's a direction that a matrix only stretches or shrinks, without rotating it. Multiplying the matrix by that vector gives back the same vector scaled by a number — the eigenvalue.
What are eigenvalues used for in machine learning?
They are central to PCA, where the eigenvectors of the data's covariance matrix are the principal directions and the eigenvalues are the variance captured along each — letting you compress data while keeping the most information.

More Foundations tools