Suppose $a_1$ and $a_2$ are orthogonal unit vectors in $R^5$.
Where P is the projection matrix.
$P = a_1a_1^T + a_2a_2^T$
If $a_3$ is in $R^5$ , what combination of $a_1$ and $a_2$ is closest to $a_3$?
This has a simple solution. Just multiply matrix P with $a_3$
So we should have a result $a_1a_1^Ta_3 + a_2a_2^Ta_3$
But here the answer is given $a_1^Ta_3a_1 + a_2^Ta_3a_2$ . No process is stated though. Only the answer is given.
However $a^Ta$ equal to $aa^T$ as explained Product of a vector and its transpose (Projections)
Note when we are mentioning transpose we mean a vector in Matrix form. So I think that solution is incorrect. So my question is which solution is correct? And if the one given in the MIT link is correct ,then why?
Note: I know dot product is commutative but not it's matrix form.
As pointed to by @trancelocation, i didn't notice it before. Both the tings are same.
$a_1^Ta_3$ and $a_2^Ta_3$ are scalars.
So we have $a_1(a_1^Ta_3) + a_2(a_2^Ta_3)=(a_1^Ta_3)a_1 + (a_2^Ta_3)a_2$
Not deleting the question for future reference, if anyone else gets stuck.