Statistics Toolbox    

Reconstructing a Map from Inter-City Distances

Given only the distances between 10 US cities, cmdscale can construct a map of those cities. First, create the distance matrix and pass it to cmdscale. In this example, D is a full distance matrix: it is square, symmetric, has positive entries, and zeros on the diagonal.

Next, look at the eigenvalues returned by cmdscale. Some of these are negative, indicating that the original distances are not Euclidean. This is because of the curvature of the earth.

However, in this case, the two largest positive eigenvalues are much larger in magnitude than the remaining eigenvalues. So, despite the negative eigenvalues, the first two coordinates of Y are sufficient for a reasonable reproduction of D.

Here is a plot of the reconstructed city locations as a map. The orientation of the reconstruction is arbitrary: in this case, it happens to be close to, although not exactly, the correct orientation.

1

3

4

5

2


  Overview Statistical Plots