Solution (source code)

= Solution

Every $Q\in O(3)$ with $\det Q=1$ is a <rotation in three dimensions>, hence is the product of two reflections in planes through its axis whose angle is half the rotation angle.

If $\det Q=-1$, its real eigenvalue is $-1$: the other two eigenvalues are either a complex-conjugate pair or two real signs, and their product is positive. Let $v$ be a corresponding unit eigenvector and let $H$ be reflection in $v^\perp$. Then $HQ$ fixes $v$ and has determinant $1$, so it is a rotation and hence a product of two reflections. Since $Q=H(HQ)$, \b[every member of $O(3)$ is a product of at most three reflections].

Two reflections have determinant $1$, whereas one reflection has eigenvalues $(-1,1,1)$. The map $-I\in O(3)$ has determinant $-1$ but is not a reflection, so it cannot be a product of at most two reflections. Thus \b[three are sometimes necessary].