How do I tell if matrices are similar?

I have two $2\times 2$ matrices, $A$ and $B$, with the same determinant. I want to know if they are similar or not.

I solved this by using a matrix called $S$: $$\left(\begin{array}{cc} a& b\\ c& d \end{array}\right)$$ and its inverse in terms of $a$, $b$, $c$, and $d$, then showing that there was no solution to $A = SBS^{-1}$. That worked fine, but what will I do if I have $3\times 3$ or $9\times 9$ matrices? I can't possibly make system that complex and solve it. How can I know if any two matrices represent the "same" linear transformation with different bases?

That is, how can I find $S$ that change of basis matrix?

I tried making $A$ and $B$ into linear transformations... but without the bases for the linear transformations I had no way of comparing them.

(I have read that similar matrices will have the same eigenvalues... and the same "trace" --but my class has not studied these yet. Also, it may be the case that some matrices with the same trace and eigenvalues are not similar so this will not solve my problem.)

I have one idea. Maybe if I look at the reduced col. and row echelon forms that will tell me something about the basis for the linear transformation? I'm not really certain how this would work though? Please help.


Solution 1:

There is something called "canonical forms" for a matrix; they are special forms for a matrix that can be obtained intrinsically from the matrix, and which will allow you to easily compare two matrices of the same size to see if they are similar or not. They are indeed based on eigenvalues and eigenvectors.

At this point, without the necessary machinery having been covered, the answer is that it is difficult to know if the two matrices are the same or not. The simplest test you can make is to see whether their characteristic polynomials are the same. This is necessary, but not sufficient for similarity (it is related to having the same eigenvalues).

Once you have learned about canonical forms, one can use either the Jordan canonical form (if the characteristic polynomial splits) or the rational canonical form (if the characteristic polynomial does not split) to compare the two matrices. They will be similar if and only if their rational forms are equal (up to some easily spotted differences; exactly analogous to the fact that two diagonal matrices are the same if they have the same diagonal entries, though the entries don't have to appear in the same order in both matrices).

The reduced row echelon form and the reduced column echelon form will not help you, because any two invertible matrices have the same forms (the identity), but need not have the same determinant (so they will not be similar).

Solution 2:

My lecturer, Dr. Miryam Rossett, provided the following in her supplementary notes to her linear 1 course ( with a few small additions of my own ):

  1. Show that the matrices represent the same linear transformation according to different bases. This is generally hard to do.
  2. If one is diagonalizable and the other not, then they are not similar.
  3. Examine the properties of similar matrices. Do they have the same rank, the same trace, the same determinant, the same eigenvalues, the same characteristic polynomial. If any of these are different then the matrices are not similar.
  4. Check the geometric multiplicity of each eigenvalue. If the matrices are similar they must match. Another way of looking at this is that for each $\lambda_i$, $\dim \ker(\lambda_i I-A_k)$ must be equal for each matrix. This also implies that for each $\lambda_i$, $\dim \text{im}(\lambda_i I-A_k)$ must be equal since $\dim \text{im}+\dim \ker=\dim V$
  5. Assuming they're both diagonalizable, if they both have the same eigenvalues then they're similar because similarity is transitive. They'e diagonalizable if the geometric multiplicities of the eigenvalues add up to $\dim V$, or if all the eigenvalues are distinct, or if they have $\dim V$ linearly independent eigenvectors.

Numbers 3 and 4 are necessary but not sufficient for similarity.