Finding the orthogonal projection of an inner product space upon a subspace

inner-productslinear algebralinear-transformationsprojection

Let $V=\mathbb R^3$ be an inner product space with the standard inner product (that means $\langle(x_1,y_1,z_1),(x_2,y_2,z_2)\rangle=x_1y_1+x_2y_2+x_3y_3$ ).
$U=span\{(1,2,3),(1,2,1)\}\subseteq V$

a) Find an orthonormal basis for $U$
b) Find an explicit formula for the orthogonal projection $P_U: V\rightarrow U$

So I found an orthonormal basis for $V$, denote that basis $B=(b_1,b_2)=\bigg(\frac{1}{\sqrt6}(1,2,1),\frac{1}{\sqrt{30}}(-1,-2,5)\bigg)$, and I'm totally sure it's an orthonormal basis, so no problem with that. On the other hand, what I'm having trouble with is finding the explicit formula. What I did was to use the following formula for the orthogonal projection:

Let $W\subseteq V$ be a vector subspace, where $V$ is an inner product vector space of finite dimension, and let $S=\{s_1,\dots,s_k\}$ be an orthonormal basis for $W$, then the orthogonal projection upon $W$ is given by: $P_W(u)=\sum_{i=1}^k\langle u,s_i\rangle\cdot s_i$

This is the way I used it:
$P_U(x,y,z)=\langle(x,y,z),b_1\rangle\cdot b_1+\langle(x,y,z),b_2\rangle\cdot b_2=\dots=\frac{1}{5}(x+2y,2x+4y,5z)$

The problem is that I got a projection upon $\mathbb R^3$, instead of only upon $U$ (I took vectors$\in\mathbb R^3\backslash U$ to find that out), and I dont get what is wrong with what I did.

Any help would be appreciated.

Edit: I found this similar post: orthogonal projection formula question , but since we didn't learned cross products I can't use the solution given there.

Best Answer

The range of $P_U$ is two dimensional. How did you conclude that it is whole of $\mathbb R^{3}$? I did not check all your calculations but your method is correct and it is likely that you have obtained the projection correctly.

Edit: I have checked your calculations and everything seems perfect. Your $P_U$ is the projection with range $U$.

Related Question