🧮
🧮 Math & statistics

Characteristic Polynomial Calculator (det(λI − A) of a square matrix)

Results update as you type.

Your numbers

Understanding the characteristic polynomial calculator — concept and principle

This calculator finds the characteristic polynomial p(λ) = det(λI − A) of a square matrix, whose roots are the eigenvalues of A. It lists the coefficients, the sign-flipped form det(A − λI), the trace and the determinant. Use it as the first step in finding eigenvalues or to check a hand calculation.

Characteristic polynomialCharacteristic polynomial of AA20012−113−2trace2 → −2λ²minors sum−1 → −λdet A−2 → +2det(λI − A)λ³ − 2λ² − λ + 2
For 3 × 3: λ³ − (trace)λ² + (sum of 2 × 2 minors)λ − det A.

How it is calculated

p(λ) = det(λI − A), a polynomial of degree n

det(A − λI) = (−1)ⁿ p(λ)

Coefficient of λⁿ⁻¹ = −trace(A); constant term = (−1)ⁿ det(A)

Faddeev–LeVerrier recurrence: M₁ = I, c_k = −trace(A M_k) ÷ k, M_(k+1) = A M_k + c_k I

The principle

λ is an eigenvalue of A when (A − λI)v = 0 has a non-zero solution v, which happens exactly when A − λI is singular, so its determinant is zero. Expanding that determinant gives a polynomial in λ. Its coefficients are built from sums of principal minors: the λⁿ⁻¹ term collects the diagonal (the trace) and the constant term is the determinant. The Faddeev–LeVerrier method finds all coefficients using only matrix products and traces, avoiding symbolic determinants.

Worked example

Default input: A = [2 0 0; 1 2 −1; 1 3 −2].

  1. Trace = 2 + 2 − 2 = 2, so the λ² coefficient is −2.
  2. Sum of the 2 × 2 principal minors = 4 + (−4) + (−1) = −1, the λ coefficient.
  3. det(A) = 2 × (2 × (−2) − (−1) × 3) = 2 × (−1) = −2, so the constant term is (−1)³ × (−2) = 2.
  4. p(λ) = λ³ − 2λ² − λ + 2, coefficients 1, −2, −1, 2, degree 3.
  5. det(A − λI) = −(λ³ − 2λ² − λ + 2).

How to read the result

Factor or solve p(λ) = 0 to get the eigenvalues. Here p(λ) = (λ − 2)(λ² − 1), so the eigenvalues are 2, 1 and −1. Their sum equals the trace (2) and their product equals the determinant (−2), a quick check on any answer.

Common mistakes

Keep in mind: For large or nearly singular matrices, finding eigenvalues from polynomial roots is numerically unstable; use a dedicated eigenvalue algorithm for real work.

Frequently asked questions

What is the characteristic polynomial used for?

Its roots are the eigenvalues of the matrix.

What is the difference between det(λI − A) and det(A − λI)?

They differ by the factor (−1)ⁿ, so they have the same roots.

How can I check my answer?

The λⁿ⁻¹ coefficient should be −trace(A) and the constant term (−1)ⁿ det(A).

Sources: A. Davis, P. Zachlin et al., Coordinated Linear Algebra (University of Nebraska–Lincoln), §6.1 Eigenvalues and Eigenvectors

Checked 9 Nov 2026. Coordinated Linear Algebra (University of Nebraska–Lincoln), §6.1 Eigenvalues and Eigenvectors — Definition 6.1.12 (characteristic equation det(A − λI) = 0; its roots are the eigenvalues, repeated factors give algebraic multiplicity). Trace/determinant coefficients and the Faddeev–LeVerrier recurrence are standard results.

🧮 All math & statistics tools →🌍 Calculators by country →