Solution (source code)

= Solution

For an arbitrary <vector> $\mathbf x$, expansion in the <orthonormal basis> gives $x_i=(a_i a_j+b_i b_j+c_i c_j)x_j$, with summation over $j$. Since this holds for every $\mathbf x$, the <resolution of the identity in an orthonormal basis> is
$$
a_i a_j+b_i b_j+c_i c_j=\delta_{ij}.
$$
Let $P_a=\mathbf a\mathbf a^T$, and similarly for $b,c$. The three <orthogonal projection matrices> sum to $I$ and have pairwise products zero. Thus
$$
\boxed{(I-2P_c)(I-2P_b)(I-2P_a)=I-2(P_a+P_b+P_c)=-I,\qquad\mathbf s_{\rm out}=-\mathbf s_{\rm in}.}
$$
Any ray meeting all three ideal perpendicular mirrors therefore returns in the opposite direction, independently of reflection order. This is the geometry of a <corner reflector>, a kind of <retroreflector> used in <lunar laser ranging>.