Eigenvalues & Eigenvectors
Most directions a matrix shoves to a new angle; a few it leaves on their own line, only stretched. Those are eigenvectors, the stretch factors are eigenvalues — found from one determinant equation, with trace and determinant as instant shortcuts.
What you'll learn
- The defining equation A v = λ v and why v must be non-zero
- Eigenvalues solve the characteristic polynomial det(A − λI) = 0
- Two shortcuts: trace(A) = sum of eigenvalues, det(A) = product of eigenvalues
- Eigenvectors are non-unique — any non-zero scalar multiple is the same eigenvector
Before you start
The last lesson ended on a hint: most directions a matrix shoves off to a new angle,
but a few it leaves sitting on their own line. Those special directions are
eigenvectors, and the factor by which each one is stretched is its eigenvalue
λ. Push a random arrow through a matrix and it comes out rotated and stretched; push
an eigenvector through and it comes out pointing the very same way, only longer or
shorter. That single idea powers covariance, PCA, PageRank, and the stability of
dynamical systems — and it shows up almost every year in GATE DA.
The defining equation
A non-zero vector v is an eigenvector of A when applying A only scales it:
A v = λ v (v ≠ 0)
The scalar λ says by how much: positive keeps the direction, negative flips it, a
small λ shrinks it.
Two zeros live in that equation and only one of them is banned, which is the part most
people have to read twice. The eigenvector may never be zero; the eigenvalue is
perfectly allowed to be. We exclude v = 0 because A·0 = λ·0 holds for every λ
at once — it would make every number an eigenvalue and the definition would say nothing.
But λ = 0 is a genuine, informative answer: it says A flattens that entire direction
onto the origin. Zero eigenvector, meaningless; zero eigenvalue, meaningful.
Play with it below. The fan of faint arrows shows where the matrix sends every input direction — most swing to a new angle, but the highlighted lines stay put and only scale by their eigenvalue. Drag the test vector onto one to feel a direction survive; switch to the rotation preset and the eigenlines vanish — those eigenvalues are complex, more on that shortly.
Almost every vector rotates — eigenvectors only stretch
The faint fan shows where the matrix sends each input direction. Most swing to a new angle. The highlighted lines are the exceptions: vectors on them keep their direction and just scale by λ. Drag î/ĵ or the test vector to feel it.
Finding them — the characteristic polynomial
Rearrange A v = λ v into (A − λI) v = 0. A non-zero v can solve this only if
A − λI is singular — has no inverse, because it crushes some non-zero vector to
zero — and singular, from the determinant lesson, means
det(A − λI) = 0
So the search for eigenvalues is really a search for the values of λ that make that
determinant collapse. Expand the left-hand side and you get a polynomial in λ, called
the characteristic polynomial; its roots are exactly the eigenvalues. For a 2×2
matrix it is always a quadratic, and it has a form worth memorising on sight:
λ² − trace(A)·λ + det(A) = 0
The trace here is simply the sum of the diagonal entries — a + d for a 2×2.
Once you have the eigenvalues, plug each back into (A − λI)v = 0 and solve the linear
system for the eigenvector direction v. That last step is worth watching once. For
A = [[2, 2], [1, 3]] the quadratic is λ² − 5λ + 4 = 0, so λ = 1 or λ = 4. At
λ = 4, A − 4I = [[−2, 2], [1, −1]], and both rows say the same thing, y = x, so
v = (1, 1). Check: A(1,1) = (2+2, 1+3) = (4, 4) = 4·(1,1) ✓.
Two shortcuts ride along, and they earn a large share of the marks on this topic — for
any n×n matrix with eigenvalues λ₁, …, λₙ:
So trace(A) = Σλᵢ and det(A) = Πλᵢ. They let you check an answer instantly, and
often find the second eigenvalue the moment you know the first.
A worked example — a real GATE DA 2024 question
Find the eigenvalues of
M = [[2, −1], [3, 1]].
Read off the trace and determinant, build the quadratic, check the discriminant:
trace(M) = 2 + 1 = 3
det(M) = (2)(1) − (−1)(3) = 2 + 3 = 5
λ² − 3λ + 5 = 0 discriminant = (−3)² − 4·5 = 9 − 20 = −11 < 0
λ = (3 ± √(−11)) / 2 = (3 ± i√11)/2 → a complex conjugate pair
The negative discriminant means no real eigenvalues — a complex conjugate pair
(this is GATE DA 2024). Geometrically M rotates as well as scales, so no real
direction survives, exactly the rotation preset in the widget. For contrast, a clean
real case — a triangular matrix gives its eigenvalues for free:
A = [[2, 1], det(A − λI) = (2−λ)(3−λ) − 0 = 0 → λ = 2 or λ = 3
[0, 3]]
For any triangular matrix (zeros below or above the diagonal) the eigenvalues are
just the diagonal entries — no algebra. Check: trace = 5 = λ₁+λ₂ ✓, det = 6 = λ₁·λ₂ ✓.
A question to carry forward
Eigenvalues are not just a number to find — they are a handle on the matrix itself. Here
is the thread onward: if you know the eigenvalues of A, what are the eigenvalues of
A², of A⁻¹, of A + 5I? And what makes a symmetric matrix so much better
behaved than a general one that its eigenvectors come out perpendicular?
In one breath
- Eigenvector
v ≠ 0: a direction the matrix only stretches,A v = λ v; the eigenvalueλis the stretch factor. - Find via
det(A − λI) = 0; for a2×2,λ² − trace·λ + det = 0. Then solve(A−λI)v = 0for the direction. - Shortcuts:
trace = Σλ(sum),det = Πλ(product) — check answers, or get the second eigenvalue from the first. - Triangular matrix → eigenvalues are the diagonal entries.
- Traps: a real matrix can have a complex conjugate pair (
trace²−4det < 0); eigenvectors are non-unique (any non-zero scalar multiple).
Practice
Quick check
Practice this in an interview
All questionsUnder full column rank, OLS sets the gradient of the squared-error objective to zero, giving the normal equations and the unique coefficient vector β = (XᵀX)⁻¹Xᵀy. In rank-deficient or numerical settings, use the pseudoinverse or a least-squares solver rather than explicitly forming the inverse.
Expected value is the probability-weighted center of a random variable, while variance is the expected squared distance from that center. Expected value is always linear, but variance needs scaling and covariance terms; independence is only required for the familiar variance-addition shortcut.
PCA centers data and finds orthogonal directions that maximize variance, usually through the covariance matrix's eigenvectors or an SVD, then projects observations onto the leading directions. Choose the component count using cumulative explained variance or reconstruction needs for compression, and cross-validated downstream performance for prediction; standardize first only when feature scales should contribute equally.