The metric of a Riemannian manifold determines the shortest distance between any two points.
I assume the reverse holds? That is, if you are given the shortest distance d(x,y) between every pair of points of a manifold M, the metric for M is determined? I am mainly interested in compact, connected, closed 2-manifolds, but the most general answer would be appreciated. (Apologies in advance for my naivete.)
Assuming I am correct above, is there some natural subset S of M such that knowing d(x,y) between every pair of points of S uniquely determines the metric (up to isometry)? For example, suppose S is a simple closed geodesic on M? Perhaps some assumptions on M are necessary: genus zero, convex, ... ?

