BYTETOOLS

Characteristic Polynomial Calculator

Compute det(λI − A) for matrices up to 6×6 with the Faddeev-LeVerrier recursion, plus trace and determinant cross-checks and a Cayley-Hamilton proof.

Characteristic polynomial p(λ) = det(λI − A)

p(λ) = λ² − 7λ + 10

The roots of p(λ) = 0 are the eigenvalues of A. This form is monic (leading coefficient 1) because it expands det(λI − A) rather than det(A − λI); for odd n the two differ by an overall minus sign.

2×2
Size
7
trace(A)
10
det(A)
verified
Cayley–Hamilton

Coefficients

TermCoefficientCross-check
λ²1
λ¹-7c₁ = −trace(A) = -7 ✓
λ10c₂ = (−1)²·det(A) ✓

Faddeev–LeVerrier recursion

  1. M₁ = I
  2. k = 1: tr(A·M₁) = 7, c₁ = −(7) / 1 = -7
  3. k = 2: tr(A·M₂) = -20, c₂ = −(-20) / 2 = 10

Each step multiplies A by the running matrix Mₖ, takes the trace and divides by k, then forms Mₖ₊₁ = A·Mₖ + cₖI. No symbolic determinant is ever expanded, which is why the method stays exact up to 6×6.

Cayley–Hamilton check

Substituting A into its own characteristic polynomial must give the zero matrix — p(A) = 0.

00
00

Every entry is exactly 0, so Cayley–Hamilton holds and the coefficients above check out.

What is the Characteristic Polynomial Calculator?

The ByteTools Characteristic Polynomial Calculator expands det(λI − A) into its coefficients for any square matrix up to 6×6.

  • Works for 1×1 through 6×6 matrices with exact rational arithmetic
  • Faddeev-LeVerrier recursion printed step by step, no symbolic determinant expansion
  • Automatic trace and determinant cross-checks on the coefficients
  • Cayley-Hamilton verified by substituting A into p(λ)
  • Copyable polynomial, coefficient list and working
  • 100% client-side — nothing leaves your browser

How to use the Characteristic Polynomial Calculator

  1. 1

    Enter a square matrix, one row per line, with values separated by spaces or commas.

  2. 2

    Read p(λ) at the top — the polynomial whose roots are the eigenvalues of your matrix.

  3. 3

    Check the coefficient table, where c₁ = −trace(A) and the last coefficient = (−1)ⁿ·det(A) are verified for you.

  4. 4

    Expand the Faddeev-LeVerrier panel to follow the recursion step by step.

  5. 5

    Scroll to the Cayley-Hamilton check to see p(A) come out as the zero matrix.

About the Characteristic Polynomial Calculator

The ByteTools Characteristic Polynomial Calculator expands det(λI − A) into its coefficients for any square matrix up to 6×6. Rather than expanding a symbolic determinant — which becomes unmanageable past 3×3 — it uses the Faddeev-LeVerrier recursion: start with M₁ = I, take cₖ = −tr(A·Mₖ)/k, then form Mₖ₊₁ = A·Mₖ + cₖI. Every step is shown, and all arithmetic is done in exact fractions so nothing is lost to rounding.

Two identities are checked automatically. The λⁿ⁻¹ coefficient must equal −trace(A), and the constant term must equal (−1)ⁿ·det(A); both appear next to the coefficients with a tick. The tool then substitutes A back into its own polynomial and shows the resulting matrix, which the Cayley-Hamilton theorem says must be exactly zero — a complete numerical proof that the coefficients are right.

This is a linear algebra study aid for finding eigenvalues, minimal polynomials and matrix inverses via Cayley-Hamilton. All computation happens locally in your browser, so your matrix is never uploaded and the page keeps working offline.

Frequently asked questions

What is the characteristic polynomial of a matrix?

It is the polynomial p(λ) = det(λI − A). Setting it to zero gives the characteristic equation, and its roots are exactly the eigenvalues of A. For a 2×2 matrix it is always λ² − trace(A)λ + det(A).

Is it det(A − λI) or det(λI − A)?

Both are used, and they differ only by a factor of (−1)ⁿ, so they have identical roots. This calculator uses det(λI − A) because it makes the polynomial monic — the leading coefficient is always 1, which is the convention most textbooks and Cayley-Hamilton statements assume.

What is the Faddeev-LeVerrier algorithm?

It is a recursion that produces all the coefficients of the characteristic polynomial using only matrix multiplication and traces. Starting from M₁ = I, each step computes cₖ = −tr(A·Mₖ)/k and Mₖ₊₁ = A·Mₖ + cₖI. It avoids the factorial blow-up of expanding a symbolic determinant.

What does the Cayley-Hamilton theorem say?

It says every square matrix satisfies its own characteristic equation: substitute A for λ and you get the zero matrix. It is genuinely useful — it lets you write A⁻¹ and high powers of A as polynomials in A. This page shows the zero matrix as proof.

How do I get the eigenvalues from the characteristic polynomial?

Find the roots of p(λ) = 0. For degree 2 use the quadratic formula, for degree 3 use Cardano's method, and beyond that you generally need numerical root-finding. The ByteTools eigenvalue calculator does this for 2×2 and 3×3 matrices.

Related tools