## Matrix Representing the Projective Linear Transformation in R3

In
$\mathbb{R}^3$
, suppose we have a vector
$\mathbf{u}$
.
How do we construct the matrix that represents projection of any vector onto
$\mathbf{u}$
?
We form the matrix whose columns are the vectors
$( \frac{\begin{pmatrix}1\\0\\0\end{pmatrix} \cdot \begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix}}{\sqrt{1^2+0^2+0^2} \sqrt{u^2_1+u^2_2+u^2_3}} ) \begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix} =\frac{1}{\sqrt{u^2_1+u^2_2+u^2_3}} \begin{pmatrix}u^2_1\\u_1u_2\\u_1u_3\end{pmatrix}$

$( \frac{\begin{pmatrix}0\\1\\0\end{pmatrix} \cdot \begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix}}{\sqrt{1^2+0^2+0^2} \sqrt{u^2_1+u^2_2+u^2_3}} ) \begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix} =\frac{1}{\sqrt{u^2_1+u^2_2+u^2_3}} \begin{pmatrix}u_2u_1\\u^2_2\\u_2u_3\end{pmatrix}$

$( \frac{\begin{pmatrix}0\\0\\1\end{pmatrix} \cdot \begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix}}{\sqrt{1^2+0^2+0^2} \sqrt{u^2_1+u^2_2+u^2_3}} ) \begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix} =\frac{1}{\sqrt{u^2_1+u^2_2+u^2_3}} \begin{pmatrix}u_3u_1\\u_3u_2\\u^2_3\end{pmatrix}$

This gives the transformation matrix
$\frac{1}{\sqrt{u^2_1+u^2_2+u^2_3}} \left| \begin{array}{ccc} u^2_1 & u_1 u_2 & u_1u_3 \\ u_2u_1 & u^2_2 &u_2u_3 \\ u_3u_1 & u_3u_2 &u^2_3 \end{array} \right|$