Definition
Two matrices $A$ and $B$ are said similar if there exist an inverible matrix $P$ such that $$ B=PAP^{-1} $$
Definition
A square matrix $A$ is said orthogonal if it is invertible and its inverse $A^{-1}$ is equals to its transpose $A^{tr}$ , that is $$ AA^{tr}=I $$
Theorem
Any real symmetric (square) matrix is diagonalizzable and in particular its eingevectors form an orthonormal base.
So by the last theorem we know that any real symmetric matrix is similar to a diagonal matrix and in particular the base of the latter is orthonormal but unfortunately I do not able to argue if the matrix $P$ above defined is in this case orthogonal. So could someone help me, please?
If $M$ is a real symmetric matrix, then by the first part of the theorem, it is diagonalizable, that is
$$M = P D P^{-1}$$
where $D$ is a diagonal matrix with entries equal to the eigenvalues of $M$, and where the columns in $P$ are the corresponding eigenvectors. What we need to show is that the matrix $P$ can in fact be chosen to be orthogonal. To see this, we need the other part of the theorem, namely that $M$ has an orthonormal basis of eigenvectors. By choosing an orthonormal basis of eigenvectors, the corresponding $P$ becomes orthogonal.