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})\).
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
For the characteristic polynomials, subtract \(\lambda\mathbf{I}_2\) from each matrix and take the determinant:
So the four invariants agree. To decide whether these matrices are similar, compare what happens after subtracting the identity matrix:
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
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
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.
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}\):
Then multiply on the left by \(\mathbf{P}^{-1}\):
To check the conjugation, multiply back in the defining relation \(\mathbf{D}\mathbf{P}=\mathbf{P}\mathbf{B}\):
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
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
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:
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.
- Compute the rank, determinant, trace, and characteristic polynomial of \(\begin{bmatrix}1&2\\0&1\end{bmatrix}\). Which match those of \(\mathbf{I}_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\)?
- Why does an unequal characteristic polynomial rule out similarity, while equal characteristic polynomials do not prove similarity?
- 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.
- State the logical error in concluding that two matrices are similar solely because their ranks, determinants, traces, and characteristic polynomials agree.