# Determine Whether Given Matrices are Similar

## Problem 391

(a) Is the matrix $A=\begin{bmatrix} 1 & 2\\ 0& 3 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 3 & 0\\ 1& 2 \end{bmatrix}$?

(b) Is the matrix $A=\begin{bmatrix} 0 & 1\\ 5& 3 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 1 & 2\\ 4& 3 \end{bmatrix}$?

(c) Is the matrix $A=\begin{bmatrix} -1 & 6\\ -2& 6 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 3 & 0\\ 0& 2 \end{bmatrix}$?

(d) Is the matrix $A=\begin{bmatrix} -1 & 6\\ -2& 6 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 1 & 2\\ -1& 4 \end{bmatrix}$?

## Solution.

### (a) Is the matrix $A=\begin{bmatrix} 1 & 2\\ 0& 3 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 3 & 0\\ 1& 2 \end{bmatrix}$?

Recall that if $A$ and $B$ are similar, then their determinants are the same.
We compute
\begin{align*}
\det(A)=(1)(3)-(2)(0)=3 \text{ and } \det(B)=(3)(2)-(0)(1)=6.
\end{align*}
Thus, $\det(A)\neq \det(B)$, and hence $A$ and $B$ are not similar.

### (b) Is the matrix $A=\begin{bmatrix} 0 & 1\\ 5& 3 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 1 & 2\\ 4& 3 \end{bmatrix}$?

It is straightforward to check that $\det(A)=-5=\det(B)$. Thus determinants does not help here.
We recall that if $A$ and $B$ are similar, then their traces are the same. (See Problem “Similar matrices have the same eigenvalues“.)
We compute
\begin{align*}
\tr(A)=0+3=3 \text{ and } \tr(B)=1+3=4,
\end{align*}
and thus $\tr(A)\neq\tr(B)$.
Hence $A$ and $B$ are not similar.

### (c) Is the matrix $A=\begin{bmatrix} -1 & 6\\ -2& 6 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 3 & 0\\ 0& 2 \end{bmatrix}$?

We see that
$\det(A)=6=\det(B) \text{ and } \tr(A)=5=\tr(B).$ Thus, the determinants and traces do not give any information about similarity.
The characteristic polynomial of $A$ is given by
\begin{align*}
p(t)&=\det(A-tI)\\
&=\begin{vmatrix}
-1-t & 6\\
-2& 6-t
\end{vmatrix}\\
&=(-1-t)(6-t)-(6)(-2)\\
&=t^2-5t+6.
\end{align*}
(Note that since we found the determinant and trace of $A$, we could have found the characteristic polynomial from the formula $p(t)=t^2-\tr(A)t+\det(A)$.)

Since $p(t)=(t-2)(t-3)$, the eigenvalue of $A$ are $2$ and $3$.
Since $A$ has two distinct eigenvalues, it is diagonalizable.
That is, there exists a nonsingular matrix $S$ such that
$S^{-1}AS=\begin{bmatrix} 2 & 0\\ 0& 3 \end{bmatrix}=B.$ Thus, $A$ and $B$ are similar.

### (d) Is the matrix $A=\begin{bmatrix} -1 & 6\\ -2& 6 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 1 & 2\\ -1& 4 \end{bmatrix}$?

We see that
$\det(A)=6=\det(B) \text{ and } \tr(A)=5=\tr(B).$ It follows from the formula $p(t)=t^2-\tr(A)t+\det(A)$ (or just computing directly) that the characteristic polynomials of $A$ and $B$ are both
$t^2-5t+6=(t-2)(t-3).$ Thus, the eigenvalues of $A$ and $B$ are $2, 3$. Hence both $A$ and $B$ are diagonalizable.
There exist nonsingular matrices $S$ and $P$ such that
$S^{-1}AS=\begin{bmatrix} 2 & 0\\ 0& 3 \end{bmatrix} \text{ and } P^{-1}BP=\begin{bmatrix} 2 & 0\\ 0& 3 \end{bmatrix}.$ So we have $S^{-1}AS=P^{-1}BP$, and hence
$PS^{-1}ASP^{-1}=B.$ Putting $U=SP^{-1}$, we have
$U^{-1}AU=B.$ (Since the product of invertible matrices is invertible, the matrix $U$ is invertible.)
Therefore $A$ and $B$ are similar.

