Characteristic Polynomial Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Characteristic Polynomial Definition and Intuition

For a square matrix A, the characteristic polynomial condenses how the matrix acts on vectors into one polynomial in λ.

p(λ) = det(A − λI), where λ (lambda) is a scalar variable and I is the identity matrix of the same size as A.

In characteristic polynomial calculations, the key moment is when A − λI becomes singular (non-invertible). Any value of λ that makes the determinant zero is an eigenvalue of A, and those values describe how the matrix stretches, compresses, rotates, or reflects space along special directions called eigenvectors.

For an n × n matrix, the characteristic polynomial has degree n and can be written in the general form

p(λ) = λⁿ + c₁ λⁿ⁻¹ + c₂ λⁿ⁻² + … + cn−1 λ + cn,

where the coefficients ck are built from matrix invariants such as the trace and determinant.

Characteristic Polynomial Formula in MathML

The characteristic polynomial formula can also be written using MathML for a square matrix A. For an n × n matrix, it is

p ( λ ) = det ( A λ I )

Here, λ is the scalar variable, and I is the identity matrix of the same size as A.

How the Characteristic Polynomial Reveals Eigenvalues

The roots of the characteristic polynomial are exactly the eigenvalues of the matrix you entered. If p(λ) = 0 for some value λ = λ₀, then there exists a nonzero vector v such that A v = λ₀ v. This vector v is an eigenvector associated with the eigenvalue λ₀.

In practice, those eigenvalues help describe important qualitative features:

The characteristic polynomial is therefore a compact way to encode this eigenvalue information without computing eigenvectors directly.

Characteristic Polynomial Formulas for 2×2, 3×3, and 4×4 Matrices

2×2 characteristic polynomials

For a 2×2 matrix entered in this calculator

A = [[a, b], [c, d]],

the characteristic polynomial is

p(λ) = λ² − (tr A) λ + det(A),

where

3×3 characteristic polynomials

For a 3×3 matrix, the calculator returns a cubic characteristic polynomial. It can be written as

p(λ) = λ³ − (tr A) λ² + s λ − det(A),

where s is a symmetric expression in the entries of A (related to the sum of principal 2×2 minors or the trace of ). The calculator uses a stable algorithm to compute this coefficient directly from the matrix without requiring you to expand determinants by hand.

4×4 characteristic polynomials

For a 4×4 matrix, the calculator returns a quartic characteristic polynomial. The general pattern continues, and the coefficients can be expressed using traces of powers of A and combinations of minors, but the explicit formulas become quite long. Instead of asking you to apply those formulas manually, this calculator uses the Faddeev–Leverrier algorithm to generate them from the matrix entries.

How This Characteristic Polynomial Calculator Works

This characteristic polynomial calculator supports real-valued 2×2, 3×3, and 4×4 matrices. You select the matrix size, enter the entries, and then the tool computes the characteristic polynomial p(λ) in descending powers of λ.

Internally, the implementation uses the Faddeev–Leverrier algorithm. Very roughly, this algorithm:

Because it works with traces and matrix products, this approach avoids large symbolic determinant expansions and scales well to 4×4 matrices.

Interpreting Characteristic Polynomial Results

After you click Compute Polynomial, the calculator returns a characteristic polynomial such as

p(λ) = λ³ − 12 λ² + 47 λ − 60.

You can read this as an ordinary polynomial in the variable λ. Key points when interpreting it include:

The characteristic polynomial alone tells you the eigenvalues (via its roots) but not the eigenvectors. If you need eigenvectors, you will typically combine this result with an eigenvalue or eigenvector calculator.

Worked 3×3 Characteristic Polynomial Example

To see the characteristic polynomial calculator in action, consider the 3×3 matrix

A = [[4, 2, 0], [1, 3, 0], [0, 0, 5]].

Step 1: Compute the trace and determinant.

Step 2: Form A − λI. This gives

A − λI = [[4 − λ, 2, 0], [1, 3 − λ, 0], [0, 0, 5 − λ]].

Step 3: Compute the determinant det(A − λI). The lower-right block is 1×1, so

det(A − λI) = (5 − λ) det([[4 − λ, 2], [1, 3 − λ]]).

The 2×2 determinant is

(4 − λ)(3 − λ) − 2 × 1 = (12 − 7λ + λ²) − 2 = 10 − 7λ + λ².

Therefore,

p(λ) = det(A − λI) = (5 − λ)(10 − 7λ + λ²).

Expanding and simplifying yields

p(λ) = λ³ − 12 λ² + 47 λ − 60.

The roots of this cubic are λ = 5, λ = 4, and λ = 3, which are exactly the diagonal entries in this example. For a non-triangular matrix, the roots will generally not be visible from the entries, and a calculator like this is especially useful.

Comparing Characteristic Polynomials for 2×2, 3×3, and 4×4 Matrices

The table below shows how the characteristic polynomial output changes as you move from 2×2 to 4×4 matrices in this calculator.

Matrix size Polynomial degree Typical form of p(λ) Trace / determinant relationship Typical use cases
2×2 2 (quadratic) λ² − (tr A) λ + det(A) Coefficient of λ is − tr A; constant term is det(A). Intro linear algebra, simple dynamical systems, 2-state Markov chains.
3×3 3 (cubic) λ³ − (tr A) λ² + s λ − det(A) Coefficient of λ² is − tr A; constant term is − det(A); middle coefficient involves traces and 2×2 minors. Three-dimensional systems, vibration modes, 3-state Markov chains.
4×4 4 (quartic) λ⁴ + c₁ λ³ + c₂ λ² + c₃ λ + c₄ Coefficients c₁, …, c₄ are combinations of traces and minors, computed algorithmically. Small control systems, 4-variable models, compact test cases in numerical linear algebra.

How to Use This Characteristic Polynomial Calculator

  1. Select the matrix size (2×2, 3×3, or 4×4) from the Matrix Size menu.
  2. Enter each matrix entry as a decimal number. You can use negative numbers and decimals like -1.5 or 2.75.
  3. Check that all fields are filled for the chosen size. If you change the dimension, the input grid will adjust.
  4. Click Compute Polynomial to generate p(λ).
  5. Optionally use the Copy Result button to paste the polynomial into your notes, reports, or another tool (for example, a root finder or eigenvalue calculator).

The result is displayed in descending powers of λ with coefficients simplified numerically. If any required input is missing or invalid, the calculator will display an error so you can correct it and try again.

Characteristic Polynomial Assumptions and Limitations

To keep the characteristic polynomial calculator fast and focused, it makes several assumptions:

If you need exact symbolic expressions (for example, with square roots or rational coefficients), you may want to use a computer algebra system in addition to this numeric calculator.

Who Uses This Characteristic Polynomial Calculator?

This calculator is useful whenever you need a characteristic polynomial for a small real matrix and want to avoid expanding det(A − λI) by hand.

It is especially helpful for:

In practice, the calculator is a quick check on algebra homework, a compact sanity check in analysis, and a convenient bridge from the matrix entries to the polynomial that governs the eigenvalues.

Enter the selected matrix here to compute its characteristic polynomial.
Enter the matrix entries to compute the characteristic polynomial.

Use decimal numbers for the matrix entries; leave fields blank only if you plan to switch dimensions before calculating.

Arcade Mini-Game: Characteristic Polynomial Input Check

Use this quick arcade run to practice spotting matrix setup mistakes—such as missing entries or a dimension mismatch—before you compute a characteristic polynomial.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful matrix settings and avoid bad assumptions about the polynomial.

Characteristic polynomial status messages will appear here.