Finding Projection Vector Find the projection of the vector $t = [3, 3, 3]^T$ onto the subspace spanned by the vectors $\{x, y\}$, where $x = [6; 1; -3]$, $y = [1; 0; 2]$.
I was told to look at the orthogonal basis, project the vector to each basis element, and then add them up. So do I use the projection formula for $t$ and $x$, and $t$ and $y$, and then add those two together?
 A: In general, the procedure for finding the orthogonal projection of a vector $\vec v$ onto the subspace $\operatorname{span}(\vec a_1, \vec a_2, \dots, \vec a_k)$ is:
$1.$ Orthogonalize the vectors $\vec a_1, \vec a_2, \dots, \vec a_k$ to get the new set of vectors $\vec b_1, \vec b_2, \dots \vec b_k$.  There are several methods to do this, but the Gram-Schmidt process is the standard.  You may get some zero vectors in this process -- just throw them out.
$2.$ Find the projection of $\vec v$ onto each of these new vectors $\vec b_i$ via the formula:
$$\operatorname{proj}_{\vec b_i}\vec v = \frac {\langle \vec v, \vec b_i\rangle}{\|\vec b_i\|^2}\vec b_i = \frac {\vec v\cdot \vec b_i}{\|\vec b_i\|^2}\vec b_i$$
$3.$ Add each of these projections together to get your projection onto the subspace:
$$\operatorname{proj}_{\operatorname{span}(\vec a_1, \dots, \vec a_k)}\vec v = \sum_{i=1}^k \operatorname{proj}_{\vec b_i}\vec v$$
A: I assume that by "projection" you mean the orthogonal projection with respect to the usual dot product in $\mathbb{R}^3$.
Let $W$ be the subspace of $\mathbb{R}^3$ spanned by $x$ and $y$.
As you already mentioned correctly one has to consider an orthonormal basis of $W$. You may apply the Gram–Schmidt process to $x$ and $y$ to get such a basis. This basis will consist of two vectors (since $W$ is two dimensional), say $x'$ and $y'$.
The projection $p_W(t)$ of $t$ onto $W$ is then given by
$$ p_W(t) = \langle t, x' \rangle x' + \langle t, y' \rangle y'.$$
A: The method you state is good and is basically what the other two answers recommend.
However, this involves calculating two projections. This is not onerous, but there is an easier way to project a 3-D vector onto a 2-D plane defined by two linearly independent vectors.
1) Find the cross-product of the two vectors that define the plane.
2) Find the projection of your vector onto that vector.
3) Subtract that projection from your original vector.
You now have the projection of the original vector onto the plane. This took only one projection calculation, one cross-product, and one subtraction. The other method takes two projection calculations and an addition. Since cross-products are easier than projections, this method is easier. Note also that this method did not even require that the two basis vectors of the plane are orthogonal to each other--just that they are linearly independent.
