What is the characteristic polynomial?
The characteristic polynomial of a square matrix A is defined as \(p(\lambda) = \det(A - \lambda I)\), where I is the identity matrix and \(\lambda\) is a scalar variable. Its roots are exactly the eigenvalues of A, which makes it a cornerstone of linear algebra, differential equations, stability analysis, and quantum mechanics. This calculator handles both 2×2 and 3×3 matrices and returns the polynomial coefficients along with the trace and determinant.
How to use this calculator
Pick the matrix size (2×2 or 3×3), then type each entry into its labelled cell. For a 2×2 matrix only a11, a12, a21 and a22 are used; the other cells are ignored. Press calculate to see the polynomial written in standard form together with each coefficient.
The formulas
For a 2×2 matrix the result is compact: $$p(\lambda) = \lambda^{2} - \operatorname{tr}(A)\lambda + \det(A),$$ where \(\operatorname{tr}(A) = \text{a11} + \text{a22}\) and \(\det(A) = \text{a11}\cdot\text{a22} - \text{a12}\cdot\text{a21}\).
For a 3×3 matrix: $$p(\lambda) = -\lambda^{3} + \operatorname{tr}(A)\lambda^{2} - m\cdot\lambda + \det(A),$$ where \(\operatorname{tr}(A)\) is the sum of the diagonal entries and \(m\) is the sum of the three principal 2×2 minors (the minors obtained by deleting one matching row and column through the diagonal).
Worked example
Take the 2×2 matrix \(\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\). The trace is \(2 + 2 = 4\) and the determinant is \(2\cdot 2 - 1\cdot 1 = 3\). So $$p(\lambda) = \lambda^{2} - 4\lambda + 3,$$ which factors as \((\lambda - 1)(\lambda - 3)\), giving eigenvalues 1 and 3.
FAQ
What are the roots of the characteristic polynomial? They are the eigenvalues of the matrix.
Why is the leading coefficient −1 for 3×3? Because expanding \(\det(A - \lambda I)\) for an odd-sized matrix introduces a factor of \((-\lambda)^{3} = -\lambda^{3}\). Many texts multiply through by −1 to make it monic; both forms have the same roots.
Does it work for non-symmetric matrices? Yes — the formula uses every entry, so any real 2×2 or 3×3 matrix works.