Understanding the Gram-Schmidt process I would like to better understand the gram-schmidt process. The statement of the theorem in my textbook is the following:

The Gram-Schmidt sequence $[u_1, u_2,\ldots]$ has the property that $\{u_1, u_2,\ldots, u_n\}$ is an orthonormal base for the linear span of $\{x_1, x_2, \ldots, x_k\}$ for $k\geq 1$. The formula for $\{u_1, u_2,\ldots, u_n\}$ is:
  \begin{equation}
x_k   = \left|\left| x_k - \sum\limits_{i<k}\langle x_k, u_i\rangle u_i \right|\right|_2^{-1} \left(x_k - \sum\limits_{i<k}\langle x_k, u_i\rangle u_i\right)
\end{equation}

Note that I am primarily interested in how all of the vectors are orthogonal. The norm term in the above equation tells me that all the vectors will be unit vectors and hence we get an orthonormal set. Anyway, I see how this works algebraically; Let $v = x_k - \sum\limits_{i<k}\langle x_k, u_i\rangle u_i$. Now, take the dot product of $\langle v, u_j\rangle$ for some $j<k$:
\begin{equation}
  \langle v, u_j\rangle = \langle x_k, u_j\rangle - \sum\limits_{i<k}\langle x_k, u_i\rangle\langle u_i, u_j\rangle
\end{equation}
When we assume in the induction hypothesis that we have an orthonormal basis for $i<k$ then the sum is zero except when $i=j$. This leaves us with:
\begin{equation}
  \langle v, u_j\rangle = \langle x_k, u_j\rangle - \langle x_k, u_j\rangle = 0
\end{equation}
OK, I can logically follow algebra, but how can I see this geometrically? Can someone provide both 2D and 3D examples/plots? Since I am specifically interested in seeing how all the vectors meet at 90 degrees.

Let $S_{j}$ be the space spanned by $\{\mathbf{x}_{1},\ldots,\mathbf{x}_{j}\}$.
We use an inductive approach, and assume that $\{\mathbf{u}_{1},\ldots,\mathbf{u}_{j}\}$ is an orthonormal basis for $S_{j}$, with the goal of proving that $\{\mathbf{u}_{1},\ldots,\mathbf{u}_{j+1}\}$ is an orthonormal basis for the space $S_{j+1}$.
The method is easiest to understand geometrically if you think in terms of projections.  Let $P_{j}$ be the orthogonal projection onto $S_{j}$.
The main insight is that $$P_{j}\mathbf{x}_{j+1}=\sum_{i\leq j}\langle \mathbf{x}_{j},\mathbf{u}_{i}\rangle\mathbf{u}_{i}$$
so that this sum is the decomposition of $P_{j}\mathbf{x}_{j+1}$ into the orthonormal basis for $S_{j}$. Furthermore, the vector $\left(\mathbf{x}_{j+1}-P_{j}\mathbf{x}_{j+1}\right)$ is the error term associated with this projection, and as such is orthogonal to each of the $\mathbf{u_{i}}$s in $S_{j}$.  It follows that $\left\{\mathbf{u}_{1},\ldots, \mathbf{u}_{j},\left(\mathbf{x}_{j+1}-P_{j}\mathbf{x}_{j+1}\right)\right\}$ is an orthogonal basis for $S_{j+1}$.  All that remains to generate our orthonormal basis is to divide $\left(\mathbf{x}_{j+1}-P_{j}\mathbf{x}_{j+1}\right)$ by its length.  This normalized vector is our $\mathbf{u}_{j+1}$.
