1

Following through the solutions offered for this [Finding the coordinates of points from distance matrix question, I have been stuck for a really long time on making it happen. So, I ask someone to kindly follow me through.

I want to get coordinates from a distance matrix. Let us assume we are given four points on a plane: (1,0),(3,2),(0,1),(2,4).

Their matrix of squared Euclidean distances will then be {[0,8,2,17],[8,0,10,5],[2,10,0,13],[17,5,13,0]}.

As suggested, I find matrix M: {[0,0,0,0],[0,0,0,10],[0,0,0,3],[0,10,3,0]}. However, this matrix M is not positive semi-definite, as its eigenvalues are -10.44, 0, 0, 10.44.

Obviously, I cannot proceed to the final step of actually getting the coordinates having to take square roots from negative values. What really bothers me is that we started with real points, so it cannot be an issue of problem construction. I would be infinitely grateful to someone who would walk me through this example. P.S. I apologize if the text is not properly formatted, as I am asking from an old phone.

Ben Grossmann
  • 225,327
dplg
  • 13
  • Check your computations for $M$. – amd Apr 15 '18 at 20:19
  • In particular, the first row is all zeroes in your matrix; that'd mean that the squared distance from the first point to all others is zero, which is evidently false. – John Hughes Apr 15 '18 at 20:23
  • [https://math.stackexchange.com/a/156198/552768] this answer shows that by construction the first row and column of M are zeros. – dplg Apr 16 '18 at 05:57

1 Answers1

1

if $$M_{ij} = (x_i-x_1)^T(x_j-x_1)$$

Let's compute $M_{22}$, $M_{22}= (x_2-x_1)^T(x_2-x_1)=\|x_2-x_1\|^2>0$ since $x_2 \neq x_1$.

You might like to check the entries of $M$.

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
  • Can you please show me at least one calculation of M using my values above? I feel that I am lost in the notations and can't catch a silly mistake. – dplg Apr 16 '18 at 06:04
  • For example, $M_{2,3}=(x_2-x_1)^T(x_3-x_1)=(2,2)\cdot(-1,1)=-2+2=0$. Besides the first diagonal entry, all the other diagonal entries should be positive. – Siong Thye Goh Apr 16 '18 at 06:07
  • Bingo! Just realized that myself. Somehow, I automatically transferred the notion of zero diagonals from the distance matrix. Well, if only you knew how much time I wasted. – dplg Apr 16 '18 at 06:39