The sufficient condition for the similarity of n-order matrix A and diagonal matrix is that a has n different eigenvalues and a is a real symmetric matrix. I want to ask: the general problem is to prove that n-order matrix A and B are similar. In this way, is it necessary to prove matrix B first It can be diagonalized, and then the above sufficient conditions are used to prove the similarity

The sufficient condition for the similarity of n-order matrix A and diagonal matrix is that a has n different eigenvalues and a is a real symmetric matrix. I want to ask: the general problem is to prove that n-order matrix A and B are similar. In this way, is it necessary to prove matrix B first It can be diagonalized, and then the above sufficient conditions are used to prove the similarity

Your approach is only applicable to the case that both a and B are diagonalizable. If B is not diagonalizable, your approach will be invalid
Even if a and B are diagonalizable, you have to prove that their eigenvalues are exactly the same (or their characteristic polynomials are the same)
Generally speaking, to prove that two matrices are similar, it is better to construct a similar transformation or analyze the corresponding λ - matrix directly. Common exercises can also be solved by analyzing the similar standard form