I am confused with the following (Sorry if this is a duplicate):
Let $S$ be a real $n \times n$ symmetric matrix, which is diagonalizable, of course, and let its Jordan normal form be $J=\text{diag}(\lambda_1,...,\lambda_n)$, where each $\lambda_i$ is an eigenvalue. Consider $M$ the change of basis, i.e. $M$ is an invertible matrix such that $S=M^{-1}JM$. We know it is possible to choose $M$ such that it is orthogonal, but can we guarantee that $M$ is always orthogonal?
No, we can't. The matrix $M$ will be orthogonal if and only if the basis of eigenvectors chosen to diagonalise the matrix are orthonormal. If we simply choose an orthonormal basis of eignevectors and scale one of the vectors by $2$, then the matrix $M$ will not be orthogonal.
Also, if $S$ fails to have $n$ distinct eigenvalues, then one of the eigenspaces must be of dimension at least $2$, so we can choose an eigenbasis whose vectors are not even orthogonal (let alone orthonormal).
As for a concrete example, pick your favourite non-orthogonal non-singular $2 \times 2$ matrix $M$, and note that $M$ diagonalises the $2 \times 2$ identity matrix, i.e. $M^{-1} I M$ is diagonal, even though $M$ is not orthogonal.