Let $A_1, A_2 \dots A_n$ be $n$ points in the 2D plane, with centroid $M$.
Show that for any point $P$ in the plane
$$ \sum_{i = 1}^{n} PA_{i}^2 = n PM^2 + \sum_{i=1}^{n} MA_{i}^2$$
Bonus: Given a magic fairy that tells you the sum of squares of distances of any point $P$ to $A_1, A_2, \dots, A_m$ where you don't know $m$ or the $A_i$, show that you can find $m$ in a finite number of queries to the magic fairy.
Solution
.
.
.
.
.
Surprisingly this has an easy proof using complex numbers!
Let $a_1, a_2, \dots, a_n$ be complex numbers that sum to $0$,
Then we have that for any complex number $z$,
$$\sum_{i=1}^{n} |z-a_i|^2 = \sum_{i=1}^{n} (z-a)\overline{(z-a)} = $$
$$ \sum_{i=1}^{n} (z\overline{z} - z\overline{a_i} -\overline{z}a_i + a_i\overline{a_i}) = $$
$$ n z \overline{z} + \sum_{i=1}^{n} a_i\overline{a_i} = n |z|^2 + \sum_{i=1}^{n} |a_i|^2$$
This gives us the identity we seek. The centroid $M$ corresponds to $0$, the sum of $a_i$.
The bonus puzzle solution follows along the lines of the previous guessing puzzle, and I will leave it to you.
No comments:
Post a Comment