Linear algebra · foundations Section 1.1 · item 8 of 16

Eigenvalues &
eigenvectors

A matrix takes vectors and moves them somewhere else. Almost every vector comes out pointing in a new direction. A very small number don't — they come out on exactly the same line, merely stretched. Those are the eigenvectors, and how much they stretch is the eigenvalue.

It sounds like a curiosity. It turns out to be the reason a spinning object is stable about two of its axes and not the third, the reason a control loop converges or explodes, and the reason a structure has resonant frequencies.

The whole definition

Av = λv

Applying the matrix does the same thing as multiplying by a single number. Direction preserved, magnitude scaled. Everything else follows from this one line.

Find the directions that survive

Drag the grey vector and watch where the matrix sends it. Almost everywhere, input and output point different ways. Hunt for the alignment — when the two arrows lie on one line, you've found an eigenvector. The amber lines mark where they are.

v Av eigenvector directions
1.50
0.50
1.00
1.00
The matrix
1.500.50 1.001.00
λ₁
λ₂
trace = λ₁+λ₂ · det = λ₁λ₂
01The idea

Directions the matrix doesn't turn

A matrix mixes coordinates together, so the output generally points somewhere unrelated to the input. Eigenvectors are the exceptions — the axes along which the transformation is nothing more complicated than multiplication by a number.

λ > 1

Stretched along that direction. Repeated application grows without bound.

0 < λ < 1

Shrunk. Repeated application collapses toward the origin.

λ < 0

Flipped through the origin and scaled. Still the same line, which is what matters.

Two facts worth internalizing early

λ = 0 means the matrix is singular. There's a direction that gets crushed to nothing, so the transformation destroys information and cannot be undone. The null space is the eigenspace for λ = 0.

Eigenvectors are directions, not vectors. If v is an eigenvector then so is 2v and −v. Libraries return unit-length ones by convention, but the sign is arbitrary — and code that depends on which sign you got will work until it suddenly doesn't.

Two shortcuts that hold in any dimension

trace(A) = ∑ λi
det(A) = ∏ λi

Sum of the diagonal equals sum of eigenvalues; determinant equals their product. In 2×2 that's enough to solve for both eigenvalues in your head, and in any dimension it's a free sanity check on a numerical result.

02Finding them

On paper, and why not in code

The characteristic equation

Rearrange Av = λv into (A − λI)v = 0. For a non-zero v to exist, that matrix must be singular:

det(AλI) = 0

A polynomial of degree n. Its roots are the eigenvalues; substitute each back and solve for the null space to get the eigenvectors.

The 2×2 case, by hand

λ² − Tλ + D = 0   (T = trace, D = det)
λ = T ± √(T² − 4D)2

The discriminant T² − 4D decides everything: positive gives two real eigenvalues, zero gives a repeated one, negative gives a complex conjugate pair and no real eigenvector at all.

Never compute eigenvalues this way numerically. Forming the characteristic polynomial and root-finding is catastrophically ill-conditioned — tiny coefficient errors produce wildly wrong roots, and the effect gets worse with size. Real implementations use the QR algorithm, which never constructs the polynomial at all. This is one of the sharpest divides between how a subject is taught and how it is computed; see section 12.
03Complex

When there is no direction that survives

Press "pure rotation" in the hero. The eigenvector lines vanish, because a rotation genuinely turns every vector — there is no real direction it leaves alone. The eigenvalues become a complex conjugate pair, and that is the algebra telling you the transformation rotates.

Reading a complex pair

λ = σ ± jω
σ
The real part. Growth or decay rate — how fast the spiral opens out or winds in.
ω
The imaginary part. Angular frequency — how fast it goes around.
|λ|
The magnitude. For a discrete-time system this is what decides stability.

Why they come in pairs

A real matrix has a real characteristic polynomial, and complex roots of real polynomials always appear as conjugates. So complex eigenvalues arrive two at a time, and the corresponding real motion is a spiral rather than two separate behaviours.

This is the origin of oscillation. Anything in a robot that rings — a flexible joint, a lightly damped arm, an under-damped control loop — has a complex eigenvalue pair, and the ringing frequency is its imaginary part. Section 07 turns that into numbers you can act on.
04Symmetric

