User:IssaRice/Linear algebra/A matrix is only similar to itself if and only if it is a scalar multiple of the identity matrix

From Machinelearning

"matrix is only similar to itself" means that the linear map expressed in any single basis has the same matrix

The identity matrix has the remarkable property that it is only similar to itself: if A is matrix similar to I, then A=I. Why? We have A=QIQ1 for some invertible Q by definition of matrix similarity. but the rhs simplifies to I.

Are there any other matrices with this property? If λR, then for λI we have Q(λI)Q1=λ(QIQ1)=λI so any scalar multiple of the identity matrix also has this property.

Are there any others? It turns out there aren't! We want to show that if a matrix A does not have the form λI, then there is a distinct matrix B that it is similar to. More precisely, suppose AλI for any λR. Then there exists a matrix B and an invertible matrix Q such that A=QBQ1.

We split this proof into two cases:

  1. Suppose A is not a diagonal matrix. Then there is an off-diagonal entry that is non-zero, say ajk (row j, column k, j!=k). Let E be the elementary matrix that multiplies row j by 2. Then E1, when applied from the right, divides column j by 2. Now if we consider EAE1, its entry j,k will be 2ajkajk. So EAE1A, even though the two matrices are similar.
  2. Suppose A is a diagonal matrix where not all entries on the diagonal are equal. Call two of those non-diagonal entries j and k, so that ajjakk. Let E be the elementary matrix that transposes row j and row k. Then E1, when applied from the right, transposes column j with column k. Thus EAE1 will be the matrix with ajj and akk swapped, but all other entries staying the same. So we see that EAE1A, even though the two matrices are similar.