Assume all matrices are square. If A is similar to B, then A^2 is similar to B^2. I need to prove or disprove.

I know that to be similar there needs to exist a nonsingular matrix S such that A = S^(-1)BS.

I want to say that it will be true:

AA = [S^(-1)BS][S^(-1)BS] = S^(-1)BBS

A^2 = S^(-1)B^2S

Therefore, A^2 is similar to B^2

Can someone let me know if I am correct and if not, help me out?

Thanks!