# Orthogonal projection on Span

For the vectors: $$v_1 = \frac {1}{2} \begin{pmatrix} 1 \\ 1 \\ 1 \\ 1 \end{pmatrix},\ v_2 =\frac {1}{\sqrt2} \begin{pmatrix} -1\\ 1 \\ 0 \\ 0 \end{pmatrix}$$

Find an orthogonal projection for $(-1,1,2,2)^T$ onto Span$(v_1,v_2)$, which is a subspace of $V$.

I am unsure how to find the orthogonal projection when I have to do it onto the Span of vectors, I hope somebody can show a method to calculate it or give a hint.

• Note that $v_1, v_2$ are a pair of orthogonal unit vectors. How do you find the orthogonal projection of a vector onto the subspace spanned by two of the natural basis vectors? What is the orthogonal projection of $(1,2,3,4)$ onto $\langle \mathbf {e_1},\mathbf {e_2}\rangle$? Apr 10 '18 at 13:27

• consider the matrix $A=[v_1\quad v_2]$
• the projection matrix is $P=A(A^TA)^{-1}A^T$
• I would like to add that if $v_1, v_2$ are orthonormal which they are in this case, the $A^T A$ term cancels out because of the property $A^T A = I$ and you'll end up with $P = A A^T$ which is an orthogonal projector (or projection matrix) onto a span of orthonormal vectors and the longer formula works for any span. Mar 24 at 14:03
The spanning set is orthonormal, so you simply add up the projections onto them: $$(v\cdot v_1)v_1+(v\cdot v_2)v_2.$$ As saulspatz hinted, this is exactly what you do to find the coordinates of $v$ relative to the standard basis, i.e., $v=x_v\mathbf e_1+y_v\mathbf e_2=(v\cdot\mathbf e_1)\mathbf e_1+(v\cdot\mathbf e_2)\mathbf e_2$.