Understanding the eigenvalue and eigenvector calculator — concept and principle
An eigenvector of a square matrix A is a non-zero vector v that A only stretches or shrinks, without changing its direction: Av = λv. The factor λ is the eigenvalue. Eigenvalues tell you how a system behaves when a linear step is repeated, as in vibration analysis, stability of differential equations, principal components and Markov chains. This calculator returns all eigenvalues, real or complex, and the dominant eigenvector.
How it is calculated
Av = λv means (A − λI)v = 0 has a non-zero solution, which happens exactly when det(A − λI) = 0. That equation is the characteristic polynomial of degree n. The calculator finds its coefficients with the Faddeev–LeVerrier algorithm (built from traces of matrix products) and then finds all n roots at once with the Durand–Kerner iteration, which also works for complex roots, shown as a ± bi. The dominant eigenvector is found separately by power iteration: start from a vector, multiply by A repeatedly and rescale to length 1 each time.
For a 2×2 matrix the polynomial is simply λ² − (trace)·λ + det = 0.
The principle
If v is an eigenvector, applying A k times multiplies it by λᵏ. Any starting vector is a mix of eigenvectors, so after many multiplications the component with the largest |λ| outgrows the others and the vector lines up with the dominant eigenvector; the speed depends on the ratio |λ₂/λ₁|. Two checks always hold: the sum of the eigenvalues equals the trace, and their product equals the determinant.
Worked example
- Default: A = [2 1; 1 2]. Trace = 4, det = 2·2 − 1·1 = 3.
- Characteristic equation: λ² − 4λ + 3 = 0, i.e. (λ − 3)(λ − 1) = 0.
- Eigenvalues: 3, 1 (sum 4 = trace, product 3 = det).
- For λ = 3: (A − 3I)v = [−1 1; 1 −1]v = 0 gives v = (1, 1). Normalized: (1/√2, 1/√2) = (0.707107, 0.707107).
- For λ = 1 the eigenvector is (1, −1), perpendicular to the first, as expected for a symmetric matrix.
How to read the result
|λ| > 1 means growth along that direction, |λ| < 1 means decay, and a negative λ flips the direction. Complex eigenvalues signal rotation: their modulus gives growth or decay per step. A zero eigenvalue means A is singular. Real symmetric matrices always have real eigenvalues and orthogonal eigenvectors.
Common mistakes
- Expecting a unique eigenvector: any non-zero multiple (including −v) is also an eigenvector.
- Reading det(A) − λ instead of det(A − λI).
- Trusting the power-iteration vector when two eigenvalues have the same largest |λ| (for example 2 and −2, or a complex pair); it may not settle.
Frequently asked questions
Can a real matrix have complex eigenvalues?
Yes. A 90° rotation [0 −1; 1 0] has eigenvalues ±i. Complex eigenvalues of a real matrix come in conjugate pairs.
Why does my eigenvector differ from my textbook?
Eigenvectors are only defined up to scale; (1, 1) and (0.707, 0.707) describe the same direction.
Sources: Gilbert Strang, Introduction to Linear Algebra, Wellesley-Cambridge Press — eigenvalues and eigenvectors · Gene H. Golub and Charles F. Van Loan, Matrix Computations, Johns Hopkins University Press — power method