How to find the last step of diagonalization of similar matrix?

How to find the last step of diagonalization of similar matrix?

1. Find the eigenvalue
2. Find the eigenvector corresponding to the eigenvalue
3. The eigenvectors are orthogonalized and normalized
4. Take the normalized vector obtained from 3 as the column to form an invertible matrix P,
Then p-inverse AP = B (B is the diagonal matrix, and the main diagonal element is the eigenvalue corresponding to the eigenvector)