There’s an interesting result that came up in the derivation of the partial fraction decomposition for PCA. One way to state it is as follows:
Proposition. Given $n$ points equally spaced on the unit circle, the product of the distances from any one point to the remaining $n-1$ points is equal to $n$.
For example, with 7 points:
The product of the lengths of those 6 lines (for a unit circle) is equal to 7. This is wild to me—here is an example of a product whose value is prime! It feels so rare to see a result on products in the first place, and even stranger that a product of (generally speaking) irrational numbers is equal to an integer.
There is a fairly straightforward proof for this fact. I no longer remember where I found the pieces of the argument that I put together the first time, but I have found a video from Dr. Ebrahimian that makes the same argument I made (which I used to prove the PCA result). I will present a similar argument here, although instead with what I hope is better intuition that helps explain why $n$ appears.
The key trick to employ is to take a step back and consider the more general problem of computing the product of distances from the $n$ points (yes, all $n$, not only $n-1$ like in the statement) to an arbitrary point $x$. If $z_k$ for $k \in [n]$ are the points, we want to compute $\prod_{k=1}^n |x - z_k|$. If our points are 2D vectors, we have to use the Euclidean norm, which doesn’t seem like it helps us much at all. But we can choose a different representation, one that plays very nicely with circles - complex numbers. In that case, the modulus of the difference is the distance, which is handy because we can now just compute the modulus of the entire product. Let’s fix a convenient choice of our points $z_k = e^{\frac{2 \pi i k}{n}}$. Then we need to compute
$$ f(x) = \Bigg| \prod_{k=1}^n \Big(x - e^{\frac{2 \pi i k}{n}} \Big) \Bigg|. $$Here is where the magic happens. The factors in the product are all first order polynomials with roots $e^{\frac{2 \pi i k}{n}}$, meaning that the product is an $n$-degree polynomial with all of those roots. But what is another way to describe these roots? They are the $n$ roots of unity—solutions to $x^n = 1$. Therefore,
$$ f(x) = |x^n - 1|. $$Now to get the product of the distances from one point (a convenient choice would be $x=1$) to the others, we just need to compute the product of all the other factors. Until now I have presented the same argument as what I and Dr. Ebrahimian had done before. I’ll diverge from here—the rest of that argument relies on an explicit factorization of the polynomial into $(x-1) \sum_{k=0}^{n-1} x^k$, dropping the $(x-1)$ factor, and plugging in $x-1$, which feels too much like the “wrong kind” of mathematical magic to me.
Instead, there’s a simpler argument that I think really captures where the value of $n$ comes from. If $f(x)$ is the product of all of the distances from $x$, and we want to remove the $(x-1)$ factor, we can do this via simple division. But since we have zero divided by zero when $x = 1$, we must use L’Hôpital’s rule:
$$ \lim_{x \to 1} \frac{x^n - 1}{x - 1} = \lim_{x \to 1} nx^{n-1} = n. $$That is, the value of $n$ for the product comes directly from two facts: 1) that the product of distances (all of them, to $n$) is a degree $n$ polynomial, which produces a factor of $n$ under L’Hôpital’s rule; and 2) that the points being equally distributed on the circle means that they are $n$ roots of unity, producing a clean polynomial with only the order $n$ and constant terms, making the derivative clean as well.