Tutorials › Linear Algebra › Characteristic Polynomial Invariance Under Similarity

Similarity and Change of Basis for Operators · Tutorial 472 of 1000

Characteristic Polynomial Invariance Under Similarity

Learn why a change of basis preserves the characteristic polynomial and how to verify the identity by exact matrix calculations.

Intermediate 9 min read

What You'll Learn

  • Define the characteristic polynomial with the convention \(\chi_{\mathbf{A}}(t)=\det(t\mathbf{I}-\mathbf{A})\).
  • State the size and invertibility conditions needed for similarity invariance.
  • Factor \(t\mathbf{I}-\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\) correctly.
  • Use determinant multiplicativity to prove equality of the polynomials.
  • Check the result in two-by-two and three-by-three examples.
  • Identify the common error of omitting a factor of \(\mathbf{P}\).

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.

Definition: For \(\mathbf{A}\in\mathbb{R}^{n\times n}\), the characteristic polynomial of \(\mathbf{A}\) is \(\chi_{\mathbf{A}}(t)=\det(t\mathbf{I}_n-\mathbf{A})\). Here \(t\) is a variable and \(\mathbf{I}_n\) is the \(n\times n\) identity matrix. In particular, the matrix inside the determinant is \(t\mathbf{I}_n-\mathbf{A}\), not \(\mathbf{A}-t\mathbf{I}_n\).

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.

Lemma: If two polynomials with real coefficients have equal values for every \(t\in\mathbb{R}\), then they have the same coefficients and are equal as polynomials.

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

Theorem (Characteristic polynomial invariance under similarity): Let \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{n\times n}\). If \(\mathbf{P}\in\mathbb{R}^{n\times n}\) is invertible and \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), then \(\chi_{\mathbf{B}}(t)=\chi_{\mathbf{A}}(t)\) as polynomials.

Proof. Assume the stated matrix sizes and relation. For any real \(t\), use \(\mathbf{P}^{-1}\mathbf{P}=\mathbf{I}_n\) to factor:

$$ \begin{aligned} t\mathbf{I}_n-\mathbf{B} &=t\mathbf{I}_n-\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\\ &=\mathbf{P}^{-1}(t\mathbf{I}_n-\mathbf{A})\mathbf{P}. \end{aligned} $$

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\),

$$ \begin{aligned} \chi_{\mathbf{B}}(t) &=\det\!\left(\mathbf{P}^{-1}(t\mathbf{I}_n-\mathbf{A})\mathbf{P}\right)\\ &=\det(\mathbf{P}^{-1})\det(t\mathbf{I}_n-\mathbf{A})\det(\mathbf{P})\\ &=\det(t\mathbf{I}_n-\mathbf{A})\\ &=\chi_{\mathbf{A}}(t). \end{aligned} $$

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:

$$ \mathbf{P}^{-1}\mathbf{P} = \begin{bmatrix}1&-1\\0&1\end{bmatrix} \begin{bmatrix}1&1\\0&1\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

First compute \(\mathbf{A}\mathbf{P}\), then multiply on the left by \(\mathbf{P}^{-1}\):

$$ \begin{aligned} \mathbf{A}\mathbf{P} &= \begin{bmatrix}1&0\\0&3\end{bmatrix} \begin{bmatrix}1&1\\0&1\end{bmatrix} = \begin{bmatrix}1&1\\0&3\end{bmatrix},\\ \mathbf{B} &= \begin{bmatrix}1&-1\\0&1\end{bmatrix} \begin{bmatrix}1&1\\0&3\end{bmatrix} = \begin{bmatrix}1&-2\\0&3\end{bmatrix}. \end{aligned} $$

Using the fixed convention,

$$ \begin{aligned} \chi_{\mathbf{A}}(t) &=\det\begin{bmatrix}t-1&0\\0&t-3\end{bmatrix} =(t-1)(t-3)=t^2-4t+3,\\ \chi_{\mathbf{B}}(t) &=\det\begin{bmatrix}t-1&2\\0&t-3\end{bmatrix} =(t-1)(t-3)=t^2-4t+3. \end{aligned} $$

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:

$$ \begin{aligned} \mathbf{A}\mathbf{P} &= \begin{bmatrix}0&1\\-2&3\end{bmatrix} \begin{bmatrix}0&1\\1&0\end{bmatrix} = \begin{bmatrix}1&0\\3&-2\end{bmatrix},\\ \mathbf{B} =\mathbf{P}^{-1}\mathbf{A}\mathbf{P} &= \begin{bmatrix}0&1\\1&0\end{bmatrix} \begin{bmatrix}1&0\\3&-2\end{bmatrix} = \begin{bmatrix}3&-2\\1&0\end{bmatrix}. \end{aligned} $$

For \(\mathbf{A}\), the matrix in the determinant and its determinant are

$$ t\mathbf{I}_2-\mathbf{A} = \begin{bmatrix}t&-1\\2&t-3\end{bmatrix}, \qquad \chi_{\mathbf{A}}(t)=t(t-3)-(-1)(2)=t^2-3t+2. $$

For \(\mathbf{B}\), calculate separately:

$$ t\mathbf{I}_2-\mathbf{B} = \begin{bmatrix}t-3&2\\-1&t\end{bmatrix}, \qquad \chi_{\mathbf{B}}(t)=(t-3)t-2(-1)=t^2-3t+2. $$

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

$$ \begin{aligned} \mathbf{A}\mathbf{P} &= \begin{bmatrix}1&1&0\\0&2&0\\0&0&4\end{bmatrix},\\ \mathbf{B} =\mathbf{P}^{-1}\mathbf{A}\mathbf{P} &= \begin{bmatrix}1&-1&0\\0&1&0\\0&0&1\end{bmatrix} \begin{bmatrix}1&1&0\\0&2&0\\0&0&4\end{bmatrix} = \begin{bmatrix}1&-1&0\\0&2&0\\0&0&4\end{bmatrix}. \end{aligned} $$

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,

$$ \begin{aligned} \chi_{\mathbf{A}}(t) &=\det\begin{bmatrix}t-1&0&0\\0&t-2&0\\0&0&t-4\end{bmatrix} =(t-1)(t-2)(t-4),\\ \chi_{\mathbf{B}}(t) &=\det\begin{bmatrix}t-1&1&0\\0&t-2&0\\0&0&t-4\end{bmatrix} =(t-1)(t-2)(t-4). \end{aligned} $$

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.

  1. For \(\mathbf{A}=\begin{bmatrix}2&0\\0&5\end{bmatrix}\), find \(\chi_{\mathbf{A}}(t)\).
  2. 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}\).
  3. For the two-by-two matrices in the first worked example, verify \(\mathbf{P}\mathbf{B}\mathbf{P}^{-1}=\mathbf{A}\).
  4. Identify the missing factor in the incorrect claim \(t\mathbf{I}_n-\mathbf{B}=\mathbf{P}^{-1}(t\mathbf{I}_n-\mathbf{A})\).
  5. Why does equality of the determinant expressions for every real \(t\) give equality as polynomials?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon