Solution (source code)

= Solution

The <vector triple product identity> gives $n\times(x\times n)=x-(n\cdot x)n$. Decompose $x=x_\perp+x_\parallel$, where $x_\parallel=(n\cdot x)n$ and $x_\perp\cdot n=0$. Then
$$
\Phi(x)=x_\perp+\alpha x_\parallel.
$$
The <linear map> acts as the identity on $n^\perp$ and as multiplication by $\alpha$ along $n$. Consequently \b[it is invertible exactly when $\alpha\ne0$], with
$$
\boxed{\Phi^{-1}(y)=y+\left(\alpha^{-1}-1\right)(n\cdot y)n.}
$$
Applying $\Phi$ to this expression recovers the perpendicular and parallel components of $y$ separately.