Example 1 — \(2\times2\) with repeated eigenvalue
\(A=\begin{bmatrix}2&1\\-1&4\end{bmatrix}\). \(\operatorname{tr}A=6\), \(\det A=9\). Thus \[ p_A(\lambda)=\lambda^2-6\lambda+9=(\lambda-3)^2. \]
Compute the characteristic polynomial \(p(\lambda)=\det(\lambda I - A)\) of an \(n \times n\) matrix. Enter your matrix and press Calculate.
A Characteristic Polynomial Calculator takes a square matrix \(A\in\mathbb{R}^{n\times n}\) (or \(\mathbb{C}^{n\times n}\)) and produces its characteristic polynomial \[ p_A(\lambda)=\det(\lambda I - A). \] The roots of \(p_A\) are the eigenvalues of \(A\), counted with algebraic multiplicity. The coefficients of \(p_A\) are invariant features of the matrix: up to sign, they are the elementary symmetric polynomials of the eigenvalues and can also be expressed through traces of powers of \(A\) or sums of principal minors. This calculator automates determinant expansion and efficient algorithms (e.g., Leverrier–Faddeev) to return exact polynomials for symbolic entries or precise numeric polynomials for floating-point input, alongside intermediate steps, checks, and compact summaries.
For a \(2\times2\) matrix \(A=\begin{bmatrix}a&b\\c&d\end{bmatrix}\), \[ p_A(\lambda)=\lambda^2 - (\operatorname{tr}A)\,\lambda + \det A. \] For a \(3\times3\) matrix, with \(s_1=\operatorname{tr}A\), \(s_2=\tfrac12\big((\operatorname{tr}A)^2-\operatorname{tr}(A^2)\big)\), and \(s_3=\det A\), \[ p_A(\lambda)=\lambda^3 - s_1\lambda^2 + s_2\lambda - s_3. \] In general, the Leverrier–Faddeev recursion uses power sums \(t_k=\operatorname{tr}(A^k)\) to compute coefficients \(c_k\) in \[ p_A(\lambda)=\lambda^n + c_1\lambda^{n-1} + \cdots + c_n, \] via \[ c_k = -\frac{1}{k}\!\left(t_k+\sum_{i=1}^{k-1} c_i\, t_{k-i}\right),\qquad k=1,\dots,n. \] The calculator validates dimensions, supports exact arithmetic for rational/algebraic entries, and can verify Cayley–Hamilton by checking \(p_A(A)=0\).
Definition: \[ p_A(\lambda)=\det(\lambda I-A). \]
2×2 case: \[ p_A(\lambda)=\lambda^2-(\operatorname{tr}A)\lambda+\det A. \]
3×3 via traces: \[ p_A(\lambda)=\lambda^3 - (\operatorname{tr}A)\lambda^2 + \tfrac12\!\big((\operatorname{tr}A)^2-\operatorname{tr}(A^2)\big)\lambda - \det A. \]
Leverrier–Faddeev: \[ t_k=\operatorname{tr}(A^k),\qquad c_k=-\frac{1}{k}\!\left(t_k+\sum_{i=1}^{k-1}c_i\,t_{k-i}\right),\quad p_A(\lambda)=\lambda^n+\sum_{k=1}^{n} c_k \lambda^{n-k}. \]
\(A=\begin{bmatrix}2&1\\-1&4\end{bmatrix}\). \(\operatorname{tr}A=6\), \(\det A=9\). Thus \[ p_A(\lambda)=\lambda^2-6\lambda+9=(\lambda-3)^2. \]
\(A=\begin{bmatrix}1&2&0\\0&3&0\\0&0&5\end{bmatrix}\). \(\operatorname{tr}A=9\); sum of order-2 principal minors \(=3+5+15=23\); \(\det A=15\). \[ p_A(\lambda)=(\lambda-1)(\lambda-3)(\lambda-5)=\lambda^3-9\lambda^2+23\lambda-15. \]
\(A=\begin{bmatrix}0&1\\-2&-3\end{bmatrix}\). \(t_1=\operatorname{tr}A=-3\Rightarrow c_1= -t_1 = 3\). Compute \(A^2=\begin{bmatrix}-2&-3\\6&7\end{bmatrix}\), so \(t_2=5\). \[ c_2=-\frac{1}{2}(t_2+c_1 t_1)=-\frac{1}{2}(5+3\cdot(-3))=2. \] Hence \(p_A(\lambda)=\lambda^2+3\lambda+2=(\lambda+1)(\lambda+2).\)
It encodes a matrix’s eigenvalues; its roots (with multiplicities) are exactly the eigenvalues.
Yes—Leverrier–Faddeev uses \(t_k=\operatorname{tr}(A^k)\) to build coefficients recursively.
They are elementary symmetric polynomials of eigenvalues; in low dimensions they reduce to trace and determinant combinations.
No. Similar matrices share the same characteristic polynomial and eigenvalues.
Every matrix satisfies its characteristic equation: \(p_A(A)=0\); the tool can verify this identity.
The calculator can produce a symbolic polynomial; factorization depends on the algebraic complexity of entries.