It's well known that the following set of real square matrices is dense: those matrices $M$ for which there exists an invertible matrix $P$ such that $P M P^{-1}$ is diagonal. My question is can this statement be strengthened so that $P = P^{-1}$?


The motivation for this question comes from the spectral theorem, whose statement is: Given a matrix $M$ such that $M = M^T$, there exists a matrix $P$ such that $P M P^{-1}$ is diagonal and $P P^T = I$. I'm wondering what happens if you drop the transpose operation. The resulting statement is clearly false, but the question remains "how true" it is.


Note that the set of matrices $P$ such that $P=P^{-1}$ is the same as the set of matrices that are diagonalisable and whose eigenvalues are $\pm 1$.



Is the following set of real square matrices dense: Those that can be diagonalised by a square root of the identity
**No**


Consider $2\times2$ matrices $M$ whose eigenvalues are not real (they form an open set). The eigenvalues are complex conjugate, as well as the eigenvectors. If $M=P^{-1}DP$, then the columns of $P$ are eigenvectors, thus
$$P=\begin{pmatrix} aw & b\bar w \\ a z & b\bar z \end{pmatrix}.$$
Writing $P^2=I\_2$ gives you that $wz$ is real, which is unlikely.


