1

I cannot find the exact way to do this.... W is an orthogonal basis...

w ={{1,2,2,4},{4,-2,8,-4},{0,0,0,0}}

vector v = {7,2,2,1}

Anyone know how to project v onto w?

user1990406
  • 267
  • 2
  • 8

2 Answers2

3

So your subspace is $\operatorname{span}{W} = \operatorname{span}\{(1,2,2,4),(4,-2,8,-4),(0,0,0,0)\} = \operatorname{span}\{(1,2,2,4),(4,-2,8,-4)\}$. Do you see why I can leave off the zero vector?

The projection of a vector onto a subspace will be a vector, denoted $\operatorname{proj}_{W}(\mathbf v)$ or $\mathbf v_{\|}$, of the same size as $\mathbf v$ which has the property $\mathbf v = \mathbf v_{\|} + \mathbf v_{\bot}$, where $\mathbf v_{\|} \in \operatorname{span}{W}$ and $\langle \mathbf v_{\bot}, \mathbf x\rangle = 0$ for every $\mathbf x \in \operatorname{span}W$.

Because your set is orthogonal, we could use the projection formula $\operatorname{proj}_{W}(\mathbf v) = \dfrac {\langle \mathbf v,\ (1,2,2,4)\rangle}{\|(1,2,2,4)\|^2}(1,2,2,4) + \dfrac {\langle \mathbf v,\ (4,-2,8,-4)\rangle}{\|(4,-2,8,-4)\|^2}(4,-2,8,-4)$.

Note that this formula only works if the basis is orthogonal. So in general if it isn't, you'll need to use Gram-Schmidt orthogonalization to get an orthogonal basis set for your subspace.

  • so its v dot the first vector over the magnitude of the first vector times first vector, then v dot second vector over magnitude of second vector times 2nd vector ?? does this look right? – user1990406 Dec 09 '14 at 03:41
  • Sorry I just edited just to confirm, does my previous comment look correct? – user1990406 Dec 09 '14 at 03:44
  • Yes, that's correct. If you're used to the notation $\mathbf v \cdot \mathbf w$, then that's the same as $\langle \mathbf v, \mathbf w\rangle$. –  Dec 09 '14 at 03:44
  • Sweet. Thanks! Check marked – user1990406 Dec 09 '14 at 03:49
0

If V is a subspace of Rn with orthonormal basis $\mathbf u_1$, $\mathbf u_2...\mathbf u_m$, then projection of $\mathbf x$ onto V is

$(\vec{\mathbf u_1}\cdot\mathbf x)\mathbf u_1$ + $(\vec{\mathbf u_2}\cdot\mathbf x)\mathbf u_2$ +···+$(\vec{\mathbf u_m}\cdot\mathbf x)\mathbf u_m$

Use this to calculate the projection of v onto w, where w is the orthonormal basis, m=3 and and the v you gave = x.

Source: http://isites.harvard.edu/fs/docs/icb.topic138287.files/Lesson13_-_Orthogonal_Bases_and_Projections_slides.pdf

Gabriel
  • 1,085
  • 9
  • 18