Solution (source code)

= Solution

A real <matrix> is orthogonal when $Q^TQ=I$. If $Qv=\lambda v$, norm preservation gives $|\lambda|=1$. If $Qv=\lambda v$ and $Qw=\mu w$, preservation of the Hermitian <inner product> gives $(1-\overline\lambda\mu)v^\dagger w=0$; distinct unit-modulus <eigenvalues> therefore have orthogonal <eigenvectors>.

The nonreal <eigenvalues> of a real $3\times3$ <matrix> occur in conjugate pairs. Since their product is one and $\det Q=-1$, the remaining real <eigenvalue> is $-1$. If $x\cdot n=0$, then $(Qx)\cdot(Qn)=x\cdot n=0$, and $Qn=-n$, so $Qx\cdot n=0$: the plane $\Pi$ is invariant.

The restriction to $\Pi$ is a planar orthogonal map whose <determinant> is $(-1)/(-1)=1$, hence a rotation through some $\theta$. In an orthonormal <basis> adapted to $n$,
$$
Q\sim\operatorname{diag}(-1,R_\theta).
$$
Therefore $\operatorname{tr}Q=-1+2\cos\theta$ and
$$
\boxed{\det(Q-I)=(-2)\det(R_\theta-I)=4(\cos\theta-1).}
$$