# Homework Help: Orthogonal Projection Onto a Subspace?

1. Aug 23, 2010

### Danny89

Hey,

I have a linear algebra exam tomorrow and am finding it hard to figure out how to calculate an orthogonal projection onto a subspace.

Here is the actual question type i am stuck on:

I have spent ages searching the depths of google and other such places for a solution but with no look. I am really stuck and it would be greatly appreciated if someone could maybe give me a helping hand and try explain this to me.

Thanks.

2. Aug 23, 2010

### LCKurtz

Notice that your u and v are already orthogonal unit vectors. So the component of w in the u direction would be w dot u and in the v direction would be w dot v. So the nearest point in the plane to w would be (w dot u)u + (w dot v)v. Subtract this from w to get the orthogonal projection.

3. Aug 23, 2010

### Danny89

I'm a bit confused though. You see i actually managed to get the solution for this problem from my lecturer just there:

But he doesnt subtract from w that i know of and his result for <w,u>u is
1/2 [5]
[0]
[-5]

should it not be:
1/2 [2]
[0]
[-3]?

do you know why this is? i have been tricking around with it and just cant seem to understand it. It would appear to be straightforward enough but i just cant see it.

4. Aug 23, 2010

### LCKurtz

What he has calculated is the "shadow" of w on the subspace which is what he apparently meant by the orthogonal projection onto the subspace. What I suggested to you was the component of w orthogonal to the subspace. Stick with his definition. His calculation is correct; just don't subtract it from w.

5. Aug 23, 2010

### Danny89

Thanks a million, a real help!

6. Aug 23, 2010

### vela

Staff Emeritus
The quantity <w,u> is a plain old number. In this case, <w,u>=-5. He then multiplies the vector [1,0,-1] by it. To get the scalar multiple of a vector, you just multiply each component by the scalar, so you get [5,0,-5].