How to find an orthonormal base from a base? 
Let $B={(2,0,1),(3,1,2),(1,1,0)}$ where $B$ is a base of $\mathbf{R}^3$. Find an orthonormal base from a $B$.

I don't know what to do. If i nomalize the vectors then the inter product not is 0.
 A: Let $v_1=(2,0,1)$, $v_2=(3,1,2)$, and $v_3=(1,1,0)$. To construct an orthonormal basis we use the Gram-Schmidt algorithm. First we orthogonalize the basis by iteratively subtracting the projection of the $n^{\mathrm{th}}$ vector onto the subspace spanned by the first $n-1$ vectors:
\begin{align}
u_1 &= v_1 = (2,0,1)\\\\
u_2 &= v_2 - \frac{\langle u_1,v_2\rangle}{\langle u_1,u_1\rangle}u_1\\
&= (3,1,2) - \frac{6+2}{4+1}(2,0,1)\\
 &= \left(-\frac15,1,\frac25\right)\\
u_3 &= v_3 -\left(\frac{\langle u_1,v_3\rangle}{\langle u_1,u_1\rangle}u_1 +  \frac{\langle u_2,v_3\rangle}{\langle u_2,u_2\rangle}u_2\right)\\
&=(1,1,0) - \left(\frac25(2,0,1) + \frac{-\frac15+1}{\frac1{25}+1+\frac4{25}}\left(-\frac15,1,\frac25\right) \right)\\
&=(1,1,0) - \left(\left(\frac45,0,\frac25\right)+ \left(-\frac2{15},\frac23,\frac4{15} \right)  \right)\\
&= \left(\frac13,\frac13,-\frac23\right).
\end{align}
Next we normalize:
\begin{align}
\hat u_1 &= \frac{1}{\|u_1\|}u_1\\
&= \langle u_1,u_1\rangle^{-\frac12} u_1\\
&= \left\langle\frac{2}{\sqrt 5},0,\frac1{\sqrt5}\right\rangle\\\\
\hat u_2 &= \frac{1}{\|u_2\|}u_2\\
&= \left\langle-\frac1{\sqrt{30}}, \sqrt{\frac56}, \sqrt{\frac2{15}}\right\rangle\\\\
\hat u_3 &= \frac{3}{\|u_3\|}u_3\\
&= \left(\frac1{\sqrt 6}, \frac1{\sqrt 6},-\sqrt{\frac23}\right).
\end{align}
Then $(\hat u_1,\hat u_2,\hat u_3)$ is a set of pairwise orthogonal unit vectors such that $$\operatorname{span}(v_1,v_2,v_3)=\operatorname{span}(\hat u_1,\hat u_2,\hat u_3),$$ as desired.
A: Orthonormalizing a basis means taking the basis you already have and turning it in a "better" basis. Here, better means a basis whose vectors are mutually orthogonal and normal (length 1). As mentioned above there is a nice algorithmic way of doing this. The basic idea is to take a vector from the old basis, fix it up, and add it the new basis. The fixing up procedure consists of shaving of projections so it is orthogonal to the other basis vectors and then normalizing. What's cool is that proceeding in this simple way always works, which you should try proving. 
