# Orthogonal projection of vector.

Find the orthogonal projection of vector $b$ onto column space of given matrix $A$, then find orthogonal projection of the same vector onto kernel of matrix $A^T$.

$$A=\begin{bmatrix} 0 & 1 \\ 1 & 3 \\ -1 & 1 \\ 0 & 0 \\ -1 & 1 \end{bmatrix}$$

$$b=\begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}$$

Ok i know what is column space, it is simply image of $A$ wich is obviosely span of columns of $A$ since they are linearly independent, now, when it comes to orthogonal projections, all i know is that $proj_\vec{a}\vec{b}=\frac{\vec{a}\vec{b}}{||\vec{a}||}\vec{a}$. Is this the same formula that i can use here? Because even if it is, how could i calculate dot product of $b$ and column space?

• Your formula for projection requires that $\vec a$ be a unit vector. – amd Oct 8 '17 at 16:07

Determine an orthogonal basis $\{e_1,e_2\}$ of the space spanned by the collumns, using Gram-Schmidt. Then the projection of $b$ is $\langle b,e_1\rangle e_1+\langle b,e_2\rangle e_2$.
• Ok i used Gram-Schmidt and i had ${e_1, e_2}$=$\begin{bmatrix} 0 \\ 1 \\ -1 \\ 0 \\ -1 \end{bmatrix}$ , $\frac{1}{3} \begin{bmatrix} 3 \\ 8 \\ 4 \\ 0 \\ 4 \end{bmatrix}$. I checked their orthogonality after i found them and they are orthogonal. Now i only need to find projection of b with your formula, right? – cdummie Oct 7 '17 at 8:53
• @cdummie Their norms should be equal to $1$. – José Carlos Santos Oct 7 '17 at 8:56
• Ok i thik i found out norm of $e_1$ is square root of 3 and of $e_2$ is $\sqrt{105}$ over 3, then $b^Te_1=0$ and $b^Te_2=\frac{\sqrt{105}}{3}$ so $b= 0e_1 + \frac{\sqrt{105}}{3} e_2$. Is that right? – cdummie Oct 7 '17 at 9:07
• @cdummie That's not what I got. I mean, I got the same $e_1$, but$$e_2=\frac13\begin{bmatrix}1\\2\\2\\0\\0\end{bmatrix}.$$ – José Carlos Santos Oct 7 '17 at 9:11