SeeingML
Visual Math Toolkit Guide 4 of 6 · tap to switch
✦ Interactive Visual Guide 8 min · 4 hands-on labs · Beginner friendly

Eigenvalues and Eigenvectors

Spin a probe arrow to catch the rare directions that refuse to tilt under a matrix warp, and see why they power PCA and PageRank.

Picture spinning a classroom globe on your desk. Every city on the surface sweeps around in a wide circle, changing direction every split second. Every spot moves, except the straight metal rod running from the North Pole to the South Pole: as the entire globe spins, that axis rod stays pointing along the exact same line.

Matrix transformations work the same way. When a square matrix A stretches, squishes, or shears the 2D plane, almost every arrow gets knocked sideways off its starting line. Only a few rare directions behave like that globe rod: they stay glued to their own rail, changing only in length (or flipping straight backward along the same line).

The German word eigen simply means “own” or “characteristic”. A special non-zero arrow v that refuses to tilt off its own line is called an eigenvector. The number telling you how much it stretches, shrinks, or flips is its eigenvalue, which we nickname with the Greek letter λ (pronounced “lambda”, just a handy label for the stretch multiplier). For these special arrows, applying the matrix to produce the transformed arrow A · v does the exact same thing as multiplying v by one plain number: A · v = λ · v.

Spin your arrow v below and watch the transformed arrow A · v. Sweep the angle slider until A · v snaps cleanly onto v’s dashed rail to discover both hidden eigenvectors!

Interactive Lab 1: Hunt the Hidden Eigenvectors
Discovered: 0 / 2Tilted off rail by 19.1°
Your arrow (v)Transformed arrow (A·v)
xyLength 1 circleMatrix A = [[2, 1], [1, 2]]Your arrow (v) at 15°: [0.97, 0.26]Transformed arrow (A·v): [2.19, 1.48] (2.65× length)
Your arrow (v) angle
15° (length 1.00)
Transformed arrow (A·v) length
2.65×
Tilt away from rail
19.1°
15°
At 15°, matrix A knocks the transformed arrow (A·v) sideways by 19.1°, so this direction is not an eigenvector. Sweep the slider across the half-circle and watch that amber tilt wedge shrink to 0°.

Once you sweep the full half-circle, two angles snap cleanly onto the rail: at 45°, the transformed arrow A · v stretches to exact 3.0× length (λ₁ = 3) without tilting by even a fraction of a degree, and at 135°, A · v stays at exact 1.0× length (λ₂ = 1). Those two unchanged directions are this matrix’s eigenvectors, and 3 and 1 are its eigenvalues.


How to Interpret Eigenvalues and Eigenvectors Visually

Why do machine learning engineers care so much about a matrix’s stretch factors? Because deep neural networks and real-world simulations often apply the same matrix transformation many times in a row (5 steps, 20 steps, or 50 steps).

Whenever an arrow starts along an eigenvector, every single step simply multiplies its length by λ again. After k steps, the arrow scales by λ multiplied by itself k times (λᵏ). Click through all six behaviors below and step k from 1 to 5 to watch what repeated multiplication does in each case!

Interactive Lab 2: Watch Repeated Matrix Steps (k = 1 to 5)
λ = +1.5 (Grows outward)
Step 1: Choose how matrix A behaves on its eigenvector
Step 2: Apply matrix A repeatedly (k = 1 to 5)
-6-4-2+2+4+6Dashed gray: Starting arrow v (length 1.00)Solid colored: After step k = 1 (1.50×)
Step 1 (Growth): multiplying by +1.5 once scales the arrow to 1.51 = 1.50×. Click higher steps (up to k = 5) to watch the arrow explode outward faster on every pass!

