text: # Linear Alegbra - Orthonormal Basis
  
  Let $v_1=(1,2,2)$, $v_2=(1,0,1)$ in $R^3$
  
  • Find an orthonormal basis $\{u_1,u_2\}$ to $Sp\{v_1,v_2\}$
  • Find vector $w \in Sp\{v_1,v_2\}$ so $w \bullet u_1=3$ and $w \bullet u_2=9$
  
  My solution
  
  I'm new to orthogonal/orthonormal.
  
  So orthonormal is when the normalization of vector equals to 1.
  
  Therefore I'll check for $v_1$ and $v_2$
  
  $||v_1||=\sqrt{1^2+2^2+2^2}=3$
  
  $||v_2||=\sqrt{1^2+0^2+1^2}=\sqrt{2}$
  
  Both $v_1$ and $v_2$ are not orthonormal.
  
  Lets use gram-schmidt in order to change it to orthonormal:
  
  $$v_1^*=v_1=(1,2,2)$$
  
  $$v_1^*=v_2-\frac{v_2 \bullet v_1^*}{||v_1^*||^2}*v_2^*$$
  
  $$v_1^*=(1,0,1)-\frac{(1,0,1) \bullet (1,2,2)}{9}*(1,0,1)=(1,0,1)-\frac{3}{9}(1,0,1)=(\frac{2}{3},-\frac{2}{3},\frac{1}{3})$$
  
  Now $||v_1^*||=1$
  
  Lets do the same thing for $v_2$
  
  $$v_2^*=v_2=(1,0,1)$$
  
  $$v_2^*=v_1-\frac{v_1 \bullet v_2^*}{||v_2^*||^2}*v_1^*$$
  
  $$v_2^*=(1,2,2)-\frac{(1,0,1) \bullet (1,2,2)}{2}*(1,2,2)=(1,2,2)-\frac{3}{2}(1,2,2)=(1,2,2)+(-\frac{3}{2},-3,-3)=(\frac{1}{2},-1,-1)$$
  
  But $||v_2^*|| \neq 1$
  
  What did I do wrong?
  
  • You don't need to do anything to the first vector. Just normalize it to be unitary. – mfl Oct 13 '14 at 15:22
  • Standard Gram Schmidt normalises each vector after orthogonalising. The first vector should just be normalised. – copper.hat Oct 13 '14 at 15:24
  • What you guys mean is : $(1,2,2) \rightarrow \frac{1}{3}(1,2,2) \rightarrow (\frac{1}{3},\frac{2}{3},\frac{2}{3}) \leftarrow$ orthonormal basis), since $||v_1||=3$ therefore $\frac{1}{3}||v_1||=1$ – JaVaPG Oct 13 '14 at 15:27
  • The first vector only needs to be normalised. I'm not exactly sure what you are doing to it above. $v_2$ should not be involved in the first computation (Gram Schmidt is 'triangular' in that regard). – copper.hat Oct 13 '14 at 15:38
  
  You should have something like $u_1 = {1 \over \|v_1\|} v_1 = { 1\over 3} (1,2,2)$.
  Then $u_2^* = v_2 - \langle u_1, v_2 \rangle u_1 = {1 \over 3} (2, -2, 1)$, $u_2 = { 1\over \|u_2^*\|} u_2^* = {1 \over 3} (2, -2, 1)$.
  Then $\operatorname{sp} \{ v_1, v_2 \} = \operatorname{sp} \{ u_1, u_2 \}$ and $u_1,u_2$ are orthonormal.
  If $w \in \operatorname{sp} \{ v_1, v_2 \} = \operatorname{sp} \{ u_1, u_2 \}$, then $w = \sum_k \alpha_k u_k$, and we have $\langle w, u_k \rangle = \alpha_k$. Since the $u_k$ form a basis, the $\alpha_k$ are unique. This should answer the second part of your question.