Projection into a subspace? 
Let $S$ be a nonzero subspace with orthogonal basis $(v_1, \ldots, v_k)$. Then the projection of $u$ onto $S$ is given by:
$$\operatorname{proj}_S u = \frac {v_1 \dot{} u}{\operatorname{norm} (v_1)^2}v_1 + \cdots + \frac {v_k \dot{} u}{\operatorname{norm}(v_k)^2}v_k$$

Why does the basis have to be orthogonal? Doesn't the same formula allow you to "extract" the components even if the basis isn't orthogonal?
 A: There is certainly a way to find the projection if the basis is not orthogonal, but it's more complicated.  Say you have the two non-orthogonal vectors $\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}$ and $\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}$.  The projection of the vector $\begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}$ onto the first of these vectors is found by your formula to be $\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}$ and the projection onto the second is $\begin{bmatrix} 3/2 \\ 3/2 \\ 0 \end{bmatrix}$.  If you add those together, you get $\begin{bmatrix} 5/2 \\ 3/2 \\ 0 \end{bmatrix}$.  But the orthogonal projection of that third vector onto the space spanned by the first two is actually $\begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix}$.  So in order for the formula above to give correct results, you need orthogonality.
Generally, the orthogonal projection of the vector $x\in\mathbb R^{n\times1}$ onto the space spanned by the columns of an $n\times k$ matrix $M$ of rank $k$ is
$$
M(M^\top M)^{-1}M^\top x.
$$
(If $k=n$ then $M(M^\top M)^{-1}M^\top$ is the $n\times n$ identity matrix; if $k<n$, then $M(M^\top M)^{-1}M^\top$ is an $n\times n$ matrix of rank $k$.  The matrix is the middle that gets inverted is a $k\times k$ matrix.)
A: You might notice that the component of $v_1$ is extracted by $u \cdot v_1/|v_1|^2$.  The vector $v_1/|v_1|^2$ may be denoted $v^1$ and is called a reciprocal (or dual) basis vector.  When a basis is orthogonal, all the vectors of the reciprocal basis are also orthogonal and take on this simple form.
When the basis is not orthogonal, the expressions for the reciprocal basis vectors are considerably more complicated.  In three dimensions, they are obtained using cross products:
$$v^1 = \frac{v_2 \times v_3}{v_1 \cdot [v_2 \times v_3]}$$
In a general $N$-dimensional space, the geometric interpretation is that the reciprocal basis vectors are normal to hyperplanes formed by the other basis vectors.  $v^1$ is the normal vector to the plane spanned by $v_2, v_3$ in this case, and the magnitude is chosen so that $v_1 \cdot v^1 = 1$.
