Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
3  
Your question has different answers depending on what kind of matrices you allow. Are $A$ and $B$ real matrices? Do you care if $S$ is allowed to be complex or not? unitary/orthogonal or not, etc.. –  Ryan Budney Dec 12 '10 at 20:50
add comment

5 Answers

up vote 13 down vote accepted

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).

share|improve this answer
7  
"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)." - To illustrate, look at $$\bigl(\begin{smallmatrix}1&0\\0&1\end{smallmatrix}\bigr)$$ and $$\bigl(\begin{smallmatrix}1&1\\0&1\end{smallmatrix}\bigr)$$ ; they have the same characteristic polynomial, but are definitely not similar (the latter is a defective matrix, not having a complete eigenvector set). –  J. M. Dec 13 '10 at 1:00
7  
In the realm of inexact arithmetic, the Jordan decomposition cannot be stably computed (since the similarity transformations required can be arbitrarily ill-conditioned), and in its place, the Schur decomposition (which uses orthogonal/unitary similarity transformations) is used. –  J. M. Dec 13 '10 at 1:02
    
@J.M. Good point, and good illustration. –  Arturo Magidin Dec 13 '10 at 1:05
add comment

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$, $dimKer(\lambda_i I-A_k)$ must be equal for each matrix. This also implies that for each $\lambda_i$, $dimIm(\lambda_i I-A_k)$ must be equal since $dimIm+dimKer=dimV$
  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 $dimV$, or if all the eigenvalues are distinct, or if they have $dimV$ linearly independent eigenvectors.

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

share|improve this answer
1  
tr(A) can also be found from the sum of the eigenvalues. –  Robert S. Barnes Oct 15 '12 at 11:24
add comment

For $A, B \in \mathbb{R}^{2,2}$ it might be possible to test by finding whether there exists matrix $S \in \mathbb{R}^{2,2}$ such that $B=S^{-1}AS$.

Suppose your matrices are:

$$ A= \begin{bmatrix} 0 & 1\\ 1 & 1\\ \end{bmatrix} $$ $$ B= \begin{bmatrix} 1 & 1\\ 1 & 1\\ \end{bmatrix} $$

Then you can try to make a test like this:

$$ \begin{bmatrix} 1 & 1\\ 1 & 1\\ \end{bmatrix} = \frac{1}{ad-bc} \begin{bmatrix} a & -b\\ -c & d\\ \end{bmatrix} \begin{bmatrix} 0 & 1\\ 1 & 1\\ \end{bmatrix} \begin{bmatrix} a & c\\ b & d\\ \end{bmatrix} $$

It might end up with some polynomial and based on that a conclusion can be made whether these matrices are similar.

share|improve this answer
add comment

If you have two specific matrices, A and B, here is a method that will work. It's messy, but it will work for any two matrices, regardless of size. First, rewrite the similarity equation in the form AS=SB, where S is a matrix of variables. Multiply out both matrices to obtain a set of n-squared linear equations in n-squared unknowns. Solve the system using Gaussian-Jordan elimination. You need to use the form of the Gaussian-Jordan algorithm that produces matrices in row-echelon form when there is no single solution to the system. The system of equations always has a solution, the zero matrix. If the Gaussian-Jordan elimination produces a single solution, the matrices are not similar. If there is more than one solution, the row-echelon matrix can be solved for a set of basis vectors of the solution space. Since the constant terms are all zero, any matrix generated by the basis vectors is a similarity matrix for A and B.

share|improve this answer
    
I don't think this method always works. It is quite possible that the subspace of solutions is nonzero but consists entirely of singular matrices. Since the determinant is not a linear form on the vector space of square matrices, I don't think it is even easy to see whether it takes nonzero values anywhere on the solution subspace. –  Marc van Leeuwen Apr 12 at 8:45
add comment

First off, the $2\times2$ case is easy: two distinct $2\times2$ matrices are similar if and only if they have the same characteristic polynomial, and neither of them is a scalar matrix (multiple of the identity). This is essentially because for such small matrices the characteristic polynomial leaves very little room for variation of the minimal polynomial (and other invariant factors that in this case follow from it).

There is a decision method that works in full generality (any field$~K$, any size$~n$ square matrices) and is theoretically simple: compute the invariant factors by determining the Smith normal form over $K[X]$ of the matrices $XI_n-A$ and $XI_n-B$ (those whose determinants define the respective characteristic polynomials); then $A$ and $B$ are similar if and only if identical lists of invariant factors are found.

With "theoretically simple" I mean the method only uses basic operations in$~K$ you might be expected to perform: arithmetic of scalars and testing for equality; notably it does not require finding roots or factoring polynomials. Essentially the Smith normal form algorithm is a generalisation of Gaussian elimination, but working over a PID (here $K[X]$) rather than over a field, and allowing column operations as well as row operations. This does not mean the procedure is easy to perform (by hand), as it is like in iterated version of the Euclidean algorithm in $K[X]$, which algorithm is notable for producing very complicated intermediate results, at least when $K=\Bbb Q$ (and over $\Bbb R$ or $\Bbb C$ the algorithm isn't really effective, as testing for equality is not accurately possible).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.