Look at how completely the stretch factor λ decides the arrow’s fate over repeated steps:

  • Stretch (λ > 1): every step compounds outward (1.5 → 2.25 → 3.38 → 5.06 → 7.59). In deep networks, weights with stretch factors above 1 cause exploding gradients during Backpropagation.
  • Shrink (0 < λ < 1): every step cuts the arrow closer to zero (0.50 → 0.25 → 0.13 → 0.06 → 0.03), explaining vanishing gradients.
  • Steady (λ = 1): the arrow stays completely frozen at its exact starting length forever.
  • Flip (λ < 0): the minus sign reverses the arrow 180 degrees straight backward along its own line, so repeated steps bounce back and forth across zero (negative, positive, negative, positive). For example, λ = -2 flips the arrow backward along its own line and doubles its length.
  • Collapse (λ = 0): multiplying by zero crushes an entire direction onto the single point [0, 0], flattening space so that lost dimension can never be recovered (the matrix has no inverse).
  • Pure 90° Rotation (No Real λ): turning the whole plane by 90 degrees knocks every non-zero arrow off its original line, leaving zero real eigenvectors on the 2D plane.

Power Iteration: how Google PageRank finds the #1 Eigenvector

Imagine a million bored web surfers clicking random links across the internet forever: eventually, the crowd settles into a steady share of visitors on every page, and that steady crowd distribution is the web’s dominant eigenvector (Google’s PageRank).

With billions of web pages in the graph, you could never solve for that eigenvector by hand with pen-and-paper algebra. Instead, computers use a surprisingly simple shortcut called Power Iteration: pick almost any starting arrow, multiply it by the matrix A, and rescale the result back to length 1 (normalizing it so the numbers stay tidy). Then repeat!

Why does this work? Because every starting arrow is a blend of the matrix’s eigenvector directions. Each round multiplies every piece by its own stretch factor, so the eigenvector with the largest stretch magnitude (|λ₁|) compounds much faster and drowns out all smaller directions.

Click Multiply by A & Normalize six times below to watch an arrow starting way over at 125° swing step by step until it locks onto the dominant 45° eigenvector automatically!

Interactive Lab 3: Power Iteration (Finding the Top Eigenvector)
Step 0 / 6 · Angle 125.0° (target 45.0°)
Rescaled back to length 1 on every stepWeaker axis (135°, λ = 1)Dominant axis (45°, λ = 3)Step 0: 125.0°
Current arrow direction
125.0° [-0.57, 0.82]
Current stretch factor (λ)
1.06 (true top = 3.00)
Why the 45° axis wins
30 = 1× vs 10 = 1×
45° dominant axis share: 15%135° weaker axis share: 85%
Step 0 (Starting guess): our arrow starts way over at 125.0°, leaning heavily toward the weaker 135° axis (85% share) with a current stretch factor of just 1.06. Right now, no multiplication has happened yet (30 = 1× vs 10 = 1×). Click Multiply by A & Normalize to take Step 1!

The Spectral Theorem: why Eigenvectors literally ARE PCA

Before connecting eigenvectors to Principal Component Analysis (PCA), let us unpack three everyday ideas in plain English:

  • Variance (spread): how widely a single column of data spreads out around its average. Tightly bunched numbers have low variance; wide-ranging numbers have high variance.
  • Covariance (moving together): whether two columns tend to rise and fall together. Height and shoe size increase together (positive covariance), while unrelated measurements sit near zero.
  • Symmetric grid (matching mirror entries): when you place every feature pair’s covariance into a square table, you get the dataset’s covariance matrix (nicknamed with the capital Greek letter Σ, pronounced “Sigma”). Because “how Column 1 moves with Column 2” is identical to “how Column 2 moves with Column 1”, the table always has matching mirror-image entries across its main diagonal!
💡 Insight

Why symmetric tables are pure gold in ML: One of the most celebrated guarantees in mathematics, called the Spectral Theorem, proves that every real symmetric matrix has 100% real eigenvalues and perfectly perpendicular (90-degree) eigenvectors. No weird missing axes, and no tilted grids!

