# Projecting a vector onto a plane problem

1. Aug 29, 2004

### dcl

Heya's
how would one go about spanning a vector say 'u' onto a plane spanned by vectors v1 and v2.

I have a formula for projecting a vector onto say a subspace w:
projw(u) = <u,v1>v1 + <u,v2>v2 + .... <u,vn>vn
But I'm unsure how to use this for when I need to project the vector onto a plane spanned by 2 other vectors.

Thanks.

2. Aug 29, 2004

### humanino

dcl : I am confused by the fact that you provide the correct formula !

Say you have a vector $$\vec{V}=\{V_i\}$$ with components indiced by $$i$$ in a general $$n$$ dimensional linear (vector) space : $$i\in \{0,1,2,\cdots ,n\}$$. Say in this $$n$$ dimensional space you have a plane defined by two vectors $$\vec{u}^{(1)} = \{u^{(1)}_i\}$$ and $$\vec{u}^{(2)} = \{u^{(2)}_i\}$$. Then the straightforward application of your formula leads to the projection $$P(\vec{V})$$ of the vector $$\vec{V}$$ onto the plane spanned by $$\vec{u}^{(1)}$$ and $$\vec{u}^{(2)}$$ :

$$P(\vec{V}) = \sum_{i=1}^2 \langle \vec{u}^{(i)},\vec{V} \rangle \vec{u}^{(i)} = c_1 \vec{u}^{(1)} + c_2 \vec{u}^{(2)}$$

with $$c_1 = \langle \vec{u}^{(1)},\vec{V} \rangle = \sum_{i=1}^n u^{(1)}_i V_i$$ and $$c_2 = \langle \vec{u}^{(2)},\vec{V} \rangle = \sum_{i=1}^n u^{(2)}_i V_i$$

3. Aug 29, 2004

### dcl

Thanks for that, guess it was simpler than I thought. :)

4. Aug 31, 2004

### robphy

If I'm not mistaken,
in projw(u) = <u,v1>v1 + <u,v2>v2 + .... <u,vn>vn ,
the v1,...,vn should be mutually-orthogonal unit vectors
since a projection must satisfy projw(projw(u))=projw(u).

5. Oct 19, 2010

### schemeng

How could you create a matrix that performs this transformation? In other words, what matrix would project any vector V into the plane spanned by v1 and v2?