$v =\left [ \begin{matrix} 1 \\ 2 \\ 3 \\ 4 \\ \end{matrix} \right ] $ $ A =\left [ \begin{matrix} 1 & 2 & 2 & 1\\ 2 & 1 & 1 & 2\\ \end{matrix} \right ] $ Find projection of $v$ onto $RowA$
$A$~$\left [ \begin{matrix}
1 & 2 & 2 & 1\\
0 & 1 & 1 & 0\\
\end{matrix} \right ]
$ So $basis$ of $RowA$ is {$\left [ \begin{matrix}
1 \\
2 \\
2 \\
1 \\
\end{matrix} \right ]
$ ,$\left [ \begin{matrix}
0 \\
1 \\
1 \\
0 \\
\end{matrix} \right ]
$}.
$U=RowA$
$Proj_uv=(v.u_1/u_1^2)u_1+(v.u_2/u_2^2)u_2=$ $\left [ \begin{matrix}
4 \\
8 \\
11.5 \\
11.5 \\
\end{matrix} \right ]
$
But this is wrong, why?
Also, I used projection matrix $A(A^TA)^{-1}A^T$ and got the correct answer $\left [ \begin{matrix}
5/2 \\
5/2 \\
5/2 \\
5/2 \\
\end{matrix} \right ]$, but this is too complicated to use in exam.
Because the basis is not orthogonal. To use the formula, apply Gram-Schmidt process to find a orthogonal basis.