If you have $n$ points in $\mathbf{R}^2$, and you write down the $n \times n$ matrix of distances between each pair of points, then you get a weighted graph with $n$ nodes.
When can you do the reverse? I.e., when can the nodes in a weighted graph be embedded in some metric space? Is there some simple characterization? Has this been studied before?
There's definitely no simple answer. We have obvious restrictions (by the triangle inequality, the length of any path from $A$ to $B$ is greater than or equal to the length of the direct edge) and dimension-linked restrictions (e.g, we can't fit a $K_4$ with all edges equal in two dimensions), but we also have less obvious restrictions - for example, a $K_4$ with edges $AB=AC=AD=BC=BD=1$ and $CD=1.8$ is impossible in any Euclidean space. That example is a special case of a restriction we get from the formula for the volume of a tetrahedron in terms of its edges: $AB^2+CD^2 \le AC^2+BD^2+BC^2+AD^2$ because the square of the volume is nonnegative.
In the case of all (included) edges marked at length $1$ and restricted to the Euclidean plane, these are known as unit-distance graphs. My avatar is an example of such - a Petersen graph drawn with all edges of equal length.