How the eigenvector calculator works
This eigenvector calculator (and eigenvalue calculator) follows the textbook route, but with exact arithmetic. First it builds the characteristic polynomial det(λI - A). Then it finds the polynomial's roots, which are the eigenvalues: rational roots are located exactly with the rational root theorem, and anything left over is solved numerically. Finally, for each eigenvalue λ it row reduces A - λI and reads the null space, whose basis vectors are the eigenvectors. Multiplicities are reported so you can tell at a glance whether the matrix is diagonalizable.
Worked example: the default 3x3 matrix
The default matrix has rows (2, 1, 0), (1, 2, 0), (0, 0, 3). Its characteristic polynomial is λ^3 - 7λ^2 + 15λ - 9, which factors as (λ - 1)(λ - 3)^2. So λ = 1 has algebraic multiplicity 1 and λ = 3 has algebraic multiplicity 2. For λ = 1, A - I has rows (1, 1, 0), (1, 1, 0), (0, 0, 2); row reduction gives x + y = 0 and z = 0, so the eigenvector is (-1, 1, 0). For λ = 3, A - 3I has rows (-1, 1, 0), (1, -1, 0), (0, 0, 0), which reduces to the single equation x = y with y and z free, giving two independent eigenvectors (1, 1, 0) and (0, 0, 1). The geometric multiplicity equals the algebraic multiplicity for every eigenvalue, so this matrix is diagonalizable.
The characteristic polynomial for small matrices
| Size | Characteristic polynomial | Shortcut |
|---|---|---|
| 2 x 2 | λ^2 - (trace) λ + det | Trace is a + d, determinant is ad - bc |
| 3 x 3 | λ^3 - (trace) λ^2 + (sum of principal 2x2 minors) λ - det | Sum of roots is the trace, product is the determinant |
| n x n | det(λI - A), degree n | Computed here by the Faddeev-LeVerrier recurrence |
Checks you can do by hand
| Check | Why it holds |
|---|---|
| Eigenvalues add up to the trace | Both equal the coefficient of λ^(n-1) up to sign |
| Eigenvalues multiply to the determinant | Both equal the constant term up to sign |
| A v = λ v for each listed pair | Definition of an eigenvector |
| Triangular matrices have their diagonal as eigenvalues | The characteristic determinant is the product of the diagonal differences |
Rational, irrational, and complex eigenvalues
Whether the eigenvalues are nice depends only on the characteristic polynomial. A polynomial with integer coefficients has rational roots only among a finite list of candidates (divisors of the constant term over divisors of the leading coefficient), which the calculator tests exactly. What remains after removing rational roots is solved with the quadratic formula when it is quadratic, and otherwise with QR iteration on the companion matrix. Real roots found this way are labelled irrational and shown to eight digits; complex conjugate pairs are labelled as such. The Fibonacci matrix [[1, 1], [1, 0]] is a good test: its eigenvalues are the golden ratio and its conjugate.
Diagonalization
If an n x n matrix has n independent eigenvectors, placing them as the columns of P and the matching eigenvalues on the diagonal of D gives A = P D P^-1. That decomposition makes powers of A trivial (A^k = P D^k P^-1) and underlies everything from solving linear differential equations to principal component analysis. The calculator's multiplicity report tells you immediately whether such a P exists: it does exactly when every eigenvalue's geometric multiplicity matches its algebraic multiplicity.