# Length of sum of high-dimensional 3 vectors in terms of their lengths and inner products

I have 3 vectors in a high-dimensional euclidean space. I would like to express the length of their sum in terms of their lengths and inner products. For two vectors, I can do it with the law of cosines:

$c^2 = a^2 + b^2 - 2ab\cos\theta$

which in my context translates to:

$||c||^2 =||a||^2+||b||^2 -2 a \cdot b$

(where c = a+b and all are vectors, I project them into the span of a,b to get the triangle and then apply the law of cosines from trig)

How do I do this for 3 vectors, d=a+b+c?

I'll keep working on this and answer my own question if I come up with a solution.

-
You can iterate the process, by first obtaining the length of $a+b$ in terms of $||a||$, $||b||$, and $a\cdot b$; then obtain the length of $(a+b)+c$ in terms of $||a+b||$ (which is given in terms of $||a||$, $||b||$ and $a\cdot b$), $||c||$, and $(a+b)\cdot c = a\cdot c + b\cdot c$. – Arturo Magidin Feb 28 '11 at 19:06

Hint: Use associativity: $$\overline{a}+\overline{b}+\overline{c}=(\overline{a}+\overline{b})+\overline{c}$$ This yields the answer since you already know how to add two vectors. As a check, notice that the answer has to be the same if I permute $a,b,c$ since addition is commutative.

Edit:

Say you have vectors $a,b,c$. Then $$\|a+b+c\|=\|(a+b)\|^2+\|c\|^2-2(a+b)\cdot c$$ $$=\|(a+b)\|^2+\|c\|^2 -2a\cdot c-2b\cdot c$$ $$=\|a\|^2+\|b\|^2+\|c\|^2 -2\left( a\cdot c+b\cdot c+a\cdot b\right)$$

-
For anyone reading this, should I have added in the edit or just left it as a hint? I have trouble deciding these things. – Eric Naslund Feb 28 '11 at 19:14
This was not a homework problem, I am deriving an algorithm, so I appreciate your working things out. The hint would have taken me another half-hour to figure out how to apply. Arturo's comment would have been sufficient detail that I would have accepted it as an answer also. – Eponymous Feb 28 '11 at 19:29
@Eponymous: Thanks for the feedback! – Eric Naslund Feb 28 '11 at 19:31