Solution (source code)

= Solution

From part (f), $PQ=\operatorname{diag}(-1,-1,1)$. To obtain $PQR=-I$, choose the <Householder transformation> that reverses only the third coordinate:
$$
\boxed{R=\operatorname{diag}(1,1,-1),\qquad \mathbf r=(0,0,\sqrt2)^T.}
$$
Indeed $\mathbf r\mathbf r^T=\operatorname{diag}(0,0,2)$, so $R_{ij}=\delta_{ij}-r_ir_j$, and direct <matrix multiplication> gives $PQR=-I$. The alternative <vector> $-\mathbf r$ produces the same <matrix>. Geometrically $R$ reflects in the <plane> $x_3=0$, completing the reversal of all three coordinates.