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!
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). $$