[Math] Find the orthogonal projector of a vector onto a subspace

linear algebra

So I have this question here which asks me to find the orthogonal projection of $v=(1,2,3)$ onto the subspace $W$spanned by the vectors $u_1=(2,-2,1)$ and $u_2=(-1,1,4)$.

I notice that both $u_1$ and $u_2$ are orthogonal to each other so I am guessing that's some kind of clue.

Since I'm working in 3 dimensions, I'm guessing the cross product comes into play somehow but I am not sure. Can someone please suggest how I can approach this problem? Thanks!

Best Answer

There's a quick formula that you can use. Some explanations to guide you to it. We're working on a finite-dimensional vector space. You know that $\mathbb{R}^3=W\oplus W^\perp$. Since $(u_1,u_2)$ is an orthogonal basis of $W$, if you take $u_3$ any nonzero element in $W^\perp$, then $(u_1,u_2,u_3)$ is an orthogonal basis of $\mathbb R^3$. So there are $\alpha_1,\alpha_2,\alpha_3\in\mathbb R$ such that $$v=\alpha_1u_1+\alpha_2u_2+\alpha_3u_3\tag{1}$$

What is the orthogonal projection of $v$ onto $W$? Well, $v$ can be uniquely written as $v=x+y$ where $x\in W$ and $y\in W^\perp$, right? The orthogonal projection of $v$ onto $W$ is simply $x$, which is the vector $\alpha_1u_1+\alpha_2u_2$ by $(1)$. Two things to motivate this: Firstly, as $v$ can be written in a unique manner as a sum of two orthogonal vectors, one of which is in $W$, it is natural to give this definition. Secondly, you can actually show that $x$ is the unique vector that satisfies $$\|v-x\|=\inf_{w\in W}\|v-w\|\tag{2}$$ so $(2)$ gets us back to the orthogonal projection we used in in high-school ;)

So, using $(1)$, the orthogonal projection of $v$ is $\alpha_1u_1+\alpha_2u_2$. Using inner products, can you find what are $\alpha_1$ and $\alpha_2$? Don't forget that $u_1,u_2$ and $u_3$ are orthogonal ;)