User Rating 0.0
Total Usage 0 times
[
]
Is this tool helpful?

Your feedback helps us improve.

About

The characteristic polynomial of a square matrix A encodes its eigenvalues as roots. Miscalculating it propagates errors into stability analysis, control system design, and principal component extraction. This tool computes det(λI A) using the Faddeev - LeVerrier algorithm, which recovers all n + 1 coefficients in O(n4) operations without symbolic expansion. Results are exact for integer entries and IEEE-754 accurate for decimal entries. The tool handles matrices from 1×1 up to 6×6.

Limitation: floating-point rounding may affect coefficients for ill-conditioned matrices with entries exceeding 108. For matrices up to 3×3, eigenvalues are computed analytically. For 4×4 and above, eigenvalues are approximated numerically via QR iteration on the companion matrix. Pro tip: verify results by checking that the sum of eigenvalues equals tr(A) and their product equals det(A).

characteristic polynomial matrix calculator eigenvalues linear algebra determinant Faddeev-LeVerrier

Formulas

The characteristic polynomial of an n × n matrix A is defined as:

p(λ) = det(λI A) = λn + cn1λn1 + + c1λ + c0

The Faddeev - LeVerrier algorithm computes the coefficients iteratively. Starting with M0 = 0 (zero matrix), at each step k = 1, 2, …, n:

Mk = A (Mk1 + cnk+1 I)
cnk = 1k tr(Mk)

Where p(λ) is the characteristic polynomial, λ is the eigenvalue parameter, I is the n × n identity matrix, A is the input square matrix, ck are the polynomial coefficients, tr() denotes the matrix trace (sum of diagonal elements), det() denotes the determinant, and Mk are intermediate matrices in the recurrence. The leading coefficient of λn is always 1 (monic polynomial).

Reference Data

Matrix SizePolynomial DegreeCoefficients CountFaddeev - LeVerrier StepsAnalytical RootsCommon Applications
1×1121DirectScalar eigenvalue
2×2232Quadratic formula2D transformations, coupled oscillators
3×3343Cardano's method3D rotations, stress tensors
4×4454Numerical (QR)Spacetime metrics, control systems
5×5565Numerical (QR)Quantum mechanics, graph Laplacians
6×6676Numerical (QR)Finite element analysis, PCA
Key Relationships
cn1tr(A) (negative trace)
c0(1)n det(A)
Cayley - Hamiltonp(A) = 0 (matrix satisfies its own polynomial)
Vieta's formulasλ1 ++ λn = tr(A)
Determinantλ1 λn = det(A)
Similar matricesShare the same characteristic polynomial
Symmetric real matrixAll eigenvalues are real
Orthogonal matrixAll eigenvalues have |λ| = 1
Nilpotent matrixp(λ) = λn
Identity matrix Inp(λ) = (λ 1)n

Frequently Asked Questions

Cofactor expansion computes det(λI − A) symbolically, requiring O(n!) operations in the naive case. The Faddeev - LeVerrier algorithm avoids symbolic manipulation entirely by computing the polynomial coefficients numerically through matrix multiplications and traces. It runs in O(n⁴) time - n iterations each involving an O(n³) matrix product - making it vastly more efficient for n ≥ 4.
Repeated eigenvalues correspond to repeated roots of the characteristic polynomial. The algorithm computes coefficients correctly regardless of multiplicity. However, numerical root-finding for repeated roots is inherently ill-conditioned: a small perturbation in coefficients can shift root locations significantly. For a matrix with eigenvalue λ₀ of multiplicity m, expect reduced precision in the reported eigenvalues proportional to the condition number raised to 1/m.
Yes. A real non-symmetric matrix may have complex conjugate eigenvalue pairs. The characteristic polynomial coefficients remain real, but the roots may be complex. For 2×2 and 3×3 matrices, the analytic solvers detect negative discriminants and report complex eigenvalues in a + bi form. For larger matrices, the QR iteration on the companion matrix detects 2×2 blocks on the quasi-upper-triangular Schur form, extracting complex pairs from those blocks.
Setting λ = 0 in det(λI − A) yields det(−A) = (−1)ⁿ det(A). Since p(0) = c₀ by definition, the constant term directly encodes the determinant scaled by the sign factor. This provides a built-in consistency check: compute det(A) separately and verify it matches (−1)ⁿ · c₀.
The Faddeev - LeVerrier recurrence accumulates products and traces. For entries of magnitude M in an n×n matrix, intermediate values can reach Mⁿ. IEEE-754 double precision provides roughly 15-16 significant digits. For a 6×6 matrix with entries around 10⁸, intermediate values approach 10⁴⁸, nearing the overflow boundary of ~1.8 × 10³⁰⁸ but suffering significant precision loss. Scale the matrix before computation if entries span many orders of magnitude.
Yes. The Cayley - Hamilton theorem states that every square matrix satisfies its own characteristic polynomial: p(A) = 0 (zero matrix). You can verify the result by substituting the matrix A into the computed polynomial. Evaluate c_n · Aⁿ + c_{n−1} · A^{n−1} + … + c₀ · I. The result should be the zero matrix within floating-point tolerance, typically ‖p(A)‖ < 10⁻¹⁰ for well-conditioned integer matrices.