# Find the projection of W onto v for

1. Aug 2, 2011

### Jamin2112

1. The problem statement, all variables and given/known data

the given vector v and subspace W.

(a)
Let W be the subspace with basis {(1 1 0 1)T, (0 1 1 0)T, (-1 0 0 1)T} and v = (2 1 4 0)T.

2. Relevant equations

ProjWv = (<W, v> / <W, W>) * W

3. The attempt at a solution

So I'm trying to wrap my head around this problem by imaging a simpler setup, say, v = (2 1)T and W = span{(1 0)T, (0 1)T}. Visually I see a plane in R2 with the vector (2 1)T sticking out and then any other vector in R2 projected upon it. As for the formula for projection, I'm not sure how I can input a subspace W, an infinite set of vectors. What's up with that? Where do I go?

2. Aug 2, 2011

### stringy

That projection formula only holds for vectors since, like you've noted, there's not an inner product for subspaces.

However, you CAN use that formula to project onto a subspace if you have an orthogonal basis. So, generate an orthogonal basis for W and then project v onto each of those vectors. Then add up the results.

3. Aug 2, 2011

### Jamin2112

Will do. By the way, do you know of any orthonormal basis calculators/applets? I couldn't find any through Google.

4. Aug 2, 2011

### stringy

Yeah, calculating ONBs is not fun. I know some computer systems can do it, like Mathematica. I don't know of anything on the web though. However, if you're using the projection formula as you have it written, the basis vectors don't have to be unit length. If you wrote

$$proj_w \ v = <v,w>,$$

with basis vector w, THEN they'd have to be unit length.

So you only need an orthogonal basis. And those basis vectors that you wrote are already almost an orthogonal basis!