# Converting distance matrix back into original data

Suppose that we have $$N$$ points, and a distance matrix $$D \in \mathbb{R}^{N \times N}$$ describing the Euclidean distance among those points. For now, assume that we do not necessarily know how many dimensions the original points lived in.

Is there a general way to construct a new matrix $$B \in \mathbb{R}^{N \times P}$$, which has a distance matrix equal to $$D$$?

Initially, we can suppose that we are free to make $$P$$ as large as we want. Is there a way to estimate the minimum $$P$$ for a given $$D$$? Does the problem change if we know $$P$$ in advance?

Please note that a given matrix $$B$$ will likely not be a unique solution, particularly at small $$N$$. I am just looking for a general way to construct any $$B$$ consistent with $$D$$.

• It is surely possible. You can simply zero-pad your original vectors with $P-N$ zeros, for example. But probably that's not what you want, right? So, there seems to ba an additional condition missing. Jan 15 at 14:17
• Besides, you can apply a random orthgonal matrix $\in \mathbb R^{P\times P}$ to the padded vectors, which will leave their distance invariant. Jan 15 at 14:35
• @davidhigh I believe they mean they have the distances, but not the original vectors they came from. Jan 15 at 14:54
• you might also want to have a look here: math.stackexchange.com/questions/156161/… Jan 16 at 9:57

A common application for $$D=3$$ is in chemistry/biology where certain experimental techniques can help determine the distance between atoms and the goal is to determine some molecular/protein structure. See for example this question on Matter Modeling. An added complication in this case is that the distance measurements can be noisy.