Tutorials › Linear Algebra › Why Matching Invariants Do Not Prove Similarity

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

Why Matching Invariants Do Not Prove Similarity

See why familiar similarity invariants can match while two matrices still represent different operators.

Intermediate 9 min read

What You'll Learn

  • State the rank, determinant, trace, and characteristic-polynomial conditions that similarity requires.
  • Compute these four invariants for the identity matrix and a nontrivial two-by-two Jordan block.
  • Use the rank of a shifted matrix to prove that the two matrices are not similar.
  • Verify a concrete change of basis and distinguish matching invariants from actual similarity.
  • Avoid the mistaken inference that matching necessary conditions establish similarity.

When Invariants Agree but Matrices Differ

Similarity invariants are useful because they can rule out a change of basis: if two matrices have different ranks, determinants, traces, or characteristic polynomials, they cannot be similar. But passing all of these tests is not the same as proving that a change of basis exists. A pair of small matrices makes the limitation precise. The identity matrix and a nontrivial two-by-two Jordan block share all four listed invariants, yet no change of basis turns one into the other.

All matrices in this tutorial have real entries. Recall that \(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}\). This is the matrix relation produced by expressing one linear operator in two different bases. The rank is the dimension of the column space; the trace is the sum of the diagonal entries; and the characteristic polynomial is \(p_{\mathbf{A}}(\lambda)=\det(\mathbf{A}-\lambda\mathbf{I})\).

Definition: The nontrivial \(2\times2\) Jordan block with diagonal entry \(1\) is \(\mathbf{J}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\). “Nontrivial” here means that its entry above the diagonal is nonzero, so this matrix is not the identity matrix.

The earlier material on invariants under similarity establishes the following necessary conditions: if \(\mathbf{A}\) and \(\mathbf{B}\) are similar, then they have the same rank, determinant, trace, and characteristic polynomial. These conditions are powerful for ruling out similarity, but the direction of the implication matters: they say what must agree when matrices are similar, not that agreement alone supplies a suitable \(\mathbf{P}\).

The Main Counterexample

Worked Example: The Identity and a Jordan Block

Compare \(\mathbf{I}_2\) and \(\mathbf{J}\). Compute their ranks, determinants, traces, and characteristic polynomials, then test whether the agreement proves similarity.

The identity has two pivot columns, and \(\mathbf{J}\) is already upper triangular with two nonzero diagonal entries. Thus both have rank \(2\). Their determinants and traces are

$$ \operatorname{rank}\mathbf{I}_2=2,\qquad \det\mathbf{I}_2=1,\qquad \operatorname{tr}\mathbf{I}_2=2, $$
$$ \operatorname{rank}\mathbf{J}=2,\qquad \det\mathbf{J}=1\cdot1-1\cdot0=1,\qquad \operatorname{tr}\mathbf{J}=1+1=2. $$

For the characteristic polynomials, subtract \(\lambda\mathbf{I}_2\) from each matrix and take the determinant:

$$ p_{\mathbf{I}_2}(\lambda) =\det\begin{bmatrix}1-\lambda&0\\0&1-\lambda\end{bmatrix} =(1-\lambda)^2, $$
$$ p_{\mathbf{J}}(\lambda) =\det\begin{bmatrix}1-\lambda&1\\0&1-\lambda\end{bmatrix} =(1-\lambda)(1-\lambda)-1\cdot0 =(1-\lambda)^2. $$

So the four invariants agree. To decide whether these matrices are similar, compare what happens after subtracting the identity matrix:

$$ \mathbf{I}_2-\mathbf{I}_2 =\begin{bmatrix}0&0\\0&0\end{bmatrix}, \qquad \mathbf{J}-\mathbf{I}_2 =\begin{bmatrix}0&1\\0&0\end{bmatrix}. $$

The zero matrix has rank \(0\). The second matrix has one nonzero column, \(\begin{bmatrix}1\\0\end{bmatrix}\), so its column space has dimension \(1\) and its rank is \(1\). The proof below shows that similarity would force these two ranks to be equal. They are not; therefore \(\mathbf{I}_2\) and \(\mathbf{J}\) are not similar.

Check: The computations establish equality of each of the four listed invariants, while the shifted ranks are \(0\) and \(1\). Thus this pair really does meet the claimed counterexample conditions.

A Rank Test That Separates the Pair

Theorem: If \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{n\times n}\) are similar, then for every real number \(c\), \(\operatorname{rank}(\mathbf{A}-c\mathbf{I}_n)=\operatorname{rank}(\mathbf{B}-c\mathbf{I}_n)\).

Proof. Suppose \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), where \(\mathbf{P}\) is invertible, and let \(c\in\mathbb{R}\). Since \(\mathbf{P}^{-1}\mathbf{I}_n\mathbf{P}=\mathbf{I}_n\), subtracting \(c\mathbf{I}_n\) gives

$$ \mathbf{B}-c\mathbf{I}_n =\mathbf{P}^{-1}(\mathbf{A}-c\mathbf{I}_n)\mathbf{P}. $$

For any matrix \(\mathbf{M}\) and invertible \(\mathbf{P}\), right multiplication by \(\mathbf{P}\) preserves rank: every column of \(\mathbf{M}\mathbf{P}\) is a linear combination of columns of \(\mathbf{M}\), so \(\operatorname{Col}(\mathbf{M}\mathbf{P})\subseteq\operatorname{Col}\mathbf{M}\). Conversely, \(\mathbf{M}=(\mathbf{M}\mathbf{P})\mathbf{P}^{-1}\), so every column of \(\mathbf{M}\) is a linear combination of columns of \(\mathbf{M}\mathbf{P}\). The column spaces are equal. Left multiplication by \(\mathbf{P}^{-1}\) maps a column space injectively to another subspace of the same dimension, because \(\mathbf{P}^{-1}\) is invertible. Hence \(\operatorname{rank}(\mathbf{P}^{-1}\mathbf{M}\mathbf{P})=\operatorname{rank}\mathbf{M}\). Apply this to \(\mathbf{M}=\mathbf{A}-c\mathbf{I}_n\) to obtain the claimed equality. \(\square\)

This theorem gives a direct contradiction for the example: if \(\mathbf{I}_2\) and \(\mathbf{J}\) were similar, their ranks after subtracting \(1\cdot\mathbf{I}_2\) would agree. The computed ranks \(0\) and \(1\) do not agree. Notice that the theorem is a necessary consequence of similarity; this use does not require the converse, which is not claimed.

Theorem: Matching rank, determinant, trace, and characteristic polynomial does not, in general, imply similarity, even for \(2\times2\) matrices over \(\mathbb{R}\).

Proof. The matrices \(\mathbf{I}_2\) and \(\mathbf{J}\) in the worked example are real \(2\times2\) matrices. The displayed calculations show that their ranks, determinants, traces, and characteristic polynomials agree. The rank theorem shows that their ranks after subtracting \(\mathbf{I}_2\) would have to agree if they were similar, but those ranks are \(0\) and \(1\). Therefore they are not similar, giving the required counterexample. \(\square\)

Matching Invariants Can Also Occur for Similar Matrices

The counterexample does not mean that matching invariants prevent similarity. Similar matrices must have matching invariants, and an actual change of basis can sometimes be exhibited directly. The next calculation contrasts such a construction with the failed inference in the main example.

Worked Example: Verifying an Actual Similarity

Let \(\mathbf{D}=\begin{bmatrix}2&0\\0&3\end{bmatrix}\) and \(\mathbf{P}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\). Compute \(\mathbf{P}^{-1}\mathbf{D}\mathbf{P}\), check the result, and compare the invariants.

The determinant of \(\mathbf{P}\) is \(1\), so it is invertible, with \(\mathbf{P}^{-1}=\begin{bmatrix}1&-1\\0&1\end{bmatrix}\). First multiply \(\mathbf{D}\mathbf{P}\):

$$ \mathbf{D}\mathbf{P} =\begin{bmatrix}2&0\\0&3\end{bmatrix} \begin{bmatrix}1&1\\0&1\end{bmatrix} =\begin{bmatrix}2&2\\0&3\end{bmatrix}. $$

Then multiply on the left by \(\mathbf{P}^{-1}\):

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

To check the conjugation, multiply back in the defining relation \(\mathbf{D}\mathbf{P}=\mathbf{P}\mathbf{B}\):

$$ \mathbf{P}\mathbf{B} =\begin{bmatrix}1&1\\0&1\end{bmatrix} \begin{bmatrix}2&-1\\0&3\end{bmatrix} =\begin{bmatrix}2&-1+3\\0&3\end{bmatrix} =\begin{bmatrix}2&2\\0&3\end{bmatrix} =\mathbf{D}\mathbf{P}. $$

Both matrices are upper triangular, so their ranks are \(2\), their determinants are \(2\cdot3=6\), and their traces are \(2+3=5\). Directly, both characteristic polynomials are \((2-\lambda)(3-\lambda)\). Here the invariants agree and an explicit invertible \(\mathbf{P}\) verifies similarity. It is the exhibited change of basis—not the agreement of the invariants alone—that proves the claim.

A Second Comparison: Similar to the Block, Not to the Identity

Worked Example: A Different Matrix with the Same Invariants

Let \(\mathbf{C}=\begin{bmatrix}0&-1\\1&2\end{bmatrix}\). Compare its invariants with those of \(\mathbf{I}_2\) and \(\mathbf{J}\), and determine which of those two matrices it is similar to.

The determinant is \(0\cdot2-(-1)\cdot1=1\), and the trace is \(0+2=2\). Since the determinant is nonzero, \(\mathbf{C}\) has rank \(2\). Its characteristic polynomial is

$$ p_{\mathbf{C}}(\lambda) =\det\begin{bmatrix}-\lambda&-1\\1&2-\lambda\end{bmatrix} =(-\lambda)(2-\lambda)-(-1)\cdot1 =\lambda^2-2\lambda+1 =(1-\lambda)^2. $$

Thus \(\mathbf{C}\) has the same four invariants as both matrices in the first example. To exhibit a similarity with \(\mathbf{J}\), take \(\mathbf{P}=\begin{bmatrix}-1&1\\1&0\end{bmatrix}\). Its determinant is \(-1\), so it is invertible. Multiplication gives

$$ \mathbf{C}\mathbf{P} =\begin{bmatrix}0&-1\\1&2\end{bmatrix} \begin{bmatrix}-1&1\\1&0\end{bmatrix} =\begin{bmatrix}-1&0\\1&1\end{bmatrix}, $$
$$ \mathbf{P}\mathbf{J} =\begin{bmatrix}-1&1\\1&0\end{bmatrix} \begin{bmatrix}1&1\\0&1\end{bmatrix} =\begin{bmatrix}-1&0\\1&1\end{bmatrix}. $$

Therefore \(\mathbf{C}\mathbf{P}=\mathbf{P}\mathbf{J}\); multiplying on the left by \(\mathbf{P}^{-1}\) gives \(\mathbf{P}^{-1}\mathbf{C}\mathbf{P}=\mathbf{J}\). But \(\mathbf{C}-\mathbf{I}_2=\begin{bmatrix}-1&-1\\1&1\end{bmatrix}\) has two equal columns and a nonzero column, so its rank is \(1\). As \(\operatorname{rank}(\mathbf{I}_2-\mathbf{I}_2)=0\), the rank theorem rules out similarity between \(\mathbf{C}\) and \(\mathbf{I}_2\). The shared invariants are consistent with both possibilities; the shifted-rank test and the explicit change of basis distinguish them.

Check: The displayed products verify the claimed similarity to \(\mathbf{J}\), and the nonzero, equal columns of \(\mathbf{C}-\mathbf{I}_2\) verify its rank \(1\). Thus \(\mathbf{C}\) is similar to \(\mathbf{J}\) but not to \(\mathbf{I}_2\).

Common Pitfall: Treating Necessary Conditions as a Classification

A tempting but incorrect argument is: “The identity and the Jordan block have the same rank, determinant, trace, and characteristic polynomial, so they must be similar.” The conclusion does not follow. Those quantities are necessary checks, not a complete classification of similarity. The correction is to ask for a change-of-basis matrix or to find another quantity that similarity forces to agree.

There is also a concrete rank-computation error to avoid. One might incorrectly write \(\mathbf{J}-\mathbf{I}_2=\mathbf{O}\), reasoning that both diagonal entries of \(\mathbf{J}\) are \(1\). Subtraction must be performed entry by entry:

$$ \begin{bmatrix}1&1\\0&1\end{bmatrix} -\begin{bmatrix}1&0\\0&1\end{bmatrix} =\begin{bmatrix}0&1\\0&0\end{bmatrix}, \qquad \operatorname{rank}(\mathbf{J}-\mathbf{I}_2)=1, $$

because its second column is nonzero and its first column is zero. The entry above the diagonal remains after subtracting the identity. That remaining entry is precisely why this rank test separates the block from the identity.

How to Use the Invariants

For a pair of matrices under comparison, the familiar invariants are still an efficient first check. A mismatch in even one of them rules out similarity. If they all agree, the correct conclusion is only that these tests have not ruled similarity out. One must then produce an invertible change-of-basis matrix or use another necessary condition, such as the rank of \(\mathbf{A}-c\mathbf{I}_n\) for a chosen scalar \(c\).

The central distinction is between a list of measurements and a proof that two matrices represent the same operator in different bases. The rank, determinant, trace, and characteristic polynomial compress information about a matrix. As the identity and Jordan-block example shows, those summaries can agree while the matrices still behave differently under a change of basis. Treating the invariants as filters rather than a complete test keeps the logic precise.

Check Your Understanding

Use exact calculations and distinguish necessary conditions from a proof of similarity.

  1. Compute the rank, determinant, trace, and characteristic polynomial of \(\begin{bmatrix}1&2\\0&1\end{bmatrix}\). Which match those of \(\mathbf{I}_2\)?
  2. For \(\mathbf{A}=\begin{bmatrix}3&0\\0&3\end{bmatrix}\), compute \(\operatorname{rank}(\mathbf{A}-3\mathbf{I}_2)\). What does the rank test say when comparing \(\mathbf{A}\) with a nontrivial Jordan block having diagonal entry \(3\)?
  3. Why does an unequal characteristic polynomial rule out similarity, while equal characteristic polynomials do not prove similarity?
  4. Verify directly that \(\begin{bmatrix}0&-1\\1&2\end{bmatrix}\mathbf{P}=\mathbf{P}\mathbf{J}\) for the matrix \(\mathbf{P}\) in the third worked example.
  5. State the logical error in concluding that two matrices are similar solely because their ranks, determinants, traces, and characteristic polynomials agree.

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