Similarity Relates Matrices of the Same Size
A linear operator can have different matrices when it is described using different bases. The entries may change, but the underlying operator does not. Similarity gives a precise relation between matrices that can arise in this way: it says that one matrix is obtained from the other by an invertible change of coordinates. The relation is useful not only because it connects different matrix descriptions, but also because its three basic properties let us group matrices into well-defined classes.
For this tutorial, all matrices are in \(\mathbb{R}^{n\times n}\) for a fixed positive integer \(n\). The fixed size matters: the products in the definition below must be defined, and the relation compares matrices of the same size. A matrix \(\mathbf{P}\in\mathbb{R}^{n\times n}\) is invertible if there is a matrix \(\mathbf{P}^{-1}\) such that \(\mathbf{P}\mathbf{P}^{-1}=\mathbf{P}^{-1}\mathbf{P}=\mathbf{I}_n\).
The order of the factors in this definition is important. In the change-of-basis setting, \(\mathbf{P}\) converts coordinates in one basis to coordinates in another, so the matrix in the new coordinates has the form \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\). Similarity is a relation between matrices, not a claim that the entries of the matrices are equal. In general, \(\mathbf{A}\sim\mathbf{B}\) does not imply \(\mathbf{A}=\mathbf{B}\).
The Three Properties
A relation on a set is an equivalence relation if it is reflexive, symmetric and transitive. Reflexivity means every object is related to itself. Symmetry means that if one object is related to another, the relation also holds in the reverse direction. Transitivity means that if the first object is related to the second and the second to the third, then the first is related to the third.
- \(\mathbf{A}\sim\mathbf{A}\) (reflexivity);
- if \(\mathbf{A}\sim\mathbf{B}\), then \(\mathbf{B}\sim\mathbf{A}\) (symmetry);
- if \(\mathbf{A}\sim\mathbf{B}\) and \(\mathbf{B}\sim\mathbf{C}\), then \(\mathbf{A}\sim\mathbf{C}\) (transitivity).
Proof. For reflexivity, take \(\mathbf{P}=\mathbf{I}_n\), which is invertible and satisfies \(\mathbf{I}_n^{-1}\mathbf{A}\mathbf{I}_n=\mathbf{A}\). Thus \(\mathbf{A}\sim\mathbf{A}\).
For symmetry, suppose \(\mathbf{A}\sim\mathbf{B}\). By definition, some invertible \(\mathbf{P}\) satisfies \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\). Multiplying this equation on the left by \(\mathbf{P}\) and on the right by \(\mathbf{P}^{-1}\) gives \(\mathbf{P}\mathbf{B}\mathbf{P}^{-1}=\mathbf{A}\). The inverse of \(\mathbf{P}^{-1}\) is \(\mathbf{P}\), so this is exactly the form \(\mathbf{A}=(\mathbf{P}^{-1})^{-1}\mathbf{B}\mathbf{P}^{-1}\). Hence \(\mathbf{B}\sim\mathbf{A}\).
For transitivity, suppose \(\mathbf{A}\sim\mathbf{B}\) and \(\mathbf{B}\sim\mathbf{C}\). There are invertible matrices \(\mathbf{P}\) and \(\mathbf{Q}\) such that \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\) and \(\mathbf{C}=\mathbf{Q}^{-1}\mathbf{B}\mathbf{Q}\). Substituting the first equation into the second gives \(\mathbf{C}=\mathbf{Q}^{-1}\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\mathbf{Q}=(\mathbf{P}\mathbf{Q})^{-1}\mathbf{A}(\mathbf{P}\mathbf{Q})\). Here \((\mathbf{P}\mathbf{Q})^{-1}=\mathbf{Q}^{-1}\mathbf{P}^{-1}\): multiplying these two matrices in either order gives \(\mathbf{I}_n\). Also, \(\mathbf{P}\mathbf{Q}\) is invertible, with that inverse. Therefore \(\mathbf{A}\sim\mathbf{C}\). All three properties hold. \(\square\)
The proof uses only the definition of similarity, the identity matrix, and basic rules for inverses and matrix products. In particular, transitivity does not require the same similarity matrix to work in both steps: the two changes of coordinates combine into the single invertible matrix \(\mathbf{P}\mathbf{Q}\).
Worked Examples of the Relation
Worked Example: Reflexivity for a Specific Matrix
Let \(\mathbf{A}=\begin{bmatrix}2&-1\\3&0\end{bmatrix}\). Exhibit a similarity matrix showing that \(\mathbf{A}\sim\mathbf{A}\).
Choose \(\mathbf{P}=\mathbf{I}_2\). Its inverse is \(\mathbf{I}_2\), since multiplying the identity matrix by itself gives the identity. Then
Check: the product equals \(\mathbf{A}\) entry by entry, so the chosen invertible matrix satisfies the definition of similarity. This calculation illustrates reflexivity for this particular matrix; the proof above establishes reflexivity for every \(\mathbf{A}\in\mathbb{R}^{n\times n}\).
Worked Example: Reversing a Similarity
Let \(\mathbf{A}=\begin{bmatrix}1&0\\0&2\end{bmatrix}\) and \(\mathbf{P}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\). First find \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), then exhibit the similarity in the reverse direction.
The inverse is \(\mathbf{P}^{-1}=\begin{bmatrix}1&-1\\0&1\end{bmatrix}\), as both \(\mathbf{P}\mathbf{P}^{-1}\) and \(\mathbf{P}^{-1}\mathbf{P}\) equal \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\). Compute the first product and then multiply by \(\mathbf{P}^{-1}\):
Now use \(\mathbf{P}\) on the left and \(\mathbf{P}^{-1}\) on the right to recover \(\mathbf{A}\):
Check: the reverse formula is \(\mathbf{A}=\mathbf{P}\mathbf{B}\mathbf{P}^{-1}\), or, in the defining form, \(\mathbf{A}=(\mathbf{P}^{-1})^{-1}\mathbf{B}\mathbf{P}^{-1}\). Since \(\mathbf{P}^{-1}\) is invertible, this proves \(\mathbf{B}\sim\mathbf{A}\), as symmetry requires.
Worked Example: Combining Two Similarities
Use \(\mathbf{A}=\begin{bmatrix}1&0\\0&2\end{bmatrix}\) and \(\mathbf{P}=\mathbf{Q}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\). Compute \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\) and \(\mathbf{C}=\mathbf{Q}^{-1}\mathbf{B}\mathbf{Q}\), then verify the combined similarity directly.
The inverse of each of \(\mathbf{P}\) and \(\mathbf{Q}\) is \(\begin{bmatrix}1&-1\\0&1\end{bmatrix}\). The first step, computed in the preceding example, gives \(\mathbf{B}=\begin{bmatrix}1&-1\\0&2\end{bmatrix}\). For the second step, multiply in order:
The combined matrix is \(\mathbf{P}\mathbf{Q}=\begin{bmatrix}1&2\\0&1\end{bmatrix}\), whose inverse is \(\begin{bmatrix}1&-2\\0&1\end{bmatrix}\). Multiplying directly gives
Check: the direct calculation agrees with the two-step result. Thus \(\mathbf{A}\sim\mathbf{B}\) and \(\mathbf{B}\sim\mathbf{C}\) lead to \(\mathbf{A}\sim\mathbf{C}\), with the combined similarity matrix \(\mathbf{P}\mathbf{Q}\).
Equivalence Classes of Similar Matrices
An equivalence relation groups the objects in its underlying set into equivalence classes. For similarity, the class of \(\mathbf{A}\) is the collection of all matrices similar to \(\mathbf{A}\). This collection can contain matrices different from \(\mathbf{A}\), as the worked examples show. The equivalence-relation properties ensure that these classes do not overlap partially: two such classes are either identical or disjoint.
Proof. Reflexivity gives \(\mathbf{A}\sim\mathbf{A}\), so \(\mathbf{A}\in[\mathbf{A}]\). Therefore every matrix belongs to at least one class. Now suppose two classes \([\mathbf{A}]\) and \([\mathbf{B}]\) have a matrix \(\mathbf{X}\) in common. Then \(\mathbf{X}\sim\mathbf{A}\) and \(\mathbf{X}\sim\mathbf{B}\). By symmetry, \(\mathbf{A}\sim\mathbf{X}\); by transitivity with \(\mathbf{X}\sim\mathbf{B}\), this gives \(\mathbf{A}\sim\mathbf{B}\). To prove the classes are equal, take any \(\mathbf{Y}\in[\mathbf{A}]\). Then \(\mathbf{Y}\sim\mathbf{A}\), and \(\mathbf{A}\sim\mathbf{B}\), so transitivity gives \(\mathbf{Y}\sim\mathbf{B}\). Hence \(\mathbf{Y}\in[\mathbf{B}]\), proving \([\mathbf{A}]\subseteq[\mathbf{B}]\). Reversing the roles of \(\mathbf{A}\) and \(\mathbf{B}\) gives \([\mathbf{B}]\subseteq[\mathbf{A}]\), so the classes are equal. Consequently, if two classes are not equal, they have no matrix in common. \(\square\)
This partition viewpoint changes the question from “Are these matrices equal?” to “Do these matrices belong to the same similarity class?” It does not by itself provide a method for deciding whether two arbitrary matrices are similar. The point here is the structure of the relation: once two matrices are related, symmetry and transitivity make their entire classes coincide.
Common Mistake: Reversing the Factors Incorrectly
A frequent error is to try to reverse \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\) by asserting \(\mathbf{A}=\mathbf{P}^{-1}\mathbf{B}\mathbf{P}\). That uses the same direction of change instead of reversing it. For the matrices in the symmetry example, this incorrect expression gives
which is not \(\mathbf{A}=\begin{bmatrix}1&0\\0&2\end{bmatrix}\). The correction follows by isolating \(\mathbf{A}\) in the original equation: multiply on the left by \(\mathbf{P}\), and on the right by \(\mathbf{P}^{-1}\), to obtain \(\mathbf{A}=\mathbf{P}\mathbf{B}\mathbf{P}^{-1}\). The reversed similarity uses \(\mathbf{P}^{-1}\) as its similarity matrix, not \(\mathbf{P}\).
Another useful distinction is that “symmetric” in the phrase similarity is symmetric describes a property of a relation. It does not mean that either matrix must satisfy \(\mathbf{A}^{\top}=\mathbf{A}\). For example, the matrix \(\begin{bmatrix}1&-1\\0&2\end{bmatrix}\) above is similar to \(\begin{bmatrix}1&0\\0&2\end{bmatrix}\), regardless of whether the first matrix is symmetric.
Check Your Understanding
Use the definition and the three relation properties to answer each question.
- What matrix can be chosen to prove reflexivity for an arbitrary \(\mathbf{A}\in\mathbb{R}^{n\times n}\)?
- If \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), write \(\mathbf{A}\) in terms of \(\mathbf{P}\), \(\mathbf{B}\) and \(\mathbf{P}^{-1}\).
- If \(\mathbf{B}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\) and \(\mathbf{C}=\mathbf{Q}^{-1}\mathbf{B}\mathbf{Q}\), what invertible matrix gives \(\mathbf{C}\) directly from \(\mathbf{A}\)?
- Explain why the similarity classes of two matrices with a common member must be equal.
- Is the word “symmetric” in “similarity is symmetric” a claim that the matrices satisfy \(\mathbf{A}^{\top}=\mathbf{A}\)? Explain the distinction.