That single guarantee is why eigenvectors are PCA. The perpendicular eigenvectors of a dataset’s covariance matrix point straight along the data cloud’s natural axes: PC1 (the main spread direction) and PC2 (the secondary perpendicular direction). Even better, each eigenvalue equals the exact variance (spread) along its axis. For example, if λ₁ = 1.8 and λ₂ = 0.2, keeping only PC1 preserves 1.8 / (1.8 + 0.2) = 90% of the total spread!

Slide feature correlation ρ (pronounced “rho”, measuring how tightly two features move together from 0.00 for an unrelated round cloud up to 0.90 for a stretched diagonal cloud) below to watch the covariance table, the perpendicular axes, and the variance split respond live!

Interactive Lab 4: Covariance Eigenvectors = PCA's Spread Axes
Main axis (PC1) = 50% · Secondary (PC2) = 50%
Main spread axis (PC1)Secondary spread axis (PC2)
Feature 1Feature 290°Main spread axis (PC1)Secondary axis (PC2)
Symmetric Covariance Table (Σ)Mirror entries match
Feat 1
Feat 2
Feat 1
1.00
0.00
Feat 2
0.00
1.00
Spread Captured (Eigenvalues)Always 90° apart
Main spread axis (PC1)λ₁ = 1.00 (50%)
Secondary spread axis (PC2)λ₂ = 1.00 (50%)
0.00
Round cloud (ρ = 0.00): Feature 1 and Feature 2 move almost independently, so the points spread nearly equally in both perpendicular directions (PC1 holds 50%, PC2 holds 50%). You cannot safely drop the secondary axis here without throwing away almost half of your data! Slide correlation higher to see when PCA compression starts to pay off.
See Characteristic Equation, Determinant/Trace Identities & Spectral DecompositionThesis / Reference

1. The Characteristic Equation: Rewriting Av=λv\mathbf{A}\mathbf{v} = \lambda\mathbf{v} as (A−λI)v=0(\mathbf{A} - \lambda\mathbf{I})\mathbf{v} = \mathbf{0} shows a non-zero eigenvector exists if and only if A−λI\mathbf{A} - \lambda\mathbf{I} collapses space (singular):

det⁡(A−λI)=0\det(\mathbf{A} - \lambda\mathbf{I}) = 0

2. Trace & Determinant Shortcuts: For any n×nn \times n matrix with eigenvalues λ1,…,λn\lambda_1, \dots, \lambda_n, the sum equals the trace and the product equals the determinant: ∑iλi=tr⁡(A)\sum_i \lambda_i = \operatorname{tr}(\mathbf{A}) and ∏iλi=det⁡(A)\prod_i \lambda_i = \det(\mathbf{A}).

3. Spectral Decomposition (Symmetric Matrices): Every real symmetric matrix Σ=Σ⊤\mathbf{\Sigma} = \mathbf{\Sigma}^\top factorizes into an orthonormal eigenbasis Q\mathbf{Q} and diagonal eigenvalue matrix Λ\mathbf{\Lambda}:

Σ=Q Λ Q⊤=∑i=1dλi qiqi⊤\mathbf{\Sigma} = \mathbf{Q}\,\mathbf{\Lambda}\,\mathbf{Q}^\top = \sum_{i=1}^{d} \lambda_i\,\mathbf{q}_i \mathbf{q}_i^\top
See Eigendecomposition in NumPy (eig vs. eigh)Optional Code
python
import numpy as np

# Use eigh() for symmetric matrices (covariance, Hessians): faster & guaranteed real!
Sigma = np.array([[1.0, 0.8],
                [0.8, 1.0]])

eigenvalues, eigenvectors = np.linalg.eigh(Sigma)
# eigh sorts ascending; reverse so PC1 (largest variance) comes first:
idx = eigenvalues.argsort()[::-1]
print("Eigenvalues (PC1, PC2):", np.round(eigenvalues[idx], 2))  # [1.8, 0.2]
print("PC1 eigenvector:", np.round(eigenvectors[:, idx[0]], 2))  # [0.71, 0.71]

Shifting from Linear Algebra to Calculus: how models actually learn

