The projection P onto the 1-dimensional subspace spanned by the vector is given by , wherexis the vector (x_1,x_2,x_3). In matrix notation, this looks like . So the matrix of P is .

The 2-dimensional subspace given by is the orthogonal complement of the above 1-dimensional subspace. So the projection onto it will have matrix .