Solution (source code)

= Solution

Resolve the input along the three perpendicular eigendirections. The <linear map> \b[removes the component along $(1,2,1)$, stretches the component along $(1,-1,1)$ by $12$, and reverses and stretches the component along $(1,0,-1)$ by $6$]. Every output lies in the <plane> perpendicular to $(1,2,1)$. A nonzero input in the <kernel of a linear map> $A$ is sent to zero; other nonzero inputs remain in that output <plane>. Equivalently, take the <orthogonal projection> onto this <plane>, then scale by the two signed <eigenvalues> along its perpendicular eigendirections.