If symmetric $n \times n $ matrix $S^3=I_n$, does $S=I_n$? Let $S$ be a real symmetric $n \times n$ matrix. Does $S^3=I_n$ imply $S=I_n$?
I started by looking at $S^2=I_n$ and found that this does not imply $S=I_n$, because of the counterexample
\begin{align}\begin{bmatrix} 
-\sin(\alpha) & \cos(\alpha) \\
\cos(\alpha) & \sin(\alpha)
\end{bmatrix} \end{align}
For $S^3$ however, I do not really know how to approach the problem.

By the given conditions,
\begin{aligned}
\langle (S^2+S+I)x,x\rangle
&=\langle (S^2+S^4+I)x,x\rangle\\
&=\langle Sx,Sx\rangle+\langle S^2x,S^2x\rangle+\langle x,x\rangle>0
\end{aligned}
for every nonzero vector $x$. Hence $S^2+S+I$ is nonsingular. Yet, $S^2+S+I$ divides $S^3-I$. Therefore...
