Similarity Transformation Doesn't seem to work

1. Dec 6, 2014

I_am_learning

if A is a square matrix, and A' = B-1AB is its similarity transform (with a non-singular similarity transformation matrix B), then the eigenvalues of A and A' are supposed to be the same. I can verify this for all most all cases of A. But, it doesn't seem to work, when the eigen values of A are all zero. For example, it doesn't work when A = [0 1 0;0 0 0; 1 0 0].
Yet I can't see why, it shouldn't work.
from http://mathworld.wolfram.com/SimilarityTransformation.html
the eigen values of A' is given as a solution of
=0
= 0
= 0
= 0
= 0
=0
which is the solution for eigen values of A.

Last edited by a moderator: Apr 29, 2017
2. Dec 6, 2014

BruceW

for what matrix B did you find that the eigenvalues of B-1AB to be nonzero?

3. Dec 6, 2014

I_am_learning

I created a random matrix T,
T = rand(3)
T =
0.4509 0.7447 0.1835
0.5470 0.1890 0.3685
0.2963 0.6868 0.6256
and, the eigen values I got are:
eig(inv(T)*A*T)
ans =
1.0e-05 *
0.4418 + 0.0000i
-0.2209 + 0.3826i
-0.2209 - 0.3826i
Oh! now that I post it, I realize that, it may have to do with numerical errors, the values are very small anyway.
Thanks

4. Dec 7, 2014

BruceW

yeah, since the eigenvalues are of order 10^-5, it's likely they are nonzero just due to numerical error.