# Find all similar matrices to diagonal matrix

The given task is to find all 2x2 Matrices A that are similar to:

a) $\begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}$

b) $\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$

c) $\begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix}$

However, I don't really know which steps to take. Obviously, since they are all in their diagonal form we can see that they have the eigenvalues

a) $\lambda = 0$
b) $\lambda = 1$
c) $\lambda_{\mathrm{1}} = 1,\lambda_{\mathrm{2}} = 2$

Now how do I go about finding the general matrix $A$ that is similar to these? Do I have to define $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$ and calculate its eigenvalues and eigenvectors?

I know that the definition of similar matrices $A,B$ is that there exists some matrix $S$ so that:

$A = S^{-1}BS$

but I don't think that defining a general $S= \begin{bmatrix} e & f \\ g & h \end{bmatrix}$

and solving the equation is the proper way to do it. I also have a feeling that this has something to do with Jordan-Blocks but I can't seem to figure it out.

I'm sorry if this is a stupid question or something really simple, but we only had lectures on the whole topics of eigenvalues, eigenvectors and general eigenvectors two days ago.

• Every matrix is similar to itself, so you've already got examples of such matrices. Is the question to find all matrices similar to those ones? – Marc van Leeuwen May 27 '16 at 11:29
• You can't go wrong with the method of defining a general matrix $S$ in this $2\times 2$ case – Omnomnomnom May 27 '16 at 11:39
• That being said, you may notice that the first two commute with everything – Omnomnomnom May 27 '16 at 11:41
• @MarcvanLeeuwen Yes, the question basically states: "Which matrices $A$ are similar to each of the following a) - c)?". I edited my question for clarification. – Keiwan May 27 '16 at 12:17
• The first two matrices are just for contemplation (what is $S^{-1}AS$ in those cases). The last one is the only one where you actually have to do something. – Tobias May 27 '16 at 12:22

The first two diagonal matrices$~D$ commute with every matrix, so $S^{-1}DS=SS^{-1}D=D$ for any $S$, so these two are each only similar to themselves. So concentrate on the final matrix$~B$.

You can in principle compute the set $\{\, S^{-1}BS\mid s\in GL(2,\Bbb R)\,\}$ explicitly by using the formula for the inverse and matrix multiplication. You can maybe simplify the task by limiting $S$ to matrices with determinant $1$ or $-1$, since all invertible matrices can be brought into this form by a scalar multiplication, which scalar will not affect $S^{-1}BS$. Then you may find an equation to describe the resulting set.

Since $B$ has all its (two) eigenvalues distinct, there is an easier approach to get the result. Every matrix$~A$ with the same characteristic polynomial $X^2-3X+2$ as $B$ will have the same eigenvalues, and since they are all distinct $A$ will be diagonalisable. This means $A$ is similar to a diagonal matrix, which must be $B$ (possibly with the diagonal entries permuted, but all such diagonal matrices are similar, so being similar to one means being similar to$~B$). So you are looking for the set of matrices with characteristic polynomial $X^2-3X+2$. That set is $$\left\{\pmatrix{a&b\\c&d}\mid a+d=3,~ad-bc=2 \right\}.$$

• Thank you very much! The approach with the characteristic polynomial was exactly what I was looking for. I had actually started that way for the first Matrix but obviously since $S^{-1}BS = 0$ that becomes trivial. – Keiwan May 27 '16 at 14:56
• It's perhaps worthwhile to mention that $a+d$ and $ad-bc$ are the trace and determinant, respectively, of the matrix, which are both invariant under similarity transformations. – joriki May 27 '16 at 20:30

As has been noted in the comments, the first two matrices commute with all $S$, so they're similar only to themselves.

For c), note that any $2\times2$ matrix $S$ can be written as the product of a shear, a rotation and a scaling:

$$S=\pmatrix{p\\&r}\pmatrix{1\\q&1}\pmatrix{\cos\phi&\sin\phi\\-\sin\phi&\cos\phi}$$

(see this answer). Since diagonal matrices commute, the scaling has no effect in this case, so you can parametrise all matrices similar to a diagonal matrix using the shear and rotation parameters $q$ and $\phi$.

Alternatively, closer to your own approach, you can note that multiplying $S$ by an invertible diagonal matrix from the left doesn't change $A$, so instead of considering general $S= \begin{bmatrix} e & f \\ g & h \end{bmatrix}$ you can restrict to the cases $e,g\in\{0,1\}$.