0

I want to implement $M_{ij} = \frac {D^2_{1j}+D^2_{i1}-D^2_{ij}} 2 \,$to find the coordinates of points from distance matrix. And we already know one point is original point (0,0) which can be regard as $D_{11}$.Here is my distance matrix.

\begin{array}{lc} \verb|Distance Matrix| & \left(\begin{matrix} 0 & 5 & 8 \\ 5 & 0 & 2 \\ 8 & 2 & 0 \end{matrix}\right) \\[15pt] \end{array}

My solution for the problem:

Step 1 I calculate the the matrix M based on the formula $M_{ij} = \frac {D^2_{1j}+D^2_{i1}-D^2_{ij}} 2 \,$. Here is my result:

\begin{array}{lc} \verb|Matrix M| & \left(\begin{matrix} 0 & 0 & 0 \\ 0 & 0 & 42.5 \\ 0 & 42.5 & 0 \end{matrix}\right) \\[15pt] \end{array}

Step2 By eigenvalue decomposition, we could use the formula $Ax = λx$ /$(A-λI)x = 0$ to get the eigen-vectors $x$ and eigen-value $λ$. Here is my processing:

\begin{array}{lc} \verb|(A-λI)x| & \left(\begin{matrix} -λ& 0 & 0 \\ 0 & -λ& 42.5 \\ 0 & 42.5 & -λ \end{matrix}\right) \left(\begin{matrix} x1 \\ x2 \\ x3 \end{matrix}\right)\\[15pt] \end{array} Then by using the formula: $det((A-λI) = 0$, we could get the eigen-value λ. There exists three kinds of eigen-value λ, including the 0,42.5,-42.5.(The equation like this: $(-1)^2*λ*(λ^2-42.5^2) = 0$).

Step3 We could calculate the eigen-vectors by using (A-λI)x and the value of λ, here is my calculation process:

When λ = 0: \begin{array}{lc} \verb|(A-0I)x = 0:| & \left(\begin{matrix} 0& 0 & 0 \\ 0 & 0& 42.5 \\ 0 & 42.5 & 0 \end{matrix}\right) \left(\begin{matrix} x1 \\ x2 \\ x3 \end{matrix}\right)\\[15pt] \end{array}

\begin{array}{lc} \verb|value of x = | & \left(\begin{matrix} t_1 \\ 0 \\ 0 \end{matrix}\right) \\[15pt] \end{array}

when λ = -42.5:

\begin{array}{lc} \verb|(A+42.5I)x = 0:| & \left(\begin{matrix} 42.5& 0 & 0 \\ 0 & 42.5& 42.5 \\ 0 & 42.5 & 42.5 \end{matrix}\right) \left(\begin{matrix} x1 \\ x2 \\ x3 \end{matrix}\right)\\[15pt] \end{array}

\begin{array}{lc} \verb|value of x = | & \left(\begin{matrix} 0\\ t_2 \\ -t_2 \end{matrix}\right) \\[15pt] \end{array}

when λ = 42.5:

\begin{array}{lc} \verb|(A-42.5I)x = 0:| & \left(\begin{matrix} -42.5& 0 & 0 \\ 0 & -42.5& 42.5 \\ 0 & 42.5 & -42.5 \end{matrix}\right) \left(\begin{matrix} x1 \\ x2 \\ x3 \end{matrix}\right)\\[15pt] \end{array}

\begin{array}{lc} \verb|value of x = | & \left(\begin{matrix} 0 \\ t_3 \\ t_3 \end{matrix}\right) \\[15pt] \end{array}

Step 4 Now we know the formula $M = USU^T$ , the value of U and the Value of S. \begin{array}{lc} \verb|U:| & \left(\begin{matrix} t_1 & 0 & 0 \\ 0 & t_2 & t_3 \\ 0 & -t_2 & t_3 \end{matrix}\right) \\[15pt] \end{array}
\begin{array}{lc} \verb|S:| & \left(\begin{matrix} 0 & 0 & 0 \\ 0 & -42.5 & 0 \\ 0 & 0 & 42.5 \end{matrix}\right) \\[15pt] \end{array}

Step 5 We could get the final result of the points using the formula enter link description here:$X = U \sqrt S$. \begin{array}{lc} \verb|X = U \sqrt S:| & \left(\begin{matrix} 0 & 0 & 0 \\ 0 & t_2*\sqrt -42.5 & 0 \\ 0 & 0 & t_3*\sqrt 42.5 \end{matrix}\right) \\[15pt] \end{array}

Now, I just stuck in it. I still cannot get the real coordinates of points. And the answer isn't correct because the value of sqrt cannot be the negative number! Please help me, I don't know how to handle the problem!

2 Answers2

0

Because the value of matrix M cannot constuct the three points. Just think the condition, if point A is (0,0), and B is (5,0). C must be in the first quadrant or forth quardrant. Then, they can construct an triangle. One of the propety of triangle is that the sum of two sides of a triangle is greater than the third side. 2+5 cannot be greater than 8. Thus, we cannot find the points in the coordinate system

0

First, you got the $M$ matrix wrong: the diagonal elements aren't all zero. In fact, the diagonal elements of $M$ are always the same as the squared distances from point 1 to each of the other points, $M_{ii} = D_{1i}^2$. The correct matrix is

$M= \begin{pmatrix}0 & 0 & 0 \\ 0 & 25 & 42.5 \\ 0 & 42.5 & 64\end{pmatrix}\,.$

The eigenvalues are 0, -2.26, and 91.3 (to three significant digits). Since one of these is negative, that means there is not set of points with the given distance matrix. As you already pointed out in your answer, this is because $D_{23} = 2$ and $D_{12} = 5$, so that the distance between 1 and 3 cannot be larger than $D_{12} + D_{23} = 7$.