The case that behaves perfectly

Symmetric matrices — where A = Aᵀ — are enormously better behaved than general ones. This matters more in robotics than almost anywhere, because inertia tensors, covariance matrices, stiffness matrices and Gram matrices are all symmetric.

The spectral theorem

For any real symmetric matrix:

  • All eigenvalues are real — no complex pairs, ever.
  • Eigenvectors for distinct eigenvalues are orthogonal.
  • There is always a full orthonormal basis of eigenvectors, even with repeated eigenvalues.
  • So A = QΛQᵀ with Q orthogonal — and Q⁻¹ = Qᵀ, which is free.

Read geometrically: a symmetric matrix is a pure scaling along a set of perpendicular axes. No rotation, no shear, no funny business. Find the axes and the transformation becomes trivial.

Definiteness from the spectrum

all λ > 0
Positive definite. Inertia tensors and covariance matrices of non-degenerate data. Energy is always positive.
all λ ≥ 0
Positive semi-definite. A degenerate direction exists — rank-deficient covariance, for instance.
mixed signs
Indefinite. In an optimization Hessian this means a saddle point.
all λ < 0
Negative definite. A maximum.

Symmetric matrices you meet constantly

  • Inertia tensor — eigenvectors are the principal axes (section 08)
  • Covariance — eigenvectors are the uncertainty ellipsoid axes; this is PCA
  • Stiffness and mass matrices — eigenvectors are vibration modes (section 09)
  • Hessians — eigenvalues give the local curvature in each direction
  • JJᵀ — eigenvectors are the manipulability ellipsoid axes
  • Graph Laplacians — the spectrum encodes connectivity
05Diagonalizing

Change basis and the problem falls apart

A = PDP−1

Put the eigenvectors in the columns of P and the eigenvalues on the diagonal of D. This says: change into the eigenbasis, scale each axis independently, change back. A complicated coupled transformation becomes a list of independent one-dimensional ones.

What it buys you

Ak = PDkP−1

Raising a matrix to a power becomes raising numbers to a power. That is why the long-run behaviour of a repeated linear process is dominated entirely by its largest eigenvalue — every other mode decays relative to it.

eAt = P eDt P−1

When it fails

Not every matrix is diagonalizable. If an eigenvalue is repeated but doesn't supply enough independent eigenvectors, the matrix is defective — press "defective" in the hero and note that both eigenvector lines collapse onto one.

Such matrices need the Jordan form instead. In practice they're a measure-zero set that numerical noise perturbs away from, but near-defective matrices are genuinely badly conditioned and the computed eigenvectors become unreliable.

"Work in the eigenbasis" is the recurring move. Modal analysis decouples a vibrating structure into independent oscillators. Principal axes decouple rotational dynamics. PCA decorrelates data. Diagonalizing a controller's state matrix separates the modes. In every case the same trick: find the basis where the coupling disappears, solve the easy problem, transform back.
06Stability

Whether a system converges or explodes

For a linear system ẋ = Ax, the solution is x(t) = eAtx(0). Diagonalize and the state decomposes into independent modes, each evolving as eλt. Stability is then entirely a question about where the eigenvalues sit.

drag the point · trace–determinant plane
the resulting phase portrait
eigenvalues
trace / det
classification

Continuous time · ẋ = Ax

all Re(λ) < 0
Asymptotically stable. Every mode decays. The system returns to equilibrium.
any Re(λ) > 0
Unstable. One growing mode is enough; it will eventually dominate everything.
Re(λ) = 0
Marginally stable. Undamped oscillation. Any modelling error decides which way it actually goes.

Discrete time · xk+1 = Axk

all |λ| < 1
Stable. The unit circle replaces the left half plane.
any |λ| > 1
Unstable. Grows geometrically.
spectral radius
max |λ| — the single number that decides it, and the convergence rate of every iterative method too.

Every digital controller lives here. A design that's stable in continuous time can be unstable once discretized at too low a rate.

This is what pole placement actually is. Closing a loop with state feedback u = −Kx changes the dynamics matrix to A − BK, and choosing K is choosing where that matrix's eigenvalues sit. "Place the poles at −5 ± 3j" means: pick a gain matrix whose closed-loop eigenvalues are exactly there. Poles are eigenvalues; the two vocabularies describe the same objects.
07Damping

