FLXCode Eigenvalue Calculator

FLXCode apps

Appearance

Eigenvalue Calculator

Type a square matrix and get its eigenvalues and eigenvectors, with a plain note on which parts are exact.

Example

λ = 1, 3

2 × 2 matrix: eigenvalues are exact.

Eigenvalues and eigenvectors

Eigenvalue λMultiplicityEigenvector(s) vResidual |Av − λv|
11(1, −1)0 (exact)
31(1, 1)0 (exact)

How exact is this

  • Exact: every eigenvalue comes from the characteristic polynomial in exact arithmetic.
  • Largest residual |Av − λv| over every vector shown (unit length, in floating point): 0.

Characteristic polynomial and checks

  • det(λI − A) = λ² − 4λ + 3
  • Trace = 4. The eigenvalues add up to 4.
  • Determinant = 3. The eigenvalues multiply to 3.

What the vectors mean

  • Av = λv: multiplying by A only stretches v by λ. Any nonzero multiple of v is also an eigenvector. Decimal vectors are scaled to length 1 with the first nonzero entry positive.

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it. What this tool keeps and sends.

Problem or idea? Email us

Quick start

  1. Type a square matrix, one row per line (2 × 2 up to 6 × 6).
  2. The eigenvalues are the headline. The table gives each one's multiplicity, eigenvector and residual.
  3. Read the "How exact is this" note before copying a decimal into homework.

Worked examples

MatrixEntriesEigenvaluesAnswer isNote
Symmetric 2 × 2[2 1; 1 2]λ = 1, 3exactTrace 4 and determinant 3 give λ² − 4λ + 3 = (λ − 1)(λ − 3).
Golden ratio[1 1; 1 0]λ = (1 − √5)/2, (1 + √5)/2exactλ² − λ − 1 = 0. The larger root is the golden ratio.
Rotation by 90°[0 −1; 1 0]λ = ±iexactNothing keeps its direction, so there are no real eigenvalues: λ² + 1 = 0.
Defective[2 1; 0 2]λ = 2, 2exactλ = 2 twice, but only one eigenvector direction.
3 × 3, rational roots[2 0 0; 0 3 4; 0 4 9]λ = 1, 2, 11exactThe characteristic polynomial factors over the whole numbers.
3 × 3, cyclic shift[0 1 0; 0 0 1; 1 0 0]λ = −1/2 ± (i√3)/2, 1exactλ³ = 1: the cube roots of 1. One real, two complex.
3 × 3, no nice roots[1 2 3; 4 5 6; 7 8 10]λ ≈ −0.90574, 0.198247, 16.7075numericThe cubic has no rational root, so the values are computed, not exact.
Tridiagonal 4 × 4[4 1 0 0; 1 4 1 0; 0 1 4 1; 0 0 1 4]λ ≈ 2.38197, 3.38197, 4.61803, 5.61803numericSymmetric, so all four eigenvalues are real. They are 4 + 2cos(kπ/5).

What is exact and what is not

The characteristic polynomial is computed in exact whole-number arithmetic for every size. The tool then looks for rational roots and checks each one exactly, so eigenvalues like 2 or −1/2 are never rounded, and their eigenvectors come from exact row reduction. If a quadratic factor is left, it is solved with the quadratic formula in radical form, real or complex. A leftover cubic or higher factor is solved numerically, and those values carry a ≈ sign.

This is stricter than most online tools, which print decimals for everything. It also means a 6 × 6 matrix with nice eigenvalues, such as a triangular one, comes out exact.

How an eigenvalue is found by hand

Write det(A − λI) = 0, expand it into a polynomial in λ, and solve. For a 2 × 2 matrix that polynomial is λ² − (trace)λ + (determinant). For each root λ, solve (A − λI)v = 0 for the eigenvector. The quadratic formula calculator solves the 2 × 2 polynomial, and the matrix calculator shows the row reduction behind the null space. For a linear system use the system of equations calculator.

Numbers this uses

  • Size is 2 × 2 up to 6 × 6, real entries. Entries can be whole numbers, decimals or fractions.
  • Numeric method is Hessenberg reduction and shifted QR. Values within 1e-9 relative of numpy.linalg.eig on the test matrices.
  • Eigenvectors is real eigenvalues; complex only for 2 × 2. Unit length, first nonzero entry positive, or whole numbers when exact.
  • Entry size is below 1e100. Beyond that the decimal part would overflow.

Limits

No complex-entry matrices, and no matrices bigger than 6 × 6. For a repeated numeric eigenvalue the tool shows one eigenvector and says it cannot tell whether more exist. Repeated rational eigenvalues are checked exactly. Very ill-conditioned matrices can lose digits in the numeric tier: look at the residual.

FAQ

What is an eigenvalue?

A number λ for which some nonzero vector v satisfies A v = λ v. Multiplying by A only stretches v by λ, without turning it. The eigenvalues are the roots of the characteristic polynomial det(λI − A). An n × n matrix has n of them, counting repeats and complex ones.

How do I enter a matrix?

One row per line, entries separated by spaces or commas. Whole numbers, decimals and fractions like 1/2 all work. A semicolon also starts a new row, so 2 1; 1 2 is a 2 × 2 matrix. It must be square, from 2 × 2 up to 6 × 6.

When are the answers exact?

For 2 × 2 they are exact: the roots come from the quadratic formula, in radical form, and complex roots are written like 1 ± 2i (only a discriminant too big to factor falls back to decimals, and the page says so).

How accurate are the numeric ones?

For ordinary matrices about 1e-12. The method is Hessenberg reduction followed by shifted QR iteration, the same family as the one inside numpy and LAPACK. The page shows the residual |Av − λv| for each vector, so you can see how well it holds. Matrices with repeated, defective eigenvalues are the hard case for any numeric method.

What does defective mean?

A repeated eigenvalue with fewer independent eigenvectors than its multiplicity. [2 1; 0 2] has λ = 2 twice but only one eigenvector direction, so it cannot be diagonalised. The tool checks this exactly whenever the eigenvalue is rational. For repeated numeric eigenvalues it says it cannot tell.

Why are some eigenvectors missing?

The tool gives eigenvectors for real eigenvalues, and for complex ones only in the 2 × 2 case. For a complex eigenvalue of a larger matrix it shows the value and says the vector is not shown, rather than guess. Any nonzero multiple of an eigenvector is also an eigenvector, so yours may differ from a textbook by a factor.

More from FLXCode

  • Matrix CalculatorAdd, multiply, transpose, determinant, inverse, rank and RREF up to 6 × 6, exact fractions, row-operation steps.
  • System of Equations CalculatorSolve 2 to 6 linear equations typed as you write them, with exact fractions and row-reduction steps.
  • Quadratic Formula CalculatorSolve ax² + bx + c = 0 with exact roots, complex roots, discriminant, vertex form, steps and a small graph.
  • Square Root CalculatorExact simplified radicals (√72 = 6√2), decimals to your digits, cube and n-th roots, perfect-square check, steps.

Share Eigenvalue Calculator