characteristic polynomial calculator

Interactive Characteristic Polynomial Calculator

Enter a square matrix and compute its characteristic polynomial using the convention p(λ) = det(λI - A).

Tip: You can type decimals (e.g., 1.5), integers, or fractions (e.g., 3/4).

What is a characteristic polynomial?

The characteristic polynomial is one of the most important objects in linear algebra. For any square matrix A of size n, it is defined as:

p(λ) = det(λI - A)

This produces a degree-n polynomial in λ. Its roots are the eigenvalues of the matrix, which makes the characteristic polynomial central to matrix analysis, differential equations, stability studies, machine learning, and control theory.

Why this polynomial matters

  • Its roots are exactly the matrix eigenvalues.
  • It helps classify linear transformations.
  • It is used in diagonalization and Jordan forms.
  • It appears in the Cayley-Hamilton theorem, where the matrix satisfies its own polynomial.

How to use this calculator

  • Choose the matrix size (2×2 through 6×6).
  • Fill in every matrix entry.
  • Click Calculate Polynomial.
  • Read the polynomial and coefficient list shown in the result panel.

The output is displayed in descending powers of λ, for example: λ3 - 6λ2 + 11λ - 6.

Quick example

Suppose

A = [1 2 0; 0 3 4; 0 0 5]

Because this matrix is upper triangular, its eigenvalues are the diagonal entries 1, 3, and 5. So:

p(λ) = (λ - 1)(λ - 3)(λ - 5) = λ3 - 9λ2 + 23λ - 15

You can click Load Example in the calculator to test this exact matrix instantly.

Common mistakes to avoid

  • Using a non-square matrix (the characteristic polynomial is only defined for square matrices).
  • Mixing conventions: some texts use det(A - λI), which differs by a sign pattern.
  • Arithmetic slips when expanding determinants by hand, especially for 3×3 and larger matrices.
  • Confusing polynomial coefficients with eigenvalues directly.

Notes on accuracy

This tool computes coefficients numerically using a stable matrix-based method (Faddeev-LeVerrier). For very large or ill-conditioned matrices, tiny floating-point rounding effects can appear. Small near-zero values are cleaned for readability.

Related topics

  • Eigenvalue calculator
  • Determinant calculator
  • Matrix inverse calculator
  • Cayley-Hamilton theorem
  • Minimal polynomial

🔗 Related Calculators