Calculating positions of nodes relative to a known point
I wrote an algorithm that determines a configuration if one exists, given a distance matrix. It repeatedly uses circle-circle intersection  to triangulate new nodes based on their distance to the first, second and third. As others have mentioned in comments, the first three points have some degree of freedom, which I've made assumptions for, in line with yours.

The code assumes all points are unique and invariant to changes smaller than a certain $\epsilon$.

#include &lt;algorithm&gt;
#include &lt;iostream&gt;
#include &lt;map&gt;
#include &lt;queue&gt;
#include &lt;set&gt;
#include &lt;vector&gt;
#include &lt;cmath&gt;

using namespace std;

const double epsilon = 0.00001;

struct Point {
    double x, y;
};

double dist(Point p, Point q) {
    return sqrt((p.x - q.x) * (p.x - q.x) + (p.y - q.y) * (p.y - q.y));
}

vector&lt;Point&gt; intersections(Point p, Point q, double pr, double qr) {
    double d = dist(p, q);
    if(pr + qr &lt; d) return vector&lt;Point&gt;();
    if(min(pr, qr) + d + epsilon &lt; max(pr, qr)) return vector&lt;Point&gt;();
    double a = (pr * pr - qr * qr + d * d) / (2.0 * d),
        h = sqrt(pr * pr - a * a);

    Point m = { p.x + (a * (q.x - p.x)) / d, 
        p.y + (a * (q.y - p.y)) / d },
        r = { m.x + (h * (q.y - p.y) / d),
            m.y - (h * (q.x - p.x)) / d },
        s = { m.x - (h * (q.y - p.y) / d),
            m.y + (h * (q.x - p.x)) / d };

    return {r, s};
}

int main() {
    int N;
    cin &gt;&gt; N;

    vector&lt;vector&lt;double&gt; &gt; adj(N, vector&lt;double&gt;(N));

    for(int i = 0; i &lt; N; i++) {
        for(int j = 0; j &lt; N; j++) {
            cin &gt;&gt; adj[i][j];
        }
    }

    vector&lt;Point&gt; ps(N);

    for(int i = 0; i &lt; N; i++) {
        if(i == 0) ps[i] = {0.0, 0.0};
        else if(i == 1) ps[i] = { adj[0][1], 0.0 };
        else if(i == 2) {
            vector&lt;Point&gt; is = intersections(ps[0], ps[1], adj[0][2], adj[1][2]);
            if(is.empty()) {
                cout &lt;&lt; "Invalid" &lt;&lt; endl;
                return 0;
            }
            ps[i] = is[0];
        } else {
            vector&lt;Point&gt; first = intersections(ps[0], ps[1], adj[0][i], adj[1][i]),
                second = intersections(ps[1], ps[2], adj[1][i], adj[2][i]);
            if(first.empty() || second.empty()) {
                cout &lt;&lt; "Invalid" &lt;&lt; endl;
                return 0;
            }
            if(min(dist(first[0], second[0]), dist(first[0], second[1])) &lt; epsilon) ps[i] = first[0];
            else if(min(dist(first[1], second[0]), dist(first[1], second[1])) &lt; epsilon) ps[i] = first[1];
            else {
                cout &lt;&lt; "Invalid" &lt;&lt; endl;
                return 0;
            }
        }
    }

    for(int i = 0; i &lt; N; i++) for(int j = 0; j &lt; N; j++) {
        if(abs(dist(ps[i], ps[j]) - adj[i][j]) &gt; epsilon) {
            cout &lt;&lt; "Invalid" &lt;&lt; endl;
            return 0;
        }
    }

    cout &lt;&lt; "Valid" &lt;&lt; endl;
    for(const Point &amp;p : ps) {
        cout &lt;&lt; p.x &lt;&lt; " " &lt;&lt; p.y &lt;&lt; endl;
    }

    return 0;
}


I haven't had time to comment the code. If you want me to, leave a comment. I took your drawing as a sample (which is invalid) and wrote another sample myself:

4
0 10 11 10
10 0 8 11
11 8 0 8
10 11 8 0

Invalid

4
0 4 5 3
4 0 3 5
5 3 0 4
3 5 4 0

Valid
0 0
4 0
4 -3
0 -3


As you can see, a valid configuration is printed if one exists. The complexity of the construction algorithm is $O(N)$, but we need to check if all matrix entries are valid after construction, which is $O(N^2)$.