Solving the latter equation gives us \( \mathbf{u} \) and thus the needed transformation \( \mathbf{P} \). We do first however need to compute the scalar \( k \) by taking the scalar product of the last equation with its transpose and using the fact that \( \mathbf{P}^2=\mathbf{I} \). We get then $$ (\mathbf{Pv})^T\mathbf{Pv} = k^{2} = \mathbf{v}^T\mathbf{v}= |v|^2 = \sum_{i=2}^{n}a_{i1}^2, $$ which determines the constant $ k = \pm v$.