# If we assume that the definition of the inner product of the normalized vectors #hatu_1# and #hatu_2# is #2u_1^2 + u_2^2# (these are vector components), how do you use the Gram-Schmidt process to generate orthonormal vectors from #vecv_1# and #vecv_2#?

##
#vecv_1 = (2,1)#

#vecv_2 = (5,-7)#

##### 2 Answers

#### Answer:

See below.

#### Explanation:

Following the Gram-Schmidt orthonormalization process, given

and then

so if

we obtain

NOTE: Here

In the present case

I did your question from the beginning and got:

#hatu_1 = (2/3,1/3)#

#hatu_2 = (1/(3sqrt2), -4/(3sqrt2))#

The **Gram-Schmidt** process for two vectors first involves *orthogonalizing* them:

#vecu_1 = vecv_1# ,#" "" "" "" "" "" "" "hatu_1 = vecu_1/||vecu_1||#

#vecu_2 = vecv_2 - "proj"_(vecu_1)vecv_2# ,#" "" "hatu_2 = vecu_2/||vecu_2||#

And if you had more than two vectors

You have been given

#vecv_1 = (2, 1)# #vecv_2 = (5, -7)#

Now, you already have

#|| vecu ||^2 = << vecu, vecu >> = color(red)(2)u_1u_1 + u_2u_2#

#=> color(blue)(hatu_1) = ((2", "1))/(sqrt(color(red)(2) xx (2)^2 + 1^2)) = ulcolor(blue)((2/3, 1/3)" ")# ,which indeed has a norm of

#1# under YOUR inner product definition.

To proceed, we define the **projection of** **onto**

#"proj"_(vecu_1)vecv_2 = (<< vecv_2, vecu_1 >>)/(<< vecu_1, vecu_1 >>) vecu_1# How I remember it is that the vector that is projected (mapped),

#vecv_2# , is the only different term in the projection definition.

We continue by finding the **inner product** of *not quite* the dot product of the vectors:

#<< vecv_2, vecu_1 >> = color(red)(2)v_(21)u_(11) + v_(22)u_(12)#

#= color(red)(2) xx 5 cdot 2 + -7 cdot 1#

#= 13#

And the inner product of **norm squared**:

#<< vecu_1, vecu_1 >> = ||vecu_1||^2 = 3^2 = 9#

As a result, the projection of

#"proj"_(vecu_1)vecv_2 = 13/9 cdot (2, 1)#

#= (26/9, 13/9)#

and so, the vector

#color(red)(vecu_2) = vecv_2 - "proj"_(vecu_1)vecv_2#

#= (5, -7) - (26/9, 13/9)#

#= (45/9, -63/9) - (26/9, 13/9)#

#= color(red)((19/9, -76/9)" ")#

Note that this is NOT normalized yet. The normalization of this is then:

#color(blue)(hatu_2) = (vecu_2)/(||vecu_2||)#

#= ((19/9", "-76/9))/sqrt(color(red)(2) xx (19/9)^2 + (-76/9)^2)#

#= (19/(19 sqrt2/3 cdot 9)", "-76/(19 sqrt2/3 cdot 9))#

#= ulcolor(blue)((1/(3sqrt2)", "-4/(3sqrt2))" ")#

And indeed this has a magnitude of

Lastly, to check whether we are correct, we should see if the inner product of *particular* inner product space.

#0 stackrel(?" ")(=) << hatu_1, hatu_2 >>#

#= color(red)(2) xx 2/3 cdot 1/(3sqrt2) + 1/3 cdot -4/(3sqrt2)#

#= 4/(9sqrt2) + (-4/(9sqrt2)) = 0# #color(blue)(sqrt"")#

So, this should be correct! (If you wish, you can check that