Search for probability and statistics terms on Statlect
StatLect

Similar matrix

by , PhD

Two square matrices are said to be similar if they represent the same linear operator under different bases.

Two similar matrices have the same rank, trace, determinant and eigenvalues.

Table of Contents

Definition

We start with a definition.

Definition A $K	times K$ matrix A is said to be similar to another $K	times K$ matrix $B$ if and only if there exists an invertible $K	times K$ matrix $P$ such that[eq1]

The transformation of A into $P^{-1}AP$ is called similarity transformation.

The matrix $P$ is called change-of-basis matrix (below we explain why).

Equivalence relation

Similarity defines an equivalence relation between square matrices.

Proposition Matrix similarity is an equivalence relation, that is, given three $K	times K $ matrices A, $B$ and $C$, the following properties hold:

  1. Reflexivity: A is similar to itself;

  2. Symmetry: if A is similar to $B$, then $B$ is similar to A;

  3. Transitivity: if A is similar to $B$ and $B$ is similar to $C$, then A is similar to $C$.

Proof

Similarity is reflexive because[eq2]where the identity matrix I is the change-of-basis matrix. Symmetry holds because the equation[eq3]implies[eq4]where $P^{-1}$ is the change-of-basis matrix. Transitivity holds because[eq5]imply[eq6]where $P_{1}P_{2}$ is the change-of-basis matrix.

Same rank

The next proposition shows a first important property of similarity.

Proposition If two matrices are similar, then they have the same rank.

Proof

Let A and $B$ be similar, so that $B=P^{-1}AP$, with $P$ invertible (hence full-rank). As proved in the lecture on matrix product and rank, [eq7]because $P$ is full-rank and [eq8]because $P^{-1}$ is full-rank. Therefore, A and $B$ have the same rank.

Same trace

Trace is preserved by similarity transformations.

Proposition If two matrices are similar, then they have the same trace.

Proof

Let $B=P^{-1}AP$. Then, by an elementary property of the trace, we have [eq9]

Same determinant

The next property concerns the determinant.

Proposition If two matrices are similar, then they have the same determinant.

Proof

Let $B=P^{-1}AP$. We have[eq10]where in steps $frame{A}$ and $frame{B}$ we have used two properties of the determinant: 1) the determinant of a product of two or more matrices is equal to the product of their determinants; 2) [eq11].

Same eigenvalues

This is probably the most important property, as well as the reason why similarity transformations are so important in the theory of eigenvalues and eigenvectors.

Proposition If two matrices are similar, then they have the same eigenvalues, with the same algebraic and geometric multiplicities.

Proof

Let A and $B$ be similar, so that $B=P^{-1}AP$. Any eigenvalue $lambda $ of A solves the characteristic equation[eq12]while the eigenvalues of $B$ solve the equation[eq13]where in steps $frame{A}$ and $frame{B}$ we have used two properties of the determinant: 1) the determinant of a product of two or more matrices is equal to the product of their determinants; 2) [eq11]. Thus, $lambda $ solves the characteristic equation of A if and only if it solves the characteristic equation of $B$. Stated differently, $lambda $ is an eigenvalue of A if and only if it is an eigenvalue of $B$. Moreover, since A and $B$ have the same characteristic equation, their eigenvalues have the same algebraic multiplicities. We still need to prove that the eigenvalues of A and $B$ have the same geometric multiplicities. Note that

