Similarity must be a contract, and contracts must be equivalent.
Equivalence means that the matrices have the same r,
Matrix contraction, CtAC(Ct transposition) =B, matrix multiplied by reversible matrix, its r is unchanged, r(B)=r(CtAC)=r(AC)=r(A), equivalent. Similarly, two matrices are similar and must be equivalent.
Matrix similarity must be a contract. Because the two matrices are similar and have the same characteristic polynomial and characteristic root, they must have the same r and inertia coefficient and can be transformed into the same standard form. The necessary and sufficient condition of a matrix contract is that they have the same R and canonical form (A and B have their corresponding diagonal matrices, which can be deduced by combinatorial definition, which is too difficult to understand), and canonical forms and other canonical forms must be equal, so they are similar to a contract.