# First to prove theorem relating distance to the center of mass of configuration given distance matrix

If you define $$d_{ij}$$ to be the Euclidean distance between point $$i$$ and point $$j$$ in some $$m$$-dimensional space. Assume you have a valid distance matrix $$D={\{d_{ij}\}}$$, between some configuration of $$N$$ such points in that $$m$$ dimensional space with $$m$$ unknown.

Without knowing the dimension of the space, and without determining a possible $$m$$-dimensional coordinates of the $$N$$ points we wanted to know the distance of each point from the center of mass of that configuration directly from the distance matrix itself. (if possible)

We found the following theorem which perfectly answered the question (ref below, proof in reference)

Theorem 3.3 The distance to the center of mass, 0, of each point $$i$$ of a configuration of $$N$$ unit-mass points in any Euclidean space is given in terms of the remaining distances by

$$d^2_{0i} = \frac{1}{N} \sum_{j=1}^N d^2_{ij} - \frac{1}{N^2} \sum_{k>j=1}^N d^2_{jk} \qquad (3.7)$$

[...] "It was first shown by Lagrange in 1783 (Flory, 1969) that the second term of equation (3.7) equals the trace of the inertial tensor divided by the dimension of the space (for unit-mass points)."

The question we have: This seems like a type of question Lagrange and other mathematicians of the day would have explored. Havel et al. even referenced Lagrange for the second term. Who was the first to prove that theorem?

Ref: Havel, Timothy F., Irwin D. Kuntz, and Gordon M. Crippen. "The theory and practice of distance geometry." Bulletin of Mathematical Biology 45.5 (1983): 665-720.