standard matrix of a orthogonal projection linear transformation I am try to solve part (b) of question 1 in:

I'm not exactly sure how I should approach part (b). My attempt at the question so far is to plug in the elementary basis vectors $e_1, e_2, e_3$ into the span of vector given to see what the linear transformation does to $e_1, e_2, e_3$ and form the standard matrix from there which hasn't worked so far. Any hints?
 A: To expand on my comments since they were getting long.
Suppose we have a set of orthonormal vectors $v_1$ and $v_2$. If we want to compute the orthogonal projection of $x$ onto the span of $v_1$ and $v_2$ we would first project $x$ onto $v_1$:
$$
y = P_1x = (v_1^Tx) v_1
$$
and then onto $v_2$:
$$
P_2x = (v_2^Tx)v_2
$$
Therefore,
$$
Px = (v_1^Tx)v_1 + (v_2^Tx)v_2
$$
We can write this as the sum of rank-1 outer products:
$$
Px = v_1v_1^Tx + v_2v_2^Tx = (v_1v_1^T+v_2v_2^T)x
$$
Therefore,
$$
P = VV^T = [v_1 v_2]
\begin{bmatrix}
v_1^T \\ v_2^T
\end{bmatrix}
$$
If $v_1$ and $v_2$ are not orthonormal you can first orthonormalize them (using Gram-Schmidt) and then do this. Alternatively, you can use the formula Foobaz John gave.
A: Here is a way. We note that for $y\in \mathbb{R}^3$ the projected vector $Ay$ is such that $y-Ay$ is orthogonal to $V$. In particular if we form a matrix $B$ whose columns are $(1,1,0)^T$ and $(0,0,1)^T$ respectively, we get that
$$
B'(y-Ay)=0.
$$
But $Ay=Bc$ for some $c$ whence
$$
B'(y-Bc)=0\iff B'y=B'Bc
$$
Since $B$ is full-rank, it follows that $B'B$ is invertible whence
$$
c=(B'B)^{-1}B'y\implies Ay=Bc=B(B'B)^{-1}B'y.
$$
So $A=B(B'B)^{-1}B'$.
