Definition:Matrix Similarity

Definition
Let $R$ be a ring with unity.

Let $\mathbf A, \mathbf B$ be square matrices of order $n$ over $R$.

Let there exist an invertible square matrix $\mathbf P$ of order $n$ over $R$ such that $\mathbf B = \mathbf P^{-1} \mathbf A \mathbf P$.

Then $\mathbf A$ and $\mathbf B$ are similar, and we can write $\mathbf A \sim \mathbf B$.

Thus, from the corollary to Matrix Corresponding to Change of Basis under Linear Transformation, two matrices are similar iff they are the matrices of the same linear operator, relative to (possibly) different ordered bases.