Most vectors change direction when a matrix acts on them. An eigenvector is one of the rare exceptions: the matrix only scales it, so it stays on the same line through the origin. The scaling factor is the eigenvalue. In symbols, A v = λ v, where A is a square matrix, v is a nonzero vector, and λ is a number. To find them, solve det(A − λI) = 0 for λ, then solve (A − λI) v = 0 for each λ.
This guide works one 2×2 example by hand, explains what the numbers mean, and shows where the idea appears in data science.
What the equation says
Apply a matrix to a random vector and the result usually points somewhere new. The equation A v = λ v describes a special case: for one particular vector v, applying A gives the same result as multiplying v by a number. The output lies on the same line through the origin as the input. If λ = 2, the vector doubles in length. If λ = 0.5, it halves. If λ = −1, it flips to the opposite side of the origin but stays on its line.
Two conditions matter. The vector must be nonzero, because A·0 = λ·0 holds for every λ and tells you nothing. The matrix must be square, so that v and A v live in the same space and can be compared.
A picture of the idea

Under a 2×2 matrix, a grid of points is stretched and sheared. Most lines through the origin tilt. The two red lines in the picture are different: points that start on them stay on them, which makes those directions eigenvectors. How far a point moves along its line is set by the eigenvalue.
Worked example: a 2×2 matrix by hand
Let
A = | 2 1 |
| 1 2 |
Test the vector v = (1, 1). Multiplying gives A v = (2·1 + 1·1, 1·1 + 2·1) = (3, 3), which is 3 times v. So (1, 1) is an eigenvector with eigenvalue 3.
Test the vector w = (1, −1). Then A w = (2·1 + 1·(−1), 1·1 + 2·(−1)) = (1, −1), which is 1 times w. So (1, −1) is an eigenvector with eigenvalue 1.
Guessing worked here because the example was chosen carefully. Real problems need a procedure.
Finding eigenvalues: the characteristic equation
Rewrite A v = λ v as (A − λI) v = 0, where I is the identity matrix. This homogeneous system has a nonzero solution v only when A − λI is singular, meaning its determinant is zero:
det(A − λI) = 0
For a 2×2 matrix with entries a, b, c, d, the determinant of A − λI is (a − λ)(d − λ) − bc. For our matrix:
(2 − λ)² − 1 = λ² − 4λ + 3 = (λ − 3)(λ − 1)
The roots are λ = 3 and λ = 1, the same eigenvalues found by testing. The expression on the left is the characteristic polynomial, and setting it to zero gives the characteristic equation.
For each eigenvalue, solve the system for the eigenvector:
- For λ = 3, A − 3I = [[−1, 1], [1, −1]]. The first row gives −x + y = 0, so y = x. The eigenvectors are every nonzero multiple of (1, 1).
- For λ = 1, A − I = [[1, 1], [1, 1]]. The first row gives x + y = 0, so y = −x. The eigenvectors are every nonzero multiple of (1, −1).
Each eigenvalue therefore gives a whole line of eigenvectors, not a single vector. The vector (2, 2) is just as valid as (1, 1) for λ = 3.
There is a useful check. The eigenvalues add up to the trace, the sum of the diagonal entries: 3 + 1 = 4 = 2 + 2. Their product equals the determinant: 3 × 1 = 3 = 2·2 − 1·1. These identities hold for every square matrix, so they catch many arithmetic slips.
How many eigenvalues does a matrix have?
An n×n matrix has exactly n eigenvalues over the complex numbers, counted with multiplicity, because its characteristic polynomial has degree n. Some may repeat. Some may be complex, even when every entry of the matrix is real.
Rotations are the standard example. The matrix R = [[0, −1], [1, 0]] rotates the plane by 90 degrees. Its characteristic equation is λ² + 1 = 0, so λ = i or λ = −i. No real vector keeps its direction under that rotation, so its eigenvalues are not real.
Two special cases are worth knowing. If the determinant is zero, λ = 0 is an eigenvalue, and its eigenvectors are the nonzero vectors the matrix sends to zero. And a real symmetric matrix always has real eigenvalues, with eigenvectors that can be chosen perpendicular to one another. That property is one reason covariance matrices are so convenient, as the next sections show.
Why the idea keeps showing up
Repeated multiplication is one reason. If you apply A again and again, the component of a vector along an eigenvector with eigenvalue λ is multiplied by λ each time. The eigenvalue with the largest absolute value tends to dominate, which is the basis of the power method for finding a dominant eigenvector.
Our example makes this concrete. The vector e = (1, 0) can be written as ½(1, 1) + ½(1, −1). Applying A once gives ½·3·(1, 1) + ½·1·(1, −1) = (2, 1), which matches the direct product A e = (2, 1). After k applications the (1, 1) part grows like 3ᵏ while the (1, −1) part keeps its size, so the direction turns toward (1, 1).
The same structure appears in several fields:
- Principal component analysis. The covariance matrix of a dataset is symmetric. Its eigenvectors give the principal directions, and its eigenvalues give the variance along each one. The companion guide, Principal Component Analysis Explained, builds on this.
- Vibration. In vibration analysis, eigenvalues correspond to natural frequencies and eigenvectors describe the shapes of the vibration modes, as the Wikipedia article on eigenvalues and eigenvectors explains. The hero photograph shows the same idea in a physical plate: sand gathers along the lines that do not move.
- Stability. Eigenvalues show whether repeated application of a linear system shrinks or grows each component, which is why they appear in stability analysis.
Numerical caution
Libraries compute eigenvalues numerically rather than solving the polynomial by hand. For symmetric matrices, use a routine built for that case. NumPy provides numpy.linalg.eigh, which assumes a symmetric input and returns real eigenvalues in ascending order. The general numpy.linalg.eig can return complex values.
Sensitivity also matters. When two eigenvalues are close together, or the matrix is nearly singular, small rounding errors can change the computed eigenvectors noticeably. The guide on rank, SVD, and conditioning covers the related stability questions.
Try it yourself
ReLU.chat's Linear Algebra assistant covers eigenvalues alongside vectors, matrix rank, and the singular value decomposition. The eigenvalues and eigenvectors topic page gives a short definition and example, and the Linear Algebra chat answers questions from that curated material. Your questions are processed in your browser. How it works explains which steps run on your device and which downloads the site still makes.
Frequently asked questions
What is an eigenvector in one sentence?
An eigenvector is a nonzero vector whose direction does not change when a square matrix is applied to it. The matrix only scales it, by the eigenvalue.
Can an eigenvalue be zero or negative?
Yes. A zero eigenvalue means the matrix collapses that eigenvector to the zero vector, which happens exactly when the matrix is singular, meaning its determinant is zero. A negative eigenvalue flips the vector to the opposite side of the origin while keeping it on the same line.
Are eigenvalues always real numbers?
No. A 90-degree rotation has the complex eigenvalues i and −i. Real symmetric matrices, however, always have real eigenvalues.
Is an eigenvector unique?
Not in scale. Any nonzero multiple of an eigenvector is also an eigenvector with the same eigenvalue, and software usually returns unit-length vectors. If an eigenvalue is repeated, its eigenvectors can form a whole subspace rather than a single line.
Do I need to compute eigenvalues by hand?
Only to build intuition. The 2×2 procedure above is practical for small matrices. Beyond a few dimensions, use a numerical library. NumPy's eigh is the usual choice for symmetric matrices.
How do eigenvalues relate to PCA?
PCA finds the eigenvectors of a data covariance matrix. Each eigenvalue measures the variance along its eigenvector, so the largest eigenvalues mark the directions that carry the most information. The PCA guide walks through the full method.
