Similarity (linear algebra)

In linear algebra, two square $n \times n$ matrices $A,B$ are similar if there exists an unitary matrix $U$ such that $B = U^{-1}AU$.

If $B$ has $n$ distinct eigenvalues, then it has a basis of eigenvectors and will be similar to a diagonal matrix.