PDA

View Full Version : Gram-Schmidt Procedure


boneill3
Oct19-09, 03:23 PM
1. The problem statement, all variables and given/known data

We consider P2 the vector space of all real polynomials of degree at most 2.

<f,g> = f(-1)g(-1)+f(0)g(0)+f(1)g(1)

Use the Gram-Schmidt procedure to construct an orthonormal basis for P2 from the basis {1,t,t2}

2. Relevant equations


v_{j+1}:=u_{j+1}-\sum_{i=1}^{j}<<u_{j+1},e_{i}>>e_{i}


e_1 = \frac{u_1}{||u_{1}|| }
3. The attempt at a solution

I have a basis u_1 = 1, u_2 = t, u_3 = t^2

so


e_1 = \frac{u_1}{||u_{1}|| }


e_1 = \frac{1}{\sqrt{2}}


is the next step


v_{2}:=u_{2}-\sum_{i=1}^{j}<<u_{2},e_{i}>>e_{i}

= t - << t,\frac{1}{\sqrt{2}} >>\frac{1}{\sqrt{2}}


My question is how do I calculate the inner product << t,\frac{1}{\sqrt{2}} >>
do I need to plug in the value of f(t) into

<f,g> = f(-1)g(-1)+f(0)g(0)+f(1)g(1)

and does g() become
g(e_1) = g(\frac{1}{\sqrt{2}})


regards

Dick
Oct19-09, 10:02 PM
The inner product <<t,1/sqrt(2)>>=(-1)/sqrt(2)+0/sqrt(2)+(1)/sqrt(2). That's what you definition says, isn't it? g is a constant.

boneill3
Oct20-09, 03:48 PM
So

v_{2}:=u_{2}-\sum_{i=1}^{j}<u_{j+1},e_{i}>e_{i}

= t - << t,\frac{1}{\sqrt{2}} >>\frac{1}{\sqrt{2}}

= t - (\frac{-1}{\sqrt(2)}+\frac{0}{\sqrt(2)}+\frac{1}{\sqrt(2)} ) \frac{1}{\sqrt{2}}

= t - (0) \frac{1}{\sqrt{2}}

v_{2}:= t




for v3: do I substitute v_{2}:= t from above for e_{2}
in the next equation? or do I need to nomalise it first



v_{3}:=u_{3}-\sum_{i=1}^{j}<u_{j+1},e_{i}>e_{i}

= t^2 - (<< t^2,e_{2} >>e_{2}) + (<< t,\frac{1}{\sqrt{2}} >>\frac{1}{\sqrt{2}})

= t^2 - (<< t^2,t >>t) + (<< t,\frac{1}{\sqrt{2}} >>\frac{1}{\sqrt{2}})


or

= t^2 - (<< t^2,1 >>1) + (<< t,\frac{1}{\sqrt{2}} >>\frac{1}{\sqrt{2}})


regards

boneill3
Oct20-09, 04:06 PM
That last equation was using (\frac{1}{t})t= 1
as e_{2}

Dick
Oct20-09, 04:28 PM
t is orthogonal to e1=1/sqrt(2) (i.e. <t,1/sqrt(2)>=0). But it's not normalized. <t,t> is not one. Normalize it. Then that becomes e2. Then find u3=t^2-(<t^2,e1>e1+<t^2,e2>e2) and normalize u3. Your are getting your functions all mixed up in the Gram-Schmidt process.

Dick
Oct20-09, 04:35 PM
BTW before you go any further <1,1>=3. So the normalization of 1 isn't 1/sqrt(2). It's 1/sqrt(3). Sorry, I missed that.

beetle2
Oct20-09, 08:56 PM
Thanks

So

v_{2}:= t
therefore

e_{2} = \frac{t}{||v_2|| }v_2
e_{2} = \frac{t}{\sqrt{-1^2+0^2+1^2}}
e_{2} =\frac{1}{\sqrt{2}}

is that right ?

Dick
Oct20-09, 09:12 PM
Thanks

So

v_{2}:= t
therefore

e_{2} = \frac{t}{||v_2|| }v_2
e_{2} = \frac{t}{\sqrt{-1^2+0^2+1^2}}
e_{2} =\frac{1}{\sqrt{2}}

is that right ?

Is boneill3 the same person as beetle2? If so the Forum doesn't allow really allow you to use two different user pseudonyms. If you are, please stick with one, ok? Otherwise I should report this. If you aren't you are doing exactly the same kind of notational confusion as boneill3. If v2=t, then e2=v2/||v2||=t/||t|| which is t/sqrt(2). Not 1/sqrt(2).

beetle2
Oct20-09, 11:28 PM
Hi,
Sorry I had to log in from another computer.

I found u3=t^2-(<t^2,e1>e1+<t^2,e2>e2) to equal

t^2-(1/sqrt(3)(1/sqrt(3)+1/sqrt(3)) + t/sqrt(2) (t/sqrt(2)+ t/sqrt(2))

= t^2 - (2/3+t^2)

u3 = -2/3

does normalising make it e3= -(2/3) / sqrt((-2/3)^2 +(-2/3)^2+(-2/3)^2)

e3 = -1/sqrt(3)

boneill3
Oct21-09, 04:41 AM
I think i'll make it clearer
I found
u3=t^2-(<t^2,e_1>e_1+<t^2,e_2>e_2)
to equal

t^2-(\frac{1}{\sqrt{3}})(\frac{1}{\sqrt{3}}+\frac{1}{\ sqrt{3}}) + (\frac{t}{\sqrt{2}}) (\frac{t}{\sqrt{2}}+\frac{t}{\sqrt{2}})

= t^2 - (\frac{2}{3}+t^2)

= \frac{-2}{3}
does normalising make it

e_{3}= \frac{\frac{-2}{3}}{{\sqrt{(\frac{-2}{3})^2 +(\frac{-2}{3})^2+(\frac{-2}{3})^2}}}

e_{3} = \frac{-1}{\sqrt{3}}

Dick
Oct21-09, 08:11 AM
If that whole thing had worked then you should be able to check that <e1,e3>=0. It's not zero. The inner product of two functions of t, <f(t),g(t)>, should always be a number, not another function of t. Try computing <t^2,t/sqrt(2)> again.

boneill3
Oct21-09, 04:22 PM
So,

to compute <t^2,t/sqrt(2)>

we have

\left[(-1)^2(\frac{-1}{\sqrt{2}})+](0)^2(\frac{0}{\sqrt{2}})+](1)^2(\frac{1}{\sqrt{2}})\right]

therfore

t^2-(\frac{1}{\sqrt{3}})(\frac{1}{\sqrt{3}}+\frac{1}{\ sqrt{3}}) + (\frac{t}{\sqrt{2}}) (0)
= t^2 - (\frac{2}{3})

Dick
Oct21-09, 04:47 PM
Ok, now you just have to normalize t^2-(2/3).

beetle2
Oct21-09, 11:06 PM
I normalised u3 and got

e_{3}= \frac{t^2-\frac{-2}{3}}{\sqrt{\frac{2}{3}}}

I checked that <e1,e3>=0 which it does.

Thanks so much for your help