Solution (source code)

= Solution

For nonzero $w$, the <Householder transformation> is
$$
\boxed{H(w)=I-2\frac{ww^T}{w^Tw}.}
$$
The rank-one <matrix> $P=ww^T/(w^Tw)$ is symmetric and satisfies $P^2=P$. Consequently $H^T=H$ and $H^TH=(I-2P)^2=I-4P+4P^2=I$. Thus the <matrix> is symmetric and <orthogonal>; geometrically it reflects the component along $w$ and fixes its perpendicular hyperplane.