Linear algebra (vectors, spaces, matrices, and eigenvectors) describes what a model computes during a forward pass. Now we need calculus to answer the second half of ML: which direction should I nudge every weight to push loss downhill?

Next up: Derivatives, Slopes & the Gradient.

✓ Self-Check

Quick Intuition Check

Four quick real-world scenarios. No scores, just test your intuition.

1

If arrow v is an eigenvector of matrix A with stretch factor (eigenvalue) λ = -2, what happens when you apply matrix A to v?

Pick an option first, or peek anytime
2

A 2D covariance matrix has eigenvalues λ₁ = 1.8 (along PC1) and λ₂ = 0.2 (along PC2). What share of the total data spread (variance) do you keep if you keep only PC1?

Pick an option first, or peek anytime
3

A pure 90-degree rotation matrix in 2D has two real perpendicular eigenvectors.

Pick an option first, or peek anytime
4

In Power Iteration, you start with almost any arrow, multiply by matrix A, and rescale back to length 1 over and over. Which direction does the arrow lock onto?

Pick an option first, or peek anytime
Quick Reference

Common Questions

What are eigenvalues and eigenvectors in plain English?
When a matrix stretches, squishes, or shears space, almost every arrow gets knocked off its original line. An eigenvector is a special direction that stays on its exact same span line after the transformation, and its eigenvalue is simply the factor by which that arrow gets stretched, shrunk, or flipped.
How do you find eigenvalues and eigenvectors step by step?
For a small matrix A, solve the characteristic equation det(A - lambda*I) = 0 to find each eigenvalue lambda, then substitute each lambda back into (A - lambda*I)v = 0 to solve for the eigenvector direction v. For large real-world matrices in ML (like PageRank or PCA), computers use fast iterative methods like Power Iteration or SVD.
What are Eigenvectors and Eigenvalues in plain English?
When a square matrix A warps space, most arrows change both length and direction. An Eigenvector is a special non-zero arrow whose direction stays completely unchanged (remaining on its own line), and its Eigenvalue (lambda) is simply the stretch, shrink, or flip factor along that line: A*v = lambda*v.
Why are Eigenvectors so important in Machine Learning?
They reveal a matrix's natural coordinate axes. In PCA, the eigenvectors of the data covariance matrix point along the directions of maximum spread, and their eigenvalues equal the exact variance captured along each axis. They also power Google PageRank, Spectral Clustering, and gradient stability analysis.
Does every 2x2 matrix have real eigenvectors?
No! A pure 90-degree rotation turns every non-zero arrow off its original line, so it has zero real eigenvectors (only complex ones). However, the Spectral Theorem guarantees that every real symmetric matrix (such as every ML covariance matrix) has purely real eigenvalues and perpendicular eigenvectors.
How is a zero eigenvalue connected to the Determinant?
The determinant of any square matrix equals the product of all its eigenvalues (det(A) = lambda_1 * lambda_2 * ... * lambda_n). Therefore, a matrix is singular (non-invertible, det = 0) if and only if at least one of its eigenvalues is 0.

Written & illustrated by Muhammad Aashir Irshad · Updated December 2026 · Free open-access reference

https://seeingml.com/learn/eigenvalues-and-eigenvectors/ Open GitHub issue Suggest an edit
Cite this guide in a paper, thesis, or course (BibTeX & APA)
BibTeX
@misc{irshad2026eigenvaluesandeigenvectors,
  author       = {Irshad, Muhammad Aashir},
  title        = {Eigenvalues and Eigenvectors: Interactive Visual Guide},
  howpublished = {SeeingML},
  year         = {2026},
  month        = {dec},
  url          = {https://seeingml.com/learn/eigenvalues-and-eigenvectors/},
  note         = {Interactive visual guide}
}
APA

Irshad, M. A. (2026). Eigenvalues and Eigenvectors: Interactive Visual Guide. SeeingML. https://seeingml.com/learn/eigenvalues-and-eigenvectors/