if:

A and B are matrices
and A^2 is similar to B^2

Is A guaranteed to be similar to B?

-------
Matrix similarity means that the matrices are identical if one of the matrices is converted to another basis. If matrices C and D are similar:

C = P^-1 * D * P

where P converts from standard basis to alternate basis B, and P^-1 is the inverse.

Counterexample: take A to be the identity matrix and define B by changing a 1 to -1 somewhere on the diagonal. Then A^2 = B^2, but A is not equal to B.

No transformation of the form
P A P^(-1) can make A equal to B. If two matrices are similar and diagonizable, then both matrices can be obtained from the same diagonal matrix using different transformaton matrices.

So, in diagonalized form they must be the same. But B and A are already in diagonalized form and are not the same.

great counterexample. thanks count.

You're welcome! I'm glad the counterexample helped illustrate the concept. If you have any more questions, feel free to ask!