Math
Characteristic Polynomial Calculator
Enter a square matrix to get its characteristic polynomial in λ with exact rational coefficients.
The calculator shows the λ² - (trace)λ + det shortcut for 2 x 2 matrices and the Faddeev-LeVerrier recurrence for larger ones, checks the coefficients against the trace and determinant, factors the polynomial when its roots are rational, lists the eigenvalues, and verifies p(A) = 0.
One row per line. Separate entries with spaces or commas. Integers, decimals, and fractions like 1/3 all work. Up to 8 x 8.
Try an example
Result
Characteristic polynomial
—
- Degree
- —
- Trace
- —
- Determinant
- —
- Roots (eigenvalues)
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the characteristic polynomial is
The characteristic polynomial of an n x n A rectangular grid of numbers arranged in rows and columns. A is p(λ) = det(λI - A). It is a monic polynomial of degree n whose roots are exactly the A number saying how much a matrix stretches vectors along one special direction. of A. Its The number multiplying a variable, like the 3 in 3x. encode the trace, the One number computed from a square matrix that tells you whether it can be inverted., and the sums of principal minors of A.
How the calculator computes it exactly
Expanding det(λI - A) symbolically is tedious beyond 3 x 3. The Faddeev-LeVerrier algorithm instead builds the coefficients from traces of matrix products: starting with M_1 = I and c_{n-1} = -tr(A), it repeats M_k = A·M_{k-1} + c_{n-k+1}·I and c_{n-k} = -tr(A·M_k)/k. Every step uses only matrix multiplication and traces, so the coefficients come out as exact fractions.
How to use it
- Enter a square matrix, one row per line.
- Read p(λ) in the header, then the coefficient list and the factored form if the roots are rational.
- Use the trace and determinant checks to confirm the λⁿ⁻¹ coefficient and constant term.
- Open Show the work for the recurrence steps and the Cayley-Hamilton verification.
How to read the answer
- Set p(λ) = 0 to get the characteristic equation; its solutions are the eigenvalues.
- A repeated factor (λ - r)^k means r has algebraic multiplicity k.
- The sign convention here is det(λI - A), which is monic. Some books use det(A - λI); the two differ by a factor of (-1)ⁿ and have the same roots.
- Cayley-Hamilton: substituting A for λ gives the zero matrix, which is why A⁻¹ can be written as a polynomial in A.
Common mistakes
- Forgetting to negate the off-diagonal entries when forming λI - A.
- Mixing up the two sign conventions and reporting -p(λ).
- Dropping the middle coefficient of a 3 x 3 polynomial (the sum of the three 2 x 2 principal minors).
- Assuming the polynomial always factors over the rationals; A number that cannot be written as a fraction of two whole numbers, like π or √2. and complex roots are common.
How to type a matrix into this calculator
- Put each row on its own line. Separate the entries in a row with spaces or commas: 2 1 1 or 2, 1, 1.
- Fractions such as 1/3 and decimals such as 0.25 are accepted and kept exact, so 1/3 stays 1/3 instead of becoming 0.3333.
- Every row must have the same number of entries. A row with a missing entry produces a clear error instead of a wrong answer.
- The largest size supported is 8 x 8. Brackets and semicolons are ignored, so [1 2; 3 4] works too.
Worked examples
3 x 3 with integer roots
A = [2 0 0; 0 3 4; 0 4 9] → (λ - 1)(λ - 2)(λ - 11)
Characteristic polynomial
λ^3 - 14λ^2 + 35λ - 22
2 x 2 shortcut
A = [2 1; 1 2] → λ² - 4λ + 3
Characteristic polynomial
λ^2 - 4λ + 3
Complex roots
Rotation A = [0 -1; 1 0] → λ² + 1
Characteristic polynomial
λ^2 + 1
Repeated root
A = [1 1; 0 1] → (λ - 1)²
Characteristic polynomial
λ^2 - 2λ + 1
Fractions
A = [1/2 0; 0 1/3] → λ² - (5/6)λ + 1/6
Characteristic polynomial
λ^2 - 5/6λ + 1/6
Not square
A 2 x 3 matrix has no characteristic polynomial
Characteristic polynomial
Error
Frequently asked questions
What is the characteristic polynomial used for?+
Its roots are the eigenvalues, so it is the first step in eigenvalue problems, diagonalization, and stability analysis of systems of differential equations.
Is it det(λI - A) or det(A - λI)?+
Both appear in textbooks. They differ by a factor of (-1)ⁿ and have identical roots. This calculator uses det(λI - A) so the leading coefficient is always +1.
How do I find the characteristic polynomial of a 2 x 2 matrix quickly?+
Use λ² - (trace)λ + det. For [2 1; 1 2] the trace is 4 and the determinant is 3, giving λ² - 4λ + 3.
What does the Cayley-Hamilton theorem say?+
Every square matrix satisfies its own characteristic equation: p(A) = 0. The calculator verifies this by substituting A into the polynomial.
Why are the coefficients fractions sometimes?+
If A has fractional entries, the traces and determinants used to build p(λ) are fractions too. The calculator keeps them exact rather than rounding.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
Eigenvalues and Eigenvectors Calculator
Find the eigenvalues and eigenvectors of a square matrix up to 8 x 8. Shows the characteristic polynomial, exact eigenvalues (including fractions, square roots, and complex pairs), eigenvector bases, multiplicities, and whether the matrix is diagonalizable.
Matrix Determinant Calculator
Find the determinant of any square matrix up to 8 x 8 with exact fractions. Shows cofactor expansion along any row or column for 3 x 3 (with a rule-of-Sarrus check), row-reduction steps for larger matrices, and tells you whether the matrix is invertible.
Matrix Trace Calculator
Find the trace of a square matrix up to 8 x 8 (the sum of its diagonal entries) with exact fractions. Shows the running sum, the eigenvalue check trace = λ1 + … + λn, the determinant, tr(A²), and the trace properties.
Matrix Power Calculator
Raise a square matrix up to 8 x 8 to any integer power from -30 to 30 with exact fractions. Shows each intermediate power, handles A^0 = I and negative powers through the inverse, and checks det(A^k) = det(A)^k.
Quadratic Formula Calculator
Solve ax^2 + bx + c = 0 with exact simplified radicals, reduced fractions, or complex roots, plus discriminant, vertex, factored and vertex forms, a graph, and every step.
Matrix Inverse Calculator
Invert any square matrix up to 8 x 8 with exact fractions. Gauss-Jordan elimination on [A | I] with every row operation shown, the adjugate route for small matrices, a singular-matrix explanation, and an A·A⁻¹ = I check.
Last updated: September 4, 2026