# About the $y=\sum_{i=1}^k \frac{\langle y,v_i\rangle}{||v_i||^2} v_i$

Let V be an inner product space and $$S={v_1,v_2,...v_k}$$ be an orthogonal subset of V consisting of nonzero vectors. If $$y \in \operatorname{span}(S)$$, then $$y=\sum_{i=1}^k \frac{\langle y,v_i\rangle}{||v_i||^2} v_i$$.

For $$y=\sum_{i=1}^k \frac{\langle y,v_i\rangle}{||v_i||^2} v_i$$, can someone explain the relation between $$\frac{\langle y,v_i\rangle}{||v_i||^2}$$ and $$\cos \theta =\frac{\langle a,b\rangle}{|a|\cdot |b|}$$ ? So does that mean $$\frac{\langle y,v_i\rangle}{||v_i||^2}$$ is length of orthogonal vector projected onto the subspace A ? • Which plane are you talking about at the end of your question? Mar 11 '20 at 16:36
• Use \langle and \rangle instead of < and > for inner product brackets. Mar 11 '20 at 16:37

The length of the projection of $$y$$ onto the one-dimensional subspace spanned by the single vector $$v_i$$ is $$\|y\| \cos \theta$$ where $$\theta$$ is the angle between $$y$$ and $$v_i$$. (This is just an observation/definition from trigonometry.)
You know that $$\cos \theta = \frac{\langle y, v_i \rangle}{\|y\| \|v_i\|}$$, so the length of the vector is $$\frac{\langle y, v_i \rangle}{\|v_i\|}$$. However, the actual vector of the projection is this length times the unit vector in that direction, so it is $$\frac{\langle y, v_i \rangle}{\|v_i\|} \frac{v_i}{\|v_i\|} = \frac{\langle y, v_i \rangle}{\|v_i\|^2} v_i$$.
The formula for projecting onto $$\text{span}\{v_1, \ldots, v_k\}$$ will in general require some additional information about the $$v_i$$. But if you know that they are orthogonal, it turns out that the projection is the sum of each of the projections onto the one-dimensional subspaces $$\text{span}\{v_i\}$$.