Sum of squared inner product of vector with spokes around unit circle is constant

This is similar to Noble's answer but I wanted to highlight the geometric aspect of the problem a little more. First we note that $$v \cdot w_i = || v || \cos(\theta) $$ where $\theta$ is the angle between $v$ and $w_i$. Since $||v||^2$ is on both sides of the equation, we can assume $||v|| = 1$.

Now consider a unit vector $v$ and a regular polygon with $n$ sides centered at the origin. Connect the vertices of the polygon to the center. $v$ lies between two of the radii. Now going counter clockwise, $v$ makes the following angles with the $w_i:$ $$x, x + \frac{2 \pi}n, x + 2 \cdot \frac{2 \pi}n, \cdots, x + (n-1) \cdot \frac{2 \pi}n $$ for some $x$ as shown in the image at the bottom of the post.

Therefore, the sum that we want is $$ \sum_{k=0}^{n-1} \cos \left( x + k \, \frac{2 \pi}n \right)^2.$$

Using Euler's formula $\cos(t) = \frac{e^{it} + e^{-it}}2$, we have

\begin{align} \sum_{k=0}^{n-1} \cos \left( x + k \, \frac{2 \pi}n \right)^2 &= \frac{1}4 \sum_{k=0}^{n-1} \left(e^{2i\left(x + k\, \frac{2\pi}n \right)} + e^{-2i\left(x + k\, \frac{2\pi}n \right)} + 2\right) \\ &= \frac{n}2 + (e^{2ix} + e^{-2ix}) \sum_{k=0}^{n-1} \omega^k \end{align} where $\omega$ is a non trivial $n$th root of unity. Then we can easily calculate that $$ \sum_{k=0}^{n-1} \omega^k = \frac{\omega^n-1}{\omega - 1} = 0$$ which proves the claim for $k = \frac{n}2.$

Angles between v and w


Since the $w_i$ are evenly spaced, we can say:

$$w_i=\cos(\phi+i\theta)\hat i+\sin(\phi+i\theta)\hat j$$

Also, since they are evenly spaced around the full circle, the distances between each $w_i$, which is $\theta$ radians, times the number of vectors, which is $n$, must be a full circle: That is, $n\theta=2\pi$

Now, $v\cdot w_i=v_x\cos(\phi+i\theta)+v_y\sin(\phi+i\theta)$, so:

$$(v\cdot w_i)^2=v_x^2\cos^2(\phi+i\theta)+v_y^2\sin^2(\phi+i\theta)+2v_xv_y\cos(\phi+i\theta)\sin(\phi+i\theta) \\ =v_x^2\left(\frac{\cos(2\phi+2i\theta)+1}{2}\right)+v_y^2\left(\frac{1-\cos(2\phi+2i\theta)}{2}\right)+v_xv_y\sin(2\phi+2i\theta) \\ =\frac{v_x^2+v_y^2}{2}+\cos(2\phi+2i\theta)\left(\frac{v_x^2-v_y^2}{2}\right)+v_xv_y\sin(2\phi+2i\theta)$$

Now, let's put this into a summation:

$$\sum_{i=1}^n (v\cdot w_i)^2=\frac{n}{2}(v_x^2+v_y^2)+\left(\frac{v_x^2-v_y^2}{2}\right)\left[\sum_{i=1}^n\cos(2\phi+2i\theta)\right]+v_xv_y\left[\sum_{i=1}^n\sin(2\phi+2i\theta)\right]$$

Now, I will use $j=\sqrt{-1}$. The first summation and second summation are related: They are the real and imaginary part, respectively, of $\sum_{i=1}^n e^{2j\phi+2ij\theta}=e^{2j\phi}\sum_{i=1}^n e^{2ij\theta}$. If we let $\omega=e^{2j\theta}$, the sum becomes $e^{2j\phi}\sum_{i=1}^n \omega^i$, which is a geometric series:

$$\sum_{i=1}^n \omega^i=\omega\frac{\omega^n-1}{\omega-1}=\omega\frac{e^{2jn\theta}-1}{\omega-1}=\omega\frac{e^{4\pi j}-1}{\omega-1}=\omega\frac{1-1}{\omega-1}=0$$

(Note that I used $n\theta=2\pi$ and $e^{4\pi j}=\cos(4\pi)+j\sin(4\pi)=1$ in the above derivation.)

(Also, notice that this proof fails when $\omega=e^{2j\theta}=1$ because of a division-by-zero error from above. More specifically, this occurs when $2\theta=\frac{4\pi}{n}$ is a multiple of $2\pi$, which is the case when there are $n=1$ or $n=2$ points.)

Thus, this summation is $0$, so both its real and imaginary parts are 0. This gives us:

$$\sum_{i=1}^n (v\cdot w_i)^2=\frac{n}{2}(v_x^2+v_y^2)+\left(\frac{v_x^2-v_y^2}{2}\right)[0]+v_xv_y[0]\rightarrow \sum_{i=1}^n (v\cdot w_i)^2=\frac{n}{2}\|v\|^2$$