# Gram Schmidt Method (calculating orthogonal vector set)

1. May 15, 2010

### mess1n

Hey, I'm going over the Gram Schmidt method, and need some help understanding it. I understand that you're intending to create an orthogonal vector (i'll call them v) set based on a set of vectors you already have (i'll call them u). Then:

Let v1 = u1

Now, construct the second orthogonal vector v2 using a linear combination of u2 and v1 i.e:

v2 = u2 + c1v1

where the condition [ v2.v1 = 0 ] is satisfied.

However, what I wonder is why at this point I can't use the following equation instead:

v2 = v1 + c1u2

Surely i'm still creating a linear combination for v2 which will still satisfy the condition? However whenever I use this second form, my answer comes out wrong! Why is this?

Andrew

2. May 15, 2010

### FieldDuck

Excuse me if I'm wrong, but I don't think the only condition for forming v_2 is that v_2 is a linear combination of u_2 and v_1. I believe v_2 needs to be a vector formed by subtraction from u_2 its projection onto the subspace. If my reasoning is correct I think that doing this is motivated from the orthogonal decomposition theorem.

3. May 15, 2010

### Studiot

Field Duck is essentially correct.

Just using c1 disguises the true nature of your constant. How do you determine c1?

Last edited: May 15, 2010
4. May 15, 2010

### lurflurf

^obviously
c1=-(v1.u2) /(v1.v1)

For the original question one can infact use
v2 = a1v1 + b1u2 often

5. May 16, 2010

### mess1n

Thanks for the responses. So I can use the second form of the equation? How comes I get wrong answers when I use it! Is it just a coincidence and i'm making a mistake with the numbers? It makes sense that the vectors would be different.... but when I check if they're all orthogonal afterwards it turns out that they aren't. This is the problem when I use the second form of the equation.

6. May 16, 2010

### Studiot

Perhaps if you answered the question about c1 someone may be able to help?

You have two constants c1 which must be different.

How did you obtain each?

7. May 17, 2010

### mess1n

Studiot:

I only have one constant c1.

It is obtained as lurflurf explained.

Perhaps you're misunderstanding my question. I'm wondering why I can't use:

"v2 = v1 + c1u2"

"v2 = u2 + c1v1"

8. May 17, 2010

### Studiot

How have you only got one constant?

Compare

$$\begin{array}{l} {v_2} = {v_1} + {c_1}{u_2} \\ {v_2}.{v_1} = \left( {{v_1} + {c_1}{u_2}} \right).{v_1} \\ 0 = {v_1}.{v_1} + {c_1}{u_2}.{v_1} \\ {c_1} = - \frac{{{v_1}.{v_1}}}{{{u_2}.{v_1}}} \\ \end{array}$$

With

$$\begin{array}{l} {v_2} = {u_2} + {c_1}{v_1} \\ {v_2}.{v_1} = \left( {{u_2} + {c_1}{v_1}} \right).{v_1} \\ 0 = {u_2}.{v_1} + {c_1}{v_1}.{v_1} \\ {c_1} = - \frac{{{u_2}.{v_1}}}{{{v_1}.{v_1}}} \\ \end{array}$$

9. May 24, 2010

### mess1n

So why can't I use the first constant instead of the second? Surely I've still constructed an orthogonal vector using the first method?

Cheers,
Andrew