## Related Question.

For more problems about similar matrices, check out the following posts:

### More from my site

• If Two Matrices are Similar, then their Determinants are the Same Prove that if $A$ and $B$ are similar matrices, then their determinants are the same.   Proof. Suppose that $A$ and $B$ are similar. Then there exists a nonsingular matrix $S$ such that $S^{-1}AS=B$ by definition. Then we […]
• A Matrix Similar to a Diagonalizable Matrix is Also Diagonalizable Let $A, B$ be matrices. Show that if $A$ is diagonalizable and if $B$ is similar to $A$, then $B$ is diagonalizable.   Definitions/Hint. Recall the relevant definitions. Two matrices $A$ and $B$ are similar if there exists a nonsingular (invertible) matrix $S$ such […]
• If 2 by 2 Matrices Satisfy $A=AB-BA$, then $A^2$ is Zero Matrix Let $A, B$ be complex $2\times 2$ matrices satisfying the relation $A=AB-BA.$ Prove that $A^2=O$, where $O$ is the $2\times 2$ zero matrix.   Hint. Find the trace of $A$. Use the Cayley-Hamilton theorem Proof. We first calculate the […]
• Trace, Determinant, and Eigenvalue (Harvard University Exam Problem) (a) A $2 \times 2$ matrix $A$ satisfies $\tr(A^2)=5$ and $\tr(A)=3$. Find $\det(A)$. (b) A $2 \times 2$ matrix has two parallel columns and $\tr(A)=5$. Find $\tr(A^2)$. (c) A $2\times 2$ matrix $A$ has $\det(A)=5$ and positive integer eigenvalues. What is the trace of […]
• True or False: If $A, B$ are 2 by 2 Matrices such that $(AB)^2=O$, then $(BA)^2=O$ Let $A$ and $B$ be $2\times 2$ matrices such that $(AB)^2=O$, where $O$ is the $2\times 2$ zero matrix. Determine whether $(BA)^2$ must be $O$ as well. If so, prove it. If not, give a counter example.   Proof. It is true that the matrix $(BA)^2$ must be the zero […]
• Maximize the Dimension of the Null Space of $A-aI$ Let $A=\begin{bmatrix} 5 & 2 & -1 \\ 2 &2 &2 \\ -1 & 2 & 5 \end{bmatrix}.$ Pick your favorite number $a$. Find the dimension of the null space of the matrix $A-aI$, where $I$ is the $3\times 3$ identity matrix. Your score of this problem is equal to that […]
• Determinant/Trace and Eigenvalues of a Matrix Let $A$ be an $n\times n$ matrix and let $\lambda_1, \dots, \lambda_n$ be its eigenvalues. Show that (1) $$\det(A)=\prod_{i=1}^n \lambda_i$$ (2) $$\tr(A)=\sum_{i=1}^n \lambda_i$$ Here $\det(A)$ is the determinant of the matrix $A$ and $\tr(A)$ is the trace of the matrix […]
• How to Diagonalize a Matrix. Step by Step Explanation. In this post, we explain how to diagonalize a matrix if it is diagonalizable. As an example, we solve the following problem. Diagonalize the matrix $A=\begin{bmatrix} 4 & -3 & -3 \\ 3 &-2 &-3 \\ -1 & 1 & 2 \end{bmatrix}$ by finding a nonsingular […]

### 1 Response

1. 06/13/2017

[…] For a solution together with similar problems, see the post “Determine whether given matrices are similar“. […]

##### If Two Matrices are Similar, then their Determinants are the Same

Prove that if $A$ and $B$ are similar matrices, then their determinants are the same.

Close