Reading response quality off the eigenvalues

For a complex pair λ = −ζωn ± jωn√(1−ζ²), the position in the plane translates directly into the behaviour you'll see on a plot.

QuantityFrom the eigenvalueWhat it tells you
natural frequency ωn|λ| — distance from the originHow fast the system fundamentally is
damping ratio ζ−Re(λ) / |λ| — cosine of the angle from the negative real axisHow much it oscillates
damped frequency ωd|Im(λ)|The ringing frequency you actually observe
settling time (2%)≈ 4 / |Re(λ)|How long until it's finished
overshootexp(−πζ / √(1−ζ²))How far past the target it goes

ζ < 1 · underdamped

Overshoots and rings. ζ ≈ 0.7 is the usual target — fast, with about 5% overshoot.

ζ = 1 · critically damped

Fastest approach with no overshoot. Repeated real eigenvalue.

ζ > 1 · overdamped

Two distinct real eigenvalues, no oscillation, and sluggish — the slower pole dominates.

Angle from the negative real axis is the quantity to develop a feel for. Straight along that axis is critically damped. Rotating toward the imaginary axis reduces damping and increases ringing. Crossing it means the real part turns positive and the system is unstable. When someone sketches a wedge on the complex plane and says "keep the poles in here", that wedge is a damping-ratio constraint.
08Principal axes

The inertia tensor, diagonalized

Rotational inertia isn't a number, it's a symmetric 3×3 tensor — a body resists rotation differently about different axes, and in general spinning about one axis produces torque about another. The eigenvectors are the axes where that coupling disappears.

What the decomposition says

Eigenvectors = principal axes. Three mutually perpendicular directions, guaranteed orthogonal because the tensor is symmetric. Spin about one of them and the angular momentum is parallel to the angular velocity — no wobble, no gyroscopic coupling.

Eigenvalues = principal moments of inertia. In principal-axis coordinates the tensor is diagonal and Euler's equations decouple into three much simpler ones. This is why every rigid-body dynamics implementation wants inertia expressed in the principal frame.

Practically, this is a modelling step you'll actually perform. A CAD tool gives you an inertia tensor about some arbitrary frame with non-zero off-diagonal products of inertia. Diagonalize it and you get the principal moments plus the rotation into the principal frame — which is exactly what a URDF inertial block or a physics engine wants.

An inertia tensor with all three eigenvalues equal — a sphere, a cube — has no distinguished axes at all. Every direction is principal, and the eigenvector decomposition is genuinely ambiguous. Numerically this shows up as eigenvectors that jump around between runs, which is correct behaviour rather than a bug.

The intermediate axis theorem

Order the three principal moments I₁ < I₂ < I₃. Spinning about the smallest-moment axis is stable. Spinning about the largest-moment axis is stable. Spinning about the intermediate axis is unstable — the smallest perturbation grows and the body tumbles, flipping periodically.

Throw a book or a tennis racket spinning about its intermediate axis and it will flip. Cosmonaut Vladimir Dzhanibekov observed the effect on a wing nut in orbit and it carries his name. The proof is a linear stability analysis of Euler's equations — the intermediate axis gives one positive eigenvalue, and section 06 already told you what that means. It's also a genuine hazard for satellite and free-flying robot attitude control.

09Vibration

Mode shapes and natural frequencies

An undamped structure obeys Mq̈ + Kq = 0. Look for solutions where every point moves in phase at one frequency, q = φ ejωt, and you get a generalized eigenvalue problem.

Kφ = ω² Mφ

Mode 1

frequency ratio ω / ω₁
mode shape φ

Three equal masses, four equal springs, ends fixed. The eigenvalues and eigenvectors below are computed live by the Jacobi method — the exact shapes are (1, √2, 1), (1, 0, −1) and (1, −√2, 1).

Eigenvectors of M⁻¹K · click a mode to see it move

