Why a Polynomial Can Describe a Matrix Representation
A linear operator can be represented by different matrices when its basis changes. The entries may change, so a quantity built from those entries is useful only if we know whether it depends on the chosen representation. The characteristic polynomial is one such quantity. This tutorial establishes that it does not change when two matrices are related by a similarity transformation.
We work with \(n\times n\) matrices over \(\mathbb{R}\), where \(n\geq 1\). The determinant is applied to the matrix whose entries contain the variable \(t\); expanding the determinant shows that the result is a polynomial in \(t\). There are different sign conventions for this polynomial, so we fix the convention used here at the outset.
Two \(n\times n\) matrices \(\mathbf{A}\) and \(\mathbf{B}\) are similar if there is an invertible \(n\times n\) matrix \(\mathbf{P}\) such that \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\). The matrix \(\mathbf{P}\) must be invertible for this expression to be defined. We will show that similarity preserves the entire polynomial, not merely one of its values.
A Polynomial Identity Principle
The determinant calculation below gives equal values for every real choice of \(t\). To conclude that two polynomials are equal as polynomials, we use the following elementary fact. A polynomial cannot have more distinct roots than its degree unless it is the zero polynomial.
Proof. Subtract the second polynomial from the first and call the result \(f\). The assumption says \(f(t)=0\) for every real \(t\). We show that a nonzero polynomial of degree \(d\) has at most \(d\) distinct roots. For \(d=0\), a nonzero constant has no roots. For \(d\geq1\), suppose \(f(r)=0\). Polynomial division by \(t-r\) gives \(f(t)=(t-r)g(t)+c\), where \(c\) is constant. Substituting \(t=r\) gives \(0=f(r)=c\), so \(f(t)=(t-r)g(t)\), with \(g\) of degree \(d-1\). Any root of \(f\) other than \(r\) must be a root of \(g\), since for such a root \(s\), \(0=(s-r)g(s)\) and \(s-r\ne0\). By induction, \(g\) has at most \(d-1\) distinct roots, so \(f\) has at most \(d\). Therefore a polynomial that vanishes for every real \(t\) cannot be nonzero. The difference of the two given polynomials is zero, so their coefficients agree. \(\square\)
The Invariance Theorem
Proof. Assume the stated matrix sizes and relation. For any real \(t\), use \(\mathbf{P}^{-1}\mathbf{P}=\mathbf{I}_n\) to factor:
Indeed, \(\mathbf{P}^{-1}(t\mathbf{I}_n)\mathbf{P}=t\mathbf{P}^{-1}\mathbf{P}=t\mathbf{I}_n\), and the other term is \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\). Apply determinant multiplicativity, which says \(\det(\mathbf{X}\mathbf{Y})=\det(\mathbf{X})\det(\mathbf{Y})\) for square matrices of the same size. Also, \(\det(\mathbf{P}^{-1})\det(\mathbf{P})=\det(\mathbf{P}^{-1}\mathbf{P})=\det(\mathbf{I}_n)=1\). Thus, for every real \(t\),
Both sides are polynomials in \(t\), and their values agree for every real \(t\). By the lemma, they are equal as polynomials. \(\square\)
The proof uses the two-sided factorization: the transformed matrix is enclosed by \(\mathbf{P}^{-1}\) on the left and \(\mathbf{P}\) on the right. Multiplicativity then makes the extra determinant factors cancel. The equality is exact, including every coefficient of the polynomial.
Worked Similarity Calculations
Worked Example: A Two-by-Two Change of Basis
Let \(\mathbf{A}=\begin{bmatrix}1&0\\0&3\end{bmatrix}\) and \(\mathbf{P}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\). Find \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), then calculate and compare the characteristic polynomials.
The inverse is \(\mathbf{P}^{-1}=\begin{bmatrix}1&-1\\0&1\end{bmatrix}\), as multiplication verifies:
First compute \(\mathbf{A}\mathbf{P}\), then multiply on the left by \(\mathbf{P}^{-1}\):
Using the fixed convention,
Check: multiplying back gives \(\mathbf{P}\mathbf{B}=\begin{bmatrix}1&1\\0&3\end{bmatrix}\) and \((\mathbf{P}\mathbf{B})\mathbf{P}^{-1}=\begin{bmatrix}1&0\\0&3\end{bmatrix}=\mathbf{A}\). Thus \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), and the direct polynomial calculations agree with the theorem.
Worked Example: A Change That Reorders the Coordinates
Take \(\mathbf{A}=\begin{bmatrix}0&1\\-2&3\end{bmatrix}\) and \(\mathbf{P}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\). Since \(\mathbf{P}^{-1}=\mathbf{P}\), calculate the similar matrix and verify the polynomial identity.
Compute each product in order:
For \(\mathbf{A}\), the matrix in the determinant and its determinant are
For \(\mathbf{B}\), calculate separately:
Check: \(\mathbf{P}\mathbf{B}=\begin{bmatrix}1&0\\3&-2\end{bmatrix}\), and \((\mathbf{P}\mathbf{B})\mathbf{P}^{-1}=\begin{bmatrix}0&1\\-2&3\end{bmatrix}=\mathbf{A}\). The similarity relation and the matching characteristic polynomials are both verified.
Worked Example: A Three-by-Three Similarity
Let \(\mathbf{A}=\begin{bmatrix}1&0&0\\0&2&0\\0&0&4\end{bmatrix}\), and let \(\mathbf{P}=\begin{bmatrix}1&1&0\\0&1&0\\0&0&1\end{bmatrix}\). Find \(\mathbf{B}\) and compute both characteristic polynomials.
The inverse is \(\mathbf{P}^{-1}=\begin{bmatrix}1&-1&0\\0&1&0\\0&0&1\end{bmatrix}\). Multiplying gives
Both matrices are triangular, so the determinant of each \(t\mathbf{I}_3-\mathbf{A}\) or \(t\mathbf{I}_3-\mathbf{B}\) is the product of its diagonal entries. Explicitly,
Check: \(\mathbf{P}\mathbf{B}=\begin{bmatrix}1&1&0\\0&2&0\\0&0&4\end{bmatrix}\), and \((\mathbf{P}\mathbf{B})\mathbf{P}^{-1}=\begin{bmatrix}1&0&0\\0&2&0\\0&0&4\end{bmatrix}=\mathbf{A}\). This confirms the similarity relation by multiplying back.
Common Pitfall: Losing a Factor
A frequent error is to distribute the change-of-basis matrices across \(t\mathbf{I}_n-\mathbf{A}\) incorrectly. For example, one might write \(t\mathbf{I}_n-\mathbf{P}^{-1}\mathbf{A}\mathbf{P}=\mathbf{P}^{-1}(t\mathbf{I}_n-\mathbf{A})\). That expression is generally wrong: its right side is \(t\mathbf{P}^{-1}-\mathbf{P}^{-1}\mathbf{A}\), which need not equal \(t\mathbf{I}_n-\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\).
The two factors must remain on opposite sides. Indeed, \(\mathbf{P}^{-1}(t\mathbf{I}_n-\mathbf{A})\mathbf{P} =t\mathbf{P}^{-1}\mathbf{P}-\mathbf{P}^{-1}\mathbf{A}\mathbf{P} =t\mathbf{I}_n-\mathbf{B}\). Taking determinants of this correct factorization gives \(\det(\mathbf{P}^{-1})\chi_{\mathbf{A}}(t)\det(\mathbf{P})\); the inverse determinant factors cancel. Omitting the right factor would instead leave an unjustified extra determinant and would not prove invariance.
Keep the sign convention visible as well. This tutorial defines \(\chi_{\mathbf{A}}(t)\) with \(t\mathbf{I}_n-\mathbf{A}\). Replacing it by \(\det(\mathbf{A}-t\mathbf{I}_n)\) changes the polynomial by the factor \((-1)^n\). That alternate convention also gives an invariant under similarity, but its polynomial is not always written with the same sign as the convention fixed here.
What the Result Does and Does Not Say
The theorem says that if a change of basis turns \(\mathbf{A}\) into \(\mathbf{B}\), then every coefficient of \(\chi_{\mathbf{A}}(t)\) equals the corresponding coefficient of \(\chi_{\mathbf{B}}(t)\). The proof depends on equal matrix sizes, an invertible \(\mathbf{P}\), the relation \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), and determinant multiplicativity. Without these conditions, the factorization used in the proof is unavailable.
It is important to keep the direction of the conclusion precise: similarity implies equal characteristic polynomials. The theorem by itself does not say that equal characteristic polynomials imply similarity. Nor does it require calculating every coefficient independently once the similarity relation is known. In practice, the most reliable route is to write \(t\mathbf{I}_n-\mathbf{B}\) as \(\mathbf{P}^{-1}(t\mathbf{I}_n-\mathbf{A})\mathbf{P}\), then apply determinant multiplicativity and cancel the factors contributed by \(\mathbf{P}\) and its inverse.
Check Your Understanding
Use the definition \(\chi_{\mathbf{A}}(t)=\det(t\mathbf{I}_n-\mathbf{A})\), and state the hypotheses each time you apply the invariance theorem.
- For \(\mathbf{A}=\begin{bmatrix}2&0\\0&5\end{bmatrix}\), find \(\chi_{\mathbf{A}}(t)\).
- If \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), explain why \(t\mathbf{I}_n-\mathbf{B}=\mathbf{P}^{-1}(t\mathbf{I}_n-\mathbf{A})\mathbf{P}\).
- For the two-by-two matrices in the first worked example, verify \(\mathbf{P}\mathbf{B}\mathbf{P}^{-1}=\mathbf{A}\).
- Identify the missing factor in the incorrect claim \(t\mathbf{I}_n-\mathbf{B}=\mathbf{P}^{-1}(t\mathbf{I}_n-\mathbf{A})\).
- Why does equality of the determinant expressions for every real \(t\) give equality as polynomials?