Recall that two \(n\times n\) matrices \(A\) and \(B\) are said to be similar if there exists an invertible  \(n\times n\) matrix \(P\) such that \(A=PBP^{-1}\).