Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find the Characteristic Polynomial

The characteristic polynomial of a square matrix AA is p(λ)=det⁡(A−λI)p(\lambda) = \det(A - \lambda I). Subtract λ\lambda from every diagonal entry, take the determinant and expand: the result is a polynomial of degree nn whose roots are the eigenvalues.

Recognize the task

The question asks for the characteristic polynomial or the characteristic equation of a square matrix, or it is the first step toward eigenvalues: (4−211)\begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix}, a triangular 3×33 \times 3, a full 3×33 \times 3 with no zeros. Test: the matrix must be square; a 2×32 \times 3 matrix has no characteristic polynomial.
The polynomial is defined in The Characteristic Polynomial; it comes from rewriting Av=λvA\mathbf{v} = \lambda\mathbf{v} as the homogeneous system (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}.

Ways to do it

2×2: trace and determinant2×2 shortcut
p(λ)=λ2−tr⁡(A) λ+det⁡(A)p(\lambda) = \lambda^2 - \operatorname{tr}(A)\,\lambda + \det(A)
Read the trace and the determinant off the matrix; this is the 2×2 characteristic polynomial.
Expand the determinantany size
p(λ)=det⁡(A−λI)p(\lambda) = \det(A - \lambda I)
Expand by cofactors along the row or column with the most zeros, as in cofactor expansion.
Triangular matrixread the diagonal
p(λ)=(a11−λ)(a22−λ)⋯(ann−λ)p(\lambda) = (a_{11} - \lambda)(a_{22} - \lambda)\cdots(a_{nn} - \lambda)
A−λIA - \lambda I stays triangular, and the determinant of a triangular matrix is the product of its diagonal.

Steps

StepOn A=(4−211)A = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix}
1Check that the matrix is square. Only an n×nn \times n matrix has a characteristic polynomial; its degree is nn.2×22 \times 2, so pp has degree 22
2Subtract λ\lambda down the diagonal. Only the diagonal entries change; the off-diagonal entries stay as they are.A−λI=(4−λ−211−λ)A - \lambda I = \begin{pmatrix} 4 - \lambda & -2 \\ 1 & 1 - \lambda \end{pmatrix}
3Take the determinant. For 2×22 \times 2, multiply the diagonal and subtract the product of the off-diagonal entries. For 3×33 \times 3, expand along the row or column with the most zeros.(4−λ)(1−λ)−(−2)(1)(4 - \lambda)(1 - \lambda) - (-2)(1)
4Expand and check the coefficients. Collect powers of λ\lambda. Check: the λn−1\lambda^{n-1} coefficient is ±tr⁡(A)\pm\operatorname{tr}(A) and the constant term is p(0)=det⁡(A)p(0) = \det(A).p(λ)=λ2−5λ+6p(\lambda) = \lambda^2 - 5\lambda + 6; tr⁡(A)=5\operatorname{tr}(A) = 5, det⁡(A)=6\det(A) = 6 ✓

Worked examples

Example 1 · trace and determinant

2×2
A=(1331)A = \begin{pmatrix} 1 & 3 \\ 3 & 1 \end{pmatrix}: tr⁡(A)=2\operatorname{tr}(A) = 2, det⁡(A)=1−9=−8\det(A) = 1 - 9 = -8
read both off the matrix
p(λ)=λ2−2λ−8=(λ−4)(λ+2)p(\lambda) = \lambda^2 - 2\lambda - 8 = (\lambda - 4)(\lambda + 2)
plug into the 2×2 formula

Example 2 · a triangular matrix

3×3 shortcut
A=(35−10−14002)A = \begin{pmatrix} 3 & 5 & -1 \\ 0 & -1 & 4 \\ 0 & 0 & 2 \end{pmatrix} is upper triangular
zeros below the diagonal
p(λ)=(3−λ)(−1−λ)(2−λ)p(\lambda) = (3 - \lambda)(-1 - \lambda)(2 - \lambda)
product of the diagonal entries

Example 3 · cofactor expansion

3×3 full
A=(211121112)A = \begin{pmatrix} 2 & 1 & 1 \\ 1 & 2 & 1 \\ 1 & 1 & 2 \end{pmatrix}
no zeros: expand along row 1
p=(2−λ)[(2−λ)2−1]−[(2−λ)−1]+[1−(2−λ)]p = (2 - \lambda)[(2 - \lambda)^2 - 1] - [(2 - \lambda) - 1] + [1 - (2 - \lambda)]
signs +,−,++, -, +
=(2−λ)(λ−1)(λ−3)+2(λ−1)= (2 - \lambda)(\lambda - 1)(\lambda - 3) + 2(\lambda - 1)
factor each bracket
p(λ)=−(λ−1)2(λ−4)=−λ3+6λ2−9λ+4p(\lambda) = -(\lambda - 1)^2(\lambda - 4) = -\lambda^3 + 6\lambda^2 - 9\lambda + 4
check: trace 66, p(0)=det⁡(A)=4p(0) = \det(A) = 4
Check a characteristic polynomial in the matrix calculator.

See it happen

A number λ\lambda is an eigenvalue exactly when A−λIA - \lambda I squashes some nonzero vector to 0\mathbf{0}, and that happens exactly when its determinant, the area or volume scale factor, is zero. The characteristic polynomial tracks that scale factor as λ\lambda slides along the number line; its roots are the values where the space collapses. Watch it happen in the eigenvalues and eigenvectors visualizer.

Common mistakes

Subtracting λ from every entry

✗ det⁡(4−λ−2−λ1−λ1−λ)\det\begin{pmatrix} 4 - \lambda & -2 - \lambda \\ 1 - \lambda & 1 - \lambda \end{pmatrix}
✓ λI\lambda I has λ\lambda only on the diagonal: det⁡(4−λ−211−λ)\det\begin{pmatrix} 4 - \lambda & -2 \\ 1 & 1 - \lambda \end{pmatrix}

Wrong sign on the trace term

✗ p(λ)=λ2+5λ+6p(\lambda) = \lambda^2 + 5\lambda + 6
✓ p(λ)=λ2−5λ+6p(\lambda) = \lambda^2 - 5\lambda + 6
The wrong sign gives the roots −2,−3-2, -3 instead of the eigenvalues 2,32, 3.

Mixing the two conventions

✗ det⁡(A−λI)=λ3−6λ2+9λ−4\det(A - \lambda I) = \lambda^3 - 6\lambda^2 + 9\lambda - 4 for the 3×33 \times 3 above
✓ det⁡(A−λI)=−λ3+6λ2−9λ+4\det(A - \lambda I) = -\lambda^3 + 6\lambda^2 - 9\lambda + 4; the other sign is det⁡(λI−A)\det(\lambda I - A)
For odd nn the two conventions differ by a sign. The roots are the same.

Multiplying out too early

✗ expand (2−λ)[(2−λ)2−1](2 - \lambda)[(2 - \lambda)^2 - 1] into a cubic, then hunt for roots
✓ keep common factors such as (λ−1)(\lambda - 1) visible while you expand