What the decomposition gives you

  • Eigenvalues are ω² — the squared natural frequencies. Where the structure will resonate.
  • Eigenvectors are mode shapes — the relative deflection pattern at that frequency.
  • Modes are orthogonal (with respect to M), so they don't exchange energy. Each behaves as an independent single-degree-of-freedom oscillator.
  • Any motion is a superposition of modes. Press "a real disturbance" to see all three at once — which is what you actually observe.
This is the ceiling on your control bandwidth. Push a closed loop toward the first structural resonance and the controller starts exciting the mode it is trying to reject. The standard consequence: your control bandwidth must sit comfortably below the first natural frequency, and no amount of gain tuning gets around it. If you need more bandwidth, you need a stiffer or lighter structure — a mechanical fix to a control problem.
Resonance is what happens when you excite one deliberately. Force a structure near a natural frequency and the response is limited only by damping, which in a stiff metal structure is very small. A trajectory whose acceleration profile contains energy at a mode frequency will make the arm ring — which is exactly why S-curve and jerk-limited profiles exist.
10vs SVD

Eigenvalues are not singular values

These get conflated constantly. They coincide in one important case and differ everywhere else.

EigendecompositionSVD
applies toSquare matrices only, and not all of themAny matrix, including rectangular
always existsNo — defective matrices have no full setYes, always
givesA = PDP⁻¹, P generally not orthogonalA = UΣVᵀ, both U and V orthogonal
values can beNegative or complexAlways real and non-negative
relationshipSingular values of A are the square roots of the eigenvalues of AᵀA
coincide whenA is symmetric positive definite — then σᵢ = λᵢ exactly

Manipulability

The Jacobian J is rectangular, so it has no eigenvalues. Its singular values are what you want: they're the semi-axis lengths of the manipulability ellipsoid, describing how easily the end effector can move in each direction.

A singular value approaching zero is a singularity — a direction the arm cannot move in at all. Equivalently, the eigenvalues of JJᵀ approach zero, which is the same statement squared.

Condition number

κ = σmax / σmin

The ratio of the ellipsoid's longest to shortest axis. Large κ means near-singular: inverting amplifies error by roughly that factor. This is the number behind ill-conditioned Jacobians producing enormous joint velocities, and behind damped least squares existing at all.

11Elsewhere

The same decomposition, other names

WhereThe matrixWhat the eigen-decomposition means
PCACovariance of the dataEigenvectors are the principal components; eigenvalues are the variance along each. Keep the largest few
Kalman filteringState covariance PEigenvectors are the uncertainty ellipsoid axes — which directions you're least sure about
OptimizationHessianEigenvalues are curvature per direction. Their ratio is the condition number that sets gradient descent's speed
Point cloudsLocal scatter matrixSmallest eigenvector is the surface normal; the eigenvalue spread distinguishes planes from edges from clutter
PageRankLink transition matrixThe ranking is the dominant eigenvector, found by power iteration
Markov chainsTransition matrixStationary distribution is the eigenvector for λ = 1; the second eigenvalue sets the mixing rate
Spectral clusteringGraph LaplacianEigenvectors of the smallest non-zero eigenvalues reveal the cluster structure
Vibration testingMeasured FRFExperimental modal analysis recovers mode shapes and frequencies from real hardware
The unifying reading: whenever a matrix describes how something spreads, transforms or evolves, the eigenvectors are the independent directions and the eigenvalues are what happens along each. Variance for covariance, curvature for a Hessian, growth rate for a dynamics matrix, frequency for a stiffness matrix. Different units, identical mathematics.
12Computing

How it's actually done

import numpy as np

# general square matrix — eigenvalues may be complex
w, V = np.linalg.eig(A)             # columns of V are the eigenvectors

# SYMMETRIC matrix — always use this instead. faster, and guarantees
# real eigenvalues and orthogonal eigenvectors instead of near-misses
w, V = np.linalg.eigh(I_tensor)     # ascending order

# eigenvalues only, when you don't need the vectors
w = np.linalg.eigvalsh(P)

# generalized problem: K φ = ω² M φ  (vibration modes)
from scipy.linalg import eigh
w2, phi = eigh(K, M)
omega_n = np.sqrt(w2)

# stability check for xdot = Ax
stable = np.all(np.real(np.linalg.eigvals(A)) < 0)