[eq15]For a given eigenvalue $lambda $, choose an eigenvector of $B$ associated to $lambda $ and denote it by x. Then,[eq16]If we post-multiply equation (1) by x, we get[eq17]or[eq18]In other words, $Px$ is an eigenvector of A associated to $lambda $ if and only if x is an eigenvector of $B$ associated to $lambda $. Suppose that $lambda $, as an eigenvalue of $B$, has geometric multiplicity equal to $L$. Choose a basis [eq19] for the eigenspace of $B$ associated to $lambda $ (i.e., any eigenvector of $B$ associated to $lambda $ can be written as a linear combination of [eq20]). Let Z be the $K	imes L$ matrix obtained by adjoining the vectors of the basis:[eq21]Thus, the eigenvectors of $B$ associated to $lambda $ satisfy the equation[eq22]where $h$ is the $L	imes 1$ vector of coefficients of the linear combination. If we pre-multiply both sides of the equation by $P$, we get[eq23]Thus the eigenvectors $Px$ of A associated to $lambda $ are all the vectors that can be written as linear combinations of the columns of $PZ$. But $PZ$ has the same rank of Z because $P$ is full-rank. Therefore, it has rank $L$. So the geometric multiplicity of $lambda $, as an eigenvalue of A is $L$, the same it has as an eigenvalue of $B$.

Note from the previous proof that if[eq24]then $lambda $ is an eigenvalue of A if and only if it is an eigenvalue of $B$, but x is an eigenvector of $B$ associated to $lambda $ if and only if $Px$ is an eigenvector of A associated to $lambda $.

Similar matrix powers

The following proposition illustrates a simple but very useful property of similarity.

Proposition If two matrices A and $B$ are similar, then their n-th powers $A^{n}$ and $B^{n}$ are similar.

Proof

Let $B=P^{-1}AP$. We have[eq25]

The proof also shows that the change-of-basis matrix employed in the similarity transformation of A into $B$ is the same used in the similarity transformation of $A^{n}$ into $B^{n}$.

Unitarily similar

In linear algebra we often use the term "unitarily similar".

Definition Two $K	imes K$ matrices A and $B$ are said to be unitarily similar if and only if there exists a $K	imes K$ unitary matrix $P$ such that [eq26]

Thus, two matrices are unitarily similar if they are similar and their change-of-basis matrix is unitary.

Since the inverse of a unitary matrix $P$ is equal to its conjugate transpose $P^{ast }$, the similarity transformation can be written as[eq27]

When all the entries of the unitary matrix $P$ are real, then the matrix is orthogonal, [eq28] and the similarity transformation becomes[eq29]

Relation to change of basis

In order to understand the relation between similar matrices and changes of bases, let us review the main things we learned in the lecture on the Change of basis.

Let $S$ be a finite-dimensional vector space and [eq30] a basis for $S$.

Coordinate vectors

Any vector $sin S$ can be represented as a linear combination of the basis[eq31]where [eq32] are scalar coefficients.

The coefficients of the linear combination form the so-called coordinate vector of $s$ with respect to $B$, denoted by [eq33]:[eq34]

Change of basis

If we use a different basis [eq35], then the coordinates of any vector $s$ with respect to $C$ satisfy[eq36]where the $K	imes K$ matrix $S_{C
ightarrow B}$ is called change-of-basis matrix and allows us to convert coordinates with respect to $C$ into coordinates with respect to $B$.

Matrix of an operator

Remember that a linear operator $f:S
ightarrow S$ can always be represented by a $K	imes K$ matrix [eq37] such that, for any $sin S$,[eq38]

In other words, if we pre-multiply the coordinates of $s$ with respect to $B$ by [eq39], we get the coordinates of $fleft( s
ight) $ as a result.

We have shown that the matrices of the linear operator under different bases are related to each other by the change-of-basis formula[eq40]

Thus, [eq41] is similar to [eq42].

This result explains the characterization of similarity we have given in the introduction above: two similar matrices represent the same linear operator under different bases.

How to prove that two matrices are similar

People often ask: "How do we show that two matrices are similar?"

We know that two similar matrices A and $B$ have the same eigenvalues.

Therefore, if A and $B$ do not have the same eigenvalues, then they are not similar.

But if they have the same eigenvalues, they are not necessarily similar.

The easiest way to check for sure is to compute the Jordan canonical forms of A and $B$.

If the two Jordan forms coincide (up to a re-ordering of the Jordan blocks), then the two matrices are similar. See this lecture by prof. Strang.

How to cite

Please cite as:

Taboga, Marco (2021). "Similar matrix", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/similar-matrix.

The books

Most of the learning materials found on this website are now available in a traditional textbook format.