I've got an affine vector space $W$ defined by a collection of vectors $\{v_1, v_2, ... v_n\}$. Each vector in that space could be represented as a sum of the form $\sum_{i=1}^n w_i * v_i$, where $\sum_{i=1}^n w_i = 1$
Now to the question which is really simple. If I have a vector $u \in W$ and wish to find $\{w_1, w_2, ... w_n\}$, I simply dot product $u$ by $\{v_1, v_2, ... v_n\}$, correct?
Now, if we have a vector $s \notin W$ and wish to find it's distance from $W$, do we simply:
- subtract $v_1$ from $s$ and $\{v_1, v_2, ... v_n\}$
- Do the dot product with {$\{v_2, ... v_n\}$}
- Sum up the resulting $s' = \sum_{i=2}^n w_i * v_i$
- Subtract and compute the norm (length) of $s - s'$
or is there a simpler way I'm missing?
No. Simply taking dot products with the spanning vectors will not in general work.
Your algorithm for distance finding would work...but only if the spanning vectors $v_i$ were pairwise orthogonal and all unit length.
Summary: if you first apply Gram-Schmidt to the spanning vectors, then there's actually some hope of this whole process working.
To see that dot products alone don't work, suppose that $v_1$ and $v_2$ are unit vectors but $v_1 \cdot v_2 = 0.5$. Then if you apply your first idea to the vector $u = v_1$, you'll find that $$ w_1 = u \cdot v_1 = v_1 \cdot v_1 = 1\\ w_2 = u \cdot v_2 = v_1 \cdot v_2 = 0.5 $$ and you'd be claiming that $$ v_1 = u = 1 v_1 + 0.5 v_2 $$ which is evidently wrong.