Characteristic Polynomial Calculator - Matrix Polynomial Solver
Use this characteristic polynomial calculator to expand det(A − λI) for a 2x2 or 3x3 matrix and get the coefficients, trace, and equation form.
Characteristic Polynomial Calculator
Results
What Is Characteristic Polynomial Calculator?
A characteristic polynomial calculator turns the matrix entries of a 2x2 or 3x3 square matrix A into the polynomial p(λ) = det(A − λI), where λ is a scalar and I is the identity matrix. Use it to read off eigenvalues, apply the Cayley-Hamilton theorem, or check diagonalizability.
- • Eigenvalue problem setup: Generate the polynomial whose roots are the eigenvalues of A so you can hand the equation to a quadratic or cubic solver.
- • Linear algebra coursework: Compute the characteristic polynomial for homework, exam, or textbook exercises that ask for tr(A), det(A), and the polynomial itself.
- • Cayley-Hamilton check: Use the polynomial coefficients to substitute A into p(A) and confirm that p(A) equals the zero matrix.
- • Matrix classification: Compare two similar matrices by reading their characteristic polynomials.
The polynomial produced by det(A − λI) carries the most important scalar information about A. Under this convention the trace of A fixes the λ^(n−1) coefficient with a sign that alternates by degree: −tr(A) for 2x2 and +tr(A) for 3x3. The constant term is det(A) up to a sign, and the roots are the eigenvalues.
For a 3x3 matrix the trace, the trace of A², and the determinant fix all three coefficients, keeping the calculation small. The characteristic polynomial calculator applies that recipe and shows the intermediate values.
Once the characteristic polynomial is in hand, the polynomial division calculator can simplify a factored or expanded form when you need to divide one polynomial by another.
How Characteristic Polynomial Calculator Works
The calculator builds the shifted matrix A − λI, takes its determinant, and rewrites the result as a polynomial in λ. For 2x2 and 3x3 inputs it uses the trace, the trace of A², and the determinant as shortcuts instead of expanding the determinant by hand.
- Matrix A: The square matrix whose entries you entered. In 2x2 mode only a, b, c, d are used; in 3x3 mode all nine entries matter.
- Identity matrix I: The matching-size identity. λI scales each diagonal entry by λ, producing the polynomial powers in det(A − λI).
- Scalar λ: The variable of the polynomial. Setting p(λ) = 0 gives the eigenvalue equation.
- Trace of A: Sum of the diagonal entries of A, written tr(A). It appears as the λ^(n−1) coefficient up to sign.
- Trace of A²: Sum of the diagonal entries of A². Only used in the 3x3 case to compute the λ coefficient.
- Determinant of A: det(A). For both sizes it is the constant term of p(λ) up to sign.
The 2x2 result follows from expanding the determinant of [[a − λ, b], [c, d − λ]] directly. For 3x3, the trace shortcut is faster because it skips the Laplace expansion.
The polynomial is written in the monic, sign-stable form. For 2x2 the leading coefficient of λ² is 1; for 3x3 the leading coefficient of λ³ is −1, matching det(A − λI).
2x2 matrix [[1, 2], [3, 4]]
A = [[1, 2], [3, 4]], so a=1, b=2, c=3, d=4.
tr(A) = 5, det(A) = −2, so p(λ) = λ² − 5λ − 2.
p(λ) = λ² − 5λ − 2, eigenvalues (5 ± √33)/2.
Solve p(λ) = 0 to read the eigenvalues of A.
3x3 diagonal matrix diag(1, 2, 3)
A = [[1, 0, 0], [0, 2, 0], [0, 0, 3]], so only a, e, i are nonzero.
tr(A) = 6, tr(A²) = 14, det(A) = 6, so p(λ) = −λ³ + 6λ² − 11λ + 6.
p(λ) = −λ³ + 6λ² − 11λ + 6 = −(λ − 1)(λ − 2)(λ − 3).
The roots 1, 2, 3 match the diagonal entries, as expected for a diagonal matrix.
According to Wikipedia, the characteristic polynomial of a square matrix A is defined as p(λ) = det(A − λI), and for a 2x2 matrix it expands to λ² − tr(A) λ + det(A).
For a 2x2 matrix the characteristic polynomial is a quadratic, so the quadratic formula calculator gives the eigenvalues directly once the coefficients are known.
Key Concepts Explained
These four ideas appear in every characteristic polynomial calculation, so it helps to keep them separate before you use the result.
Trace and determinant shortcut
Under the det(A − λI) convention used here, the trace of A fixes the λ^(n−1) coefficient (with a sign: −tr(A) for 2x2, +tr(A) for 3x3), and det(A) gives the constant term. tr(A²) is the only extra scalar needed to fix the middle coefficient in 3x3.
Eigenvalues as roots
The roots of p(λ) = 0 are the eigenvalues of A. For 2x2 use the quadratic formula; for 3x3 use a cubic solver or factoring.
Singular vs invertible
If det(A) = 0, then 0 is a root of p(λ), which means A is singular and has at least one zero eigenvalue. The polynomial still computes normally, with a constant term of 0.
Characteristic vs minimal polynomial
The characteristic polynomial always has degree n. The minimal polynomial is the polynomial of lowest degree that satisfies p(A) = 0, and it divides the characteristic polynomial.
The Cayley-Hamilton theorem says A satisfies its own characteristic polynomial, so p(A) is the zero matrix.
Eigenvectors pair with eigenvalues, and the vector magnitude calculator gives a quick way to confirm the length of a returned eigenvector.
How to Use This Calculator
The calculator works with integer, decimal, and negative entries; it does not need a determinant computed in advance.
- 1 Pick the matrix size: Choose 2x2 or 3x3. The output panel always shows every coefficient so the comparison between sizes stays consistent.
- 2 Enter the matrix entries: Type the entries of A in row order. For 2x2 mode the calculator reads a, b, c, d and ignores the rest.
- 3 Read the polynomial: The primary output is p(λ) as a single-line polynomial in λ, ready to copy into a homework or report.
- 4 Read trace, tr(A²), and det: Use these three scalars to verify your own by-hand calculation or to plug into a different formula.
- 5 Solve p(λ) = 0 to find eigenvalues: For 2x2 use the quadratic formula; for 3x3 factor the cubic or feed the coefficients to a cubic solver.
- 6 Apply the Cayley-Hamilton identity: Substitute A into p(A) to confirm p(A) equals the zero matrix, a useful sanity check for matrix properties.
If A = [[0, −1, 0], [1, 0, 0], [0, 0, 1]], the calculator returns p(λ) = −λ³ + λ² − λ + 1. Factoring the cubic gives eigenvalues 1, i, and −i, matching a 90-degree rotation in the xy plane plus a fixed z axis. The polynomial graphing calculator sketches the curve.
Benefits of Using This Calculator
The main benefit of this characteristic polynomial calculator is replacing a 3x3 determinant expansion in λ with a tool that returns the same polynomial and its supporting scalars.
- • Saves a determinant expansion: A 3x3 determinant of A − λI by hand has six signed 2x2 sub-determinants, and the calculator skips that work.
- • Catches sign and term errors: Sign mistakes between the λ term and the constant term are easy to make. The calculator renders the polynomial in the standard monic form, so the mistake is visible immediately.
- • Pairs with the quadratic formula: For 2x2 inputs the polynomial feeds directly into the quadratic formula, so the characteristic polynomial is the first step toward the eigenvalues.
- • Supports Cayley-Hamilton checks: The coefficients are exactly what you need to substitute A into p(A) and verify the theorem, a common textbook exercise.
- • Works for negative and zero entries: The shortcut formulas do not require positive or nonzero entries, so singular matrices, rotations, and idempotent matrices are handled the same way.
Use the same matrix size selector for repeated problems so comparisons stay direct. Switching between 2x2 and 3x3 lets you sanity-check that the trace shortcut matches the brute-force expansion in the smaller case.
If a 3x3 polynomial is messy to factor by hand, the characteristic polynomial output is a clean input for a cubic solver.
Reading the coefficients off the result panel is also faster than retyping the matrix entries into a separate polynomial tool, so the calculator fits inside a wider workflow that ends at the eigenvalues.
A 3x3 characteristic polynomial often lives next to a cross-product calculation, and the cross product calculator handles the 3D vector side of that exercise.
Factors That Affect Your Results
Three matrix properties and two input choices drive the result, and the output changes in ways worth understanding.
Trace of A
Sets the λ^(n−1) coefficient up to sign. A larger trace shifts the centroid of the eigenvalue set.
Trace of A²
Only used in 3x3 mode. It fixes the λ coefficient together with tr(A) and decides how the roots spread.
Determinant of A
Sets the constant term up to sign. A zero determinant means A is singular and 0 is a root of the polynomial.
Matrix size selector
Switches between the 2x2 and 3x3 formulas. Use 2x2 for a quick check, 3x3 when there is a third row or column.
Input convention
The polynomial uses the det(A − λI) convention, so the 3x3 leading term is −λ³. If your textbook uses det(λI − A), flip the sign of every coefficient by hand.
- • The calculator only handles 2x2 and 3x3 matrices. For 4x4 and larger, Newton's identities still relate tr(A), tr(A²), tr(A³), tr(A⁴), and det(A) to the coefficients, but the formulas become substantially more complex, so a symbolic or numeric eigenvalue solver is usually the right next step.
- • The output is the characteristic polynomial itself, not the eigenvalues. You still need a quadratic or cubic solver (or a factoring step) to read the roots when the polynomial does not factor over the rationals.
- • The result assumes real-valued matrix entries. If the entries are complex, the determinant and trace formulas still apply but the displayed scalars should be read as complex values.
If the matrix has repeating eigenvalues, the characteristic polynomial still has the right form, but the minimal polynomial is of lower degree. That difference matters for matrix exponentiation and diagonalizability, though it does not change the characteristic polynomial itself.
According to Wolfram MathWorld, the coefficients of the characteristic polynomial can be written using tr(A), tr(A²), and det(A), so the n×n polynomial becomes λ^n − c1 λ^(n−1) + c2 λ^(n−2) − … + (−1)^n det(A).
According to Wikipedia Cayley-Hamilton, every square matrix satisfies its own characteristic polynomial, so p(A) is the zero matrix.
Frequently Asked Questions
Q: What is the characteristic polynomial of a matrix?
A: For a square matrix A, the characteristic polynomial is p(λ) = det(A − λI), where I is the identity matrix and λ is a scalar. The roots of p(λ) = 0 are the eigenvalues of A, and the coefficients of the polynomial are the trace, the second trace, and the determinant of A.
Q: How do you find the characteristic polynomial of a 2x2 matrix?
A: Subtract λ from the two diagonal entries, take the determinant, and expand. The result is λ² − (a + d) λ + (ad − bc) for A = [[a, b], [c, d]], where the coefficient of λ is the negative of the trace and the constant term is the determinant.
Q: What is the formula for the characteristic polynomial of a 3x3 matrix?
A: Use p(λ) = −λ³ + tr(A) λ² − ((tr(A)² − tr(A²)) / 2) λ + det(A). The three pieces tr(A), tr(A²), and det(A) fix every coefficient without expanding the full determinant in λ.
Q: How is the characteristic polynomial related to eigenvalues?
A: Every eigenvalue λ of A is a root of p(λ) = 0. The converse is also true: every root of the characteristic polynomial is an eigenvalue of A, so the polynomial completely describes the spectrum of A.
Q: Can a characteristic polynomial have complex coefficients?
A: Only if the matrix has complex entries. For real-valued A, the coefficients of the characteristic polynomial are always real numbers, even when the eigenvalues themselves are complex conjugate pairs.
Q: What is the difference between the characteristic polynomial and the minimal polynomial?
A: The characteristic polynomial always has degree n for an n×n matrix. The minimal polynomial is the polynomial of lowest degree that satisfies p(A) = 0, and it always divides the characteristic polynomial.