How to find the matrix representation of projection $4$d onto $2$d Here is a problem

$W=\langle(1,1,1,1),(1,1,2,2)\rangle$ is a subspace of Euclidean inner product space $\mathbb{R}^{4}$, and $T_{P}:\mathbb{R}^{4}\to\mathbb{R}^{4}$ is a projection map onto $W$. If $P$ is the matrix representation of $T_{P}$, find the value of $\det(P^{2}+2P+3I)$, where $I$ is $4\times 4$ identity matrix.

Using the fact that $P^{2}=P$, I solved the above problem.
Is there any way to get the matrix representation $P$ of $T_{P}$ exactly?
Give some advice. Thank you!
 A: Yes. If we denote
$$v_1=(1,1,1,1)^T, \\ v_2=(1,1,2,2)^T, $$
and let $A=[v_1 v_2]$, we have 
$$T_P=A (A^TA)^{-1} A^T=\left(
\begin{array}{cccc}
 \frac{1}{2} & \frac{1}{2} & 0 & 0 \\
 \frac{1}{2} & \frac{1}{2} & 0 & 0 \\
 0 & 0 & \frac{1}{2} & \frac{1}{2} \\
 0 & 0 & \frac{1}{2} & \frac{1}{2} \\
\end{array}
\right). $$
A: Upon orthogonalization  we get $$W=\langle(1,1,1,1),(1,1,2,2)\rangle =\langle(1/2,1/2,1/2,1/2),(-1/2,-1/2,1/2,1/2)\rangle$$
Let $U_1 = (1/2,1/2,1/2,1/2)$ and $ U_1 =(-1/2,-1/2,1/2,1/2)$
The projection of $X$ on W is simply $$X.U_1+X.U_2$$
The matrix of the projection is $$ M=\left(
\begin{array}{cccc}
 \frac{1}{2} & \frac{1}{2} & 0 & 0 \\
 \frac{1}{2} & \frac{1}{2} & 0 & 0 \\
 0 & 0 & \frac{1}{2} & \frac{1}{2} \\
 0 & 0 & \frac{1}{2} & \frac{1}{2} \\
\end{array}
\right)$$
A: You could extend the basis of W to a basis of $\mathbb{R}^4$, where the matrix is easy to write down. Then you can use a change of basis matrix to convert back to the usual basis.
Alternatively, convert the given basis for W to an orthonormal basis, and write A as the 2x4 matrix with those columns. Then $AA^T$ is the desired matrix - can you see why? 