# discrete: spectral radius under 1
stable_d = np.max(np.abs(np.linalg.eigvals(Ad))) < 1

# principal axes from a CAD inertia tensor
I_principal, R = np.linalg.eigh(I_tensor)   # R rotates body → principal frame

# manipulability: Jacobian is rectangular, so use SVD not eig
U, s, Vt = np.linalg.svd(J)
condition = s[0] / s[-1]              # blows up near a singularity

The algorithms underneath

QR algorithm
The general workhorse. Repeatedly factor and recombine until the matrix goes triangular; the diagonal is then the spectrum. Never touches the characteristic polynomial.
Jacobi
For symmetric matrices — rotate away the largest off-diagonal entry, repeat. Simple, accurate, and what the vibration demo above runs.
Power iteration
Multiply by A and normalize, repeatedly. Converges to the dominant eigenvector at a rate set by |λ₂/λ₁|. Underlies PageRank.
Lanczos / Arnoldi
For very large sparse matrices where you only want a handful of extreme eigenvalues.
Use eigh whenever the matrix is symmetric. Passing an inertia tensor or a covariance to the general routine wastes time and returns eigenvectors that are only approximately orthogonal and eigenvalues with tiny spurious imaginary parts. Downstream code that assumes real, orthogonal results then fails intermittently on the cases where floating point happened to be unkind.
Eigenvalues can be well-conditioned while eigenvectors are not. When two eigenvalues are nearly equal, the plane they span is well determined but the individual vectors inside it are almost arbitrary — a tiny perturbation swings them around. If your algorithm depends on a specific eigenvector rather than the subspace, check the eigenvalue gap first.
13Practice

Drills

#Do thisYou'll know it when
1Compute 2×2 eigenvalues by hand using trace and determinantYou can classify a system's behaviour without a computer
2Find the eigenvectors for each and verify Av = λvThe definition is muscle memory
3Construct a matrix with complex eigenvalues and one that's defectiveYou know what breaks diagonalization
4Diagonalize a symmetric matrix and confirm the eigenvectors are orthogonalThe spectral theorem is something you've checked
5Compute Ak by diagonalizing, and watch the dominant eigenvalue take overLong-run behaviour is obvious to you
6Take an inertia tensor from CAD and extract principal axes and momentsYou can populate a URDF inertial block correctly
7Simulate the intermediate axis theorem with Euler's equationsYou've watched a stability eigenvalue predict a tumble
8Build M and K for a 3-mass chain and solve the generalized problemMode shapes come from a computation you performed
9Design state feedback to place closed-loop poles at chosen locationsPoles and eigenvalues are one concept in your head
10Compute a Jacobian's singular values across a workspace and plot the condition numberSingularities are visible before you drive into one
11Implement power iteration and confirm the convergence rate against |λ₂/λ₁|You understand why some iterative methods crawl

The one-paragraph summary

An eigenvector of a matrix is a direction the matrix doesn't turn — applying the matrix merely scales it, by a factor called the eigenvalue. Because the transformation reduces to independent scalings along those directions, diagonalizing turns coupled problems into lists of one-dimensional ones, which is why the same decomposition appears everywhere something spreads, transforms, or evolves. Symmetric matrices — inertia tensors, covariances, stiffness matrices, Hessians — are the well-behaved case, guaranteed real eigenvalues and orthogonal eigenvectors by the spectral theorem, so they represent pure scaling along perpendicular axes. For a linear system ẋ = Ax the solution decomposes into modes evolving as eλt, so stability is exactly the question of whether every eigenvalue has a negative real part; in discrete time the criterion becomes magnitude under one, and placing poles is literally choosing where the closed-loop eigenvalues sit. Complex pairs mean oscillation, with the real part setting decay and the imaginary part setting frequency, from which damping ratio, overshoot and settling time follow directly. The eigenvectors of an inertia tensor are the principal axes that decouple rotational dynamics — and the fact that spinning about the intermediate one is unstable is a stability eigenvalue turning positive. The eigenvectors of a structure's stiffness-mass system are its vibration modes, whose lowest frequency usually caps how much control bandwidth you can ask for. Finally, eigenvalues are not singular values: the SVD applies to any matrix, always exists, and is what you need for a rectangular Jacobian.