I have to confirm that matrix A is similar to diagonal matrix. I have to find diagonal matrix D and rotation matrix P so it will be $D=P^-1AP.$
Matrix $A=\begin{bmatrix}1&0&0&2\\0&2&1&0\\ 0&2&1&0\\1&0&0&2\end{bmatrix}$.
My question is how do I find that P matrix and as D I would use matrix that looks something like $D=\begin{bmatrix}x&0&0&0\\0&x&0&0\\ 0&0&x&0\\0&0&0&x\end{bmatrix}$ and then find the x. Is my understanding correct or is it totally out of the way? (I'm not asking for solution just for hints and if I understand the problem correctly).
Find a basis of eigenvectors of $A$. Then the matrix whose columns are those eigenvectors is the matrix $P$ that you're after.