The linear algebra course that I'm taking has provided us with examples of how to find the orthogonal projection of a vector onto a subspace given the orthogonal basis of that subspace, however, I am unsure of how to visualise what this would look like given only two vectors. Is there a procedure I can follow to go about finding matrix A in this case?
1 Answer
Note $Ax=0$ implies $(A^TA)x=0$. So any solution $x$ needs to be in the kernel of $A^TA$.
Indeed, if $(A^TA)x=0$ then $(A^TA)x\cdot y=0$ (for all $y$) which is equivalent to $(Ax)\cdot(Ay)=0$, but the only way $Ax$ is both in the range of $A$ and orthogonal to the range of $A$ (the values $Ay$ for all possible $y$) is if $Ax=0$, so being in the kernel of $A^TA$ is sufficient for $Ax=0$.
A vector is in the kernel of a matrix $B$ if and only if it is orthogonal to all of $B$'s rows since the components of $Bx$ are the rows of $B$ with $x$.
But the rows of $A^TA$ are the same as the columns of $A^TA$ since it's symmetric! Thus, $x$ is a solution to $Ax=0$ if and only if $x$ is in the orthogonal complement of $W=\mathrm{Col}(A^TA)$.
Every vector $z$ has a parallel and perpendicular component with respect to a subspace $W$, called the projection $\mathrm{proj}_W(z)=a$ and the rejection respectively. Here, we can solve for the rejection of $z$ away from $W$ by simply subtracting the projection; that is, $z-a$ is orthogonal to $W$.
I'll let you figure out how to apply this to (b).
