$A\in M_n(\mathbb{R})$ is symmetric s.t. $A^{10}=I.$ Prove $A^2=I$ 
Let $A\in M_n(\mathbb{R})$ be symmetric, such that $A^{10}=I.$ Prove $A^2=I$

My thoughts:
Since $A$ is symmetric, $A^2$ is symmetric, so there exists an orthogonal $P\in M_n(\mathbb{R})$ such that $D=P^{-1}A^2P$ is a diagonal matrix.
I tried to work with that in order to find the "right" diagonal matrix such that after power manipulations, I could prove that $A^{10}$ is similar to $A^2$ and conclude the result, but got stuck.
Any help is appreciated.

The minimal polynomial of $A$ divides $x^{10}-1$.
$x^{10}-1=(x^2-1)q(x)$, where $q(x)$ has no real roots.
The eigenvalues of a real symmetric matrix are all real
and so its minimal polynomial is a product of linear real factors.
Therefore, the minimal polynomial of $A$ divides $x^2-1$ and so $A^2=I$.
