Free Characteristic Polynomial Calculator

[
]

Characteristic Polynomial

Select a matrix size, enter all entries, then click Calculate

The characteristic polynomial is a fundamental construct in linear algebra, linking a square matrix to its eigenvalues. With the Characteristic Polynomial Calculator (a free online matrix polynomial solver), you can instantly find the characteristic polynomial for 2×2, 3×3, and 4×4 matrices, saving the tedious manual expansion. In this article, we will revisit the definition, provide step‑by‑step formulas for various sizes, and discuss key properties — all while demonstrating how the solver makes the process effortless.

Definition of the Characteristic Polynomial

For an n×nn \times n matrix AA, the characteristic polynomial in variable λ\lambda is defined as:

p(λ)=det⁡(A−λI)p(\lambda) = \det(A - \lambda I)

where II is the identity matrix of size nn and det⁡\det denotes the determinant. Because the roots of p(λ)p(\lambda) are precisely the eigenvalues of AA, this polynomial is also referred to as the eigenvalue polynomial. Some textbooks adopt p(λ)=det⁡(λI−A)p(\lambda) = \det(\lambda I - A) instead; this alternative version equals (−1)ndet⁡(A−λI)(-1)^n \det(A - \lambda I). Consequently, the two polynomials are identical when nn is even, and have opposite signs for all coefficients when nn is odd. Importantly, the eigenvalues remain unaffected by the sign convention.

How to Find the Characteristic Polynomial with the Solver

Using this calculator is straightforward:

  1. Choose the matrix size: 2×2, 3×3, or 4×4.
  2. Enter the entries of the matrix row by row into the input fields.
  3. The calculator displays the polynomial immediately.
  4. Optionally, toggle between the A−λIA - \lambda I and λI−A\lambda I - A conventions by changing the "definition variant" setting.

This eliminates the need to memorize complex formulas, especially for larger matrices.

Characteristic Polynomial of a 2×2 Matrix

For a general 2×22 \times 2 matrix (abcd)\begin{pmatrix} a & b \\ c & d \end{pmatrix}, the characteristic polynomial expands to:

(a−λ)(d−λ)−bc=λ2−(a+d)λ+(ad−bc).(a - \lambda)(d - \lambda) - bc = \lambda^2 - (a + d)\lambda + (ad - bc).

It can be written compactly as λ2−tr⁡(A)λ+det⁡(A)\lambda^2 - \operatorname{tr}(A)\lambda + \det(A), where tr⁡(A)=a+d\operatorname{tr}(A) = a + d and det⁡(A)=ad−bc\det(A) = ad - bc.

Example: Take A=(2343)A = \begin{pmatrix} 2 & 3 \\ 4 & 3 \end{pmatrix}. Then tr⁡(A)=5\operatorname{tr}(A) = 5 and det⁡(A)=2⋅3−3⋅4=−6\det(A) = 2\cdot 3 - 3\cdot 4 = -6. Hence the characteristic polynomial is λ2−5λ−6\lambda^2 - 5\lambda - 6. Direct expansion using (2−λ)(3−λ)−3⋅4(2-\lambda)(3-\lambda) - 3\cdot 4 gives the same result, confirming the formula.

Characteristic Polynomial of a 3×3 Matrix

For a 3×33\times 3 matrix, expansion can be performed using the Rule of Sarrus or cofactor expansions. Consider the matrix:

A=(01223−1102).A = \begin{pmatrix} 0 & 1 & 2 \\ 2 & 3 & -1 \\ 1 & 0 & 2 \end{pmatrix}.

Compute det⁡(A−λI)\det(A - \lambda I):

det⁡(−λ1223−λ−1102−λ).\det\begin{pmatrix} -\lambda & 1 & 2 \\ 2 & 3-\lambda & -1 \\ 1 & 0 & 2-\lambda \end{pmatrix}.

Applying the Rule of Sarrus yields:

−λ(3−λ)(2−λ)+1⋅0⋅1+2⋅2⋅(−1)−1⋅(3−λ)⋅2−(−1)⋅0⋅(−λ)−(2−λ)⋅2⋅1,-\lambda(3-\lambda)(2-\lambda) + 1\cdot0\cdot1 + 2\cdot2\cdot(-1) - 1\cdot(3-\lambda)\cdot2 - (-1)\cdot0\cdot(-\lambda) - (2-\lambda)\cdot2\cdot1,

which simplifies to:

−λ3+5λ2−2λ−14.-\lambda^3 + 5\lambda^2 - 2\lambda - 14.

In general, for a 3×3 matrix with entries aija_{ij}, the characteristic polynomial can be expressed as:

−λ3+(a11+a22+a33)λ2−(sum of all principal 2×2 minors)λ+det⁡(A).-\lambda^3 + (a_{11}+a_{22}+a_{33})\lambda^2 - \bigl( \text{sum of all principal } 2\times 2 \text{ minors} \bigr)\lambda + \det(A).

The coefficient of λ2\lambda^2 is the trace, and the constant term is the determinant.

General Formula for n×nn \times n Matrices

For an n×nn \times n matrix, the characteristic polynomial takes the form:

p(λ)=(−1)nλn+(−1)n−1S1λn−1+⋯+(−1)kSn−kλk+⋯+Sn,p(\lambda) = (-1)^n \lambda^n + (-1)^{n-1} S_1 \lambda^{n-1} + \cdots + (-1)^k S_{n-k} \lambda^k + \cdots + S_n,

where SkS_k is the sum of all k×kk\times k principal minors of AA. In particular, S1=tr⁡(A)S_1 = \operatorname{tr}(A) and Sn=det⁡(A)S_n = \det(A). For matrices larger than 3×3, calculating these sums by hand becomes quickly impractical, making a characteristic polynomial solver invaluable.

Important Properties of the Characteristic Polynomial

  • Invertibility: A matrix is invertible if and only if the constant term of its characteristic polynomial (i.e., SnS_n) is non‑zero. This is equivalent to det⁡(A)≠0\det(A) \neq 0.
  • Algebraic Multiplicity: The multiplicity of an eigenvalue as a root of p(λ)p(\lambda) is called its algebraic multiplicity.
  • Transpose: AA and its transpose ATA^\mathsf{T} share the same characteristic polynomial.
  • Similarity: Similar matrices have identical characteristic polynomials, but the converse is not true. For example, the matrices (2102)\begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} and (2002)\begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} both have characteristic polynomial (λ−2)2(\lambda-2)^2, yet they are not similar because the first is not diagonalizable while the second is diagonal.
  • Cayley‑Hamilton Theorem: Every square matrix satisfies its own characteristic equation. That is, if you substitute AA for λ\lambda in p(λ)p(\lambda) (interpreting the constant term as cIcI), you obtain the zero matrix.

Illustration of Cayley‑Hamilton: For the earlier 2×2 matrix A=(2343)A = \begin{pmatrix}2 & 3 \\ 4 & 3\end{pmatrix} with characteristic polynomial λ2−5λ−6\lambda^2 - 5\lambda - 6, we have

A2=(16152021),5A=(10152015),6I=(6006).A^2 = \begin{pmatrix}16 & 15 \\ 20 & 21\end{pmatrix},\quad 5A = \begin{pmatrix}10 & 15 \\ 20 & 15\end{pmatrix},\quad 6I = \begin{pmatrix}6 & 0 \\ 0 & 6\end{pmatrix}.

Therefore,

A2−5A−6I=(16−10−615−15−020−20−021−15−6)=(0000),A^2 - 5A - 6I = \begin{pmatrix}16-10-6 & 15-15-0 \\ 20-20-0 & 21-15-6\end{pmatrix} = \begin{pmatrix}0 & 0 \\ 0 & 0\end{pmatrix},

confirming the theorem.

FAQ

1. What is the characteristic polynomial of a matrix?

The characteristic polynomial of an n×n matrix A is defined as p(λ)=det(A−λI). Its roots are the eigenvalues of A.

2. How do I find the characteristic polynomial of a 2x2 matrix?

For a 2x2 matrix [[a,b],[c,d]], the polynomial is λ²−(a+d)λ+(ad−bc), which equals λ²−tr(A)λ+det(A). Example: if A=[[2,3],[4,3]], the polynomial is λ²−5λ−6.

3. How do I find the characteristic polynomial of a 3x3 matrix?

You can compute det(A−λI) using the Rule of Sarrus or cofactor expansion. For example, using Sarrus on a 3x3 matrix yields a cubic polynomial. The calculator automates this process.

4. Does it matter which definition I use? (p(λ)=det(A−λI) vs det(λI−A))

Both definitions are common. They differ by a factor of (−1)^n, so the polynomials are identical for even n and have opposite signs for odd n. The eigenvalues (roots) are the same regardless of the sign convention.

5. What are the key properties of the characteristic polynomial?

Key properties: invertibility (matrix invertible iff constant term non-zero), algebraic multiplicity, transpose and similarity invariance, and the Cayley‑Hamilton theorem (a matrix satisfies its own polynomial).

How to Use

  1. Select the matrix size: 2x2, 3x3, or 4x4.
  2. Enter all the matrix entries in the grid of input fields.
  3. Click Calculate to see the characteristic polynomial and eigenvalues.