# Finding the projection of y onto the span of two vectors

I was given the following question:

Given $$\{u_1,u_2\}$$ is an orthogonal set, find the orthogonal projection of $$y$$ onto Span$$\{u_1,u_2\}$$.$$y=\left(\begin{matrix}-1\\3\\6\\\end{matrix}\right), u_1=\left(\begin{matrix}-5\\-1\\2\\\end{matrix}\right),u_2=\left(\begin{matrix}1\\-1\\2\\\end{matrix}\right)$$

I know how to find proj$$_a\vec{b}$$. It is $$\frac{a\bullet b}{||a||^2}\vec{a}$$. What is throwing me off is the fact that here I'm not looking for the projection of y onto a vector, I'm looking for the projection of y onto the span of two vectors. How do I deal with that?

• You are finding the projection on a plane Commented Sep 1, 2020 at 16:21

$$Py=\frac{y\cdot u_1}{\left\|u_1\right\|^2}\,u_1+\frac{y\cdot u_2}{\left\|u_2\right\|^2}\,u_2$$
• Thanks! I solved like this and got: $\left(\begin{matrix}-1\\\frac{-9}{5}\\\frac{18}{5}\\\end{matrix}\right)$. The book's answer key says $\left(\begin{matrix}-1\\3\\6\\\end{matrix}\right)$. Am I right? Is the book right? Are the answers the same? What's going on here?