terican

Last verified · v1.0

Calculator · math

Characteristic Polynomial Calculator

Calculate p(λ) = det(λI−A) for 2×2 and 3×3 matrices. Enter matrix entries to get the characteristic polynomial and evaluate it at any value of λ.

FreeInstantNo signupOpen source

Inputs

p(λ)

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

p(λ)

The formula

How the
result is
computed.

What Is the Characteristic Polynomial?

The characteristic polynomial of a square matrix A is the polynomial p(λ) = det(λI − A), where I is the identity matrix of matching dimension and λ is a scalar variable. The values of λ that satisfy p(λ) = 0 are the eigenvalues of A. Eigenvalues appear throughout applied mathematics and engineering: they govern the stability of dynamic systems, the natural resonant frequencies of structures, the convergence of iterative algorithms, and the principal components of high-dimensional data sets.

The Core Formula

For an n×n matrix A, forming the matrix λI − A and computing its determinant always produces a monic polynomial of degree n — meaning the leading coefficient of λⁿ equals 1. Two coefficients carry special meaning: the coefficient of λⁿ⁻¹ equals −tr(A), and the constant term equals (−1)ⁿ det(A). These relationships connect the polynomial directly to the trace and determinant of the matrix.

2×2 Matrix: Quadratic Characteristic Polynomial

Given a 2×2 matrix A with entries a₁₁, a₁₂, a₂₁, a₂₂, the matrix λI − A has the form [[λ − a₁₁, −a₁₂], [−a₂₁, λ − a₂₂]]. Expanding its 2×2 determinant yields:

p(λ) = (λ − a₁₁)(λ − a₂₂) − a₁₂a₂₁ = λ² − (a₁₁ + a₂₂)λ + (a₁₁a₂₂ − a₁₂a₂₁)

This condenses to the elegant identity p(λ) = λ² − tr(A)·λ + det(A). Example: For A = [[3, 1], [2, 4]], tr(A) = 7 and det(A) = 10, giving p(λ) = λ² − 7λ + 10 = (λ − 2)(λ − 5). The eigenvalues are λ = 2 and λ = 5. Setting up the system (A − 2I)v = 0 then yields the associated eigenvectors.

3×3 Matrix: Cubic Characteristic Polynomial

For a 3×3 matrix, cofactor expansion of det(λI − A) along the first row produces a cubic polynomial. Let M₁₁, M₂₂, M₃₃ denote the three principal 2×2 minors — the 2×2 determinants formed by deleting row i and column i from A for i = 1, 2, 3. The characteristic polynomial is:

p(λ) = λ³ − tr(A)·λ² + (M₁₁ + M₂₂ + M₃₃)·λ − det(A)

Example: For the upper-triangular matrix A = [[2, 1, 0], [0, 3, 1], [0, 0, 5]], the diagonal entries are already the eigenvalues, giving p(λ) = (λ − 2)(λ − 3)(λ − 5) = λ³ − 10λ² + 31λ − 30. For a general (non-triangular) 3×3 matrix, all three principal minors must be evaluated before collecting like powers of λ.

How to Find Eigenvalues

  • 2×2 matrices: Apply the quadratic formula to p(λ) = 0. The discriminant tr(A)² − 4det(A) determines whether eigenvalues are real (positive discriminant), repeated (zero discriminant), or complex conjugate pairs (negative discriminant).
  • 3×3 matrices: Factor the cubic using the rational root theorem — test integer divisors of the constant term — then use synthetic division to reduce to a quadratic for the remaining roots.
  • Once each eigenvalue λᵢ is known, substitute into (A − λᵢI)v = 0 and solve for the eigenvector v.

Applications

  • Ordinary differential equations: The eigenvalues of a coefficient matrix determine whether solutions grow exponentially, decay, or oscillate (see MSU ODE notes).
  • Structural mechanics: Natural vibration frequencies equal the square roots of the stiffness-to-mass eigenvalue ratios.
  • Principal Component Analysis: Eigenvalues of the covariance matrix quantify variance along each principal axis.
  • Matrix exponential: Eigenvalue decomposition is a primary tool for computing eᴬᵗ in control and systems theory, as surveyed by Moler and Van Loan (2003).

