Two square matrices A and B of the same order are similar if there exists an invertible matrix P such that A = P–1BP. Similar matrices have the same determinant, trace, characteristic, and minimal polynomials. Two matrices which represent the same linear map, with respect to different bases, are similar. Similarity is an equivalence relation.