If A and B are n × n matrices, A is similar to B if there exists an invertible matrix P such that
Every matrix is similar to itself with P = I. The only similarity transformation that holds for the identity matrix or the zero matrix is this trivial one.
Similarity is a symmetric relation. If AB, then BA. Therefore, premultiplying Equation 27 by P-1 and postmultiplying it by P yields
Similarity is also a transitive relation. If AB and BC, then AC.
Since similarity is reflexive, symmetric, and transitive, it is an equivalence relation. A common example of a similarity transformation in linear algebra is changing the basis of a vector space.