Methodology and Sources

This calculator forms λI − A explicitly for the selected matrix size, then evaluates the determinant via cofactor expansion following the standard definition in Linear Algebra (UC Davis Mathematics). The 2×2 and 3×3 formulas are validated against the worked examples in Eigenvalues and Eigenvectors (GVSU Open Textbook) and the three-dimensional eigenpair derivations at Eigenpairs in 3D (University of Tennessee Knoxville). All polynomial coefficients are returned in exact form without intermediate rounding.

Reference

Frequently asked questions

What is the characteristic polynomial of a matrix?
The characteristic polynomial of an n×n matrix A is the degree-n polynomial p(λ) = det(λI − A), where I is the identity matrix and λ is a scalar variable. Its roots are the eigenvalues of A. For a 2×2 matrix the result is a quadratic; for a 3×3 matrix, a cubic. The coefficient of λⁿ⁻¹ equals the negative trace of A, and the constant term equals (−1)ⁿ times the determinant of A, linking the polynomial directly to these fundamental matrix quantities.
How do you find eigenvalues using the characteristic polynomial?
Set p(λ) = 0 and solve for λ. For a 2×2 matrix, apply the quadratic formula to λ² − tr(A)λ + det(A) = 0. For example, A = [[3, 1], [2, 4]] gives λ² − 7λ + 10 = 0, so λ = 2 and λ = 5. For a 3×3 matrix, factor the resulting cubic by testing rational roots (integer divisors of the constant term), then use synthetic division to find all three eigenvalues.
What is the characteristic polynomial formula for a 2×2 matrix?
For a 2×2 matrix A = [[a, b], [c, d]], the characteristic polynomial is p(λ) = λ² − (a + d)λ + (ad − bc), which equals λ² − tr(A)λ + det(A). For A = [[5, 2], [1, 4]], tr(A) = 9 and det(A) = 18, giving p(λ) = λ² − 9λ + 18 = (λ − 3)(λ − 6). The eigenvalues are therefore λ = 3 and λ = 6, obtainable directly from factoring or the quadratic formula.
How is the characteristic polynomial of a 3×3 matrix computed step by step?
First form the 3×3 matrix λI − A by subtracting each diagonal entry aᵢᵢ from λ and negating all off-diagonal entries. Then expand its determinant via cofactor expansion along any row or column. Collecting the result by powers of λ gives the cubic p(λ) = λ³ − tr(A)λ² + (M₁₁ + M₂₂ + M₃₃)λ − det(A), where M₁₁, M₂₂, M₃₃ are the three principal 2×2 minors formed by deleting each diagonal row-column pair from A.
Can the characteristic polynomial have complex or repeated roots?
Yes. When the discriminant of a 2×2 characteristic polynomial tr(A)² − 4det(A) is negative, the eigenvalues are a complex conjugate pair. For example, the rotation matrix A = [[0, −1], [1, 0]] yields p(λ) = λ² + 1, with roots λ = i and λ = −i. Repeated roots occur when the discriminant equals zero, as with A = [[2, 1], [0, 2]], which gives p(λ) = (λ − 2)² and a single repeated eigenvalue λ = 2.
What is the Cayley-Hamilton theorem and how does it relate to the characteristic polynomial?
The Cayley-Hamilton theorem states that every square matrix satisfies its own characteristic polynomial: substituting the matrix A for the scalar λ in p(λ) yields the zero matrix, i.e., p(A) = 0. For a 2×2 matrix with p(λ) = λ² − 7λ + 10, the theorem guarantees A² − 7A + 10I = 0. This result enables efficient computation of matrix powers and inverses — for instance, A² = 7A − 10I eliminates the need to multiply the matrix by itself directly.