# Given an arbitrary surface, what is the smallest distance from two points “walking” along the surface?

Yesterday, I was thinking about one characterization of the line segment in euclidean geometry: The shortest distance between two points is a line segment. We can use this to describe a "line" in spherical geometry, for example.

But how do we do to find the shortest distance between two points in a surface, "walking" along the surface? I have been thinking the following: Suppose you have the surface described by $z=x^2+\sin(y)$, lets take two points at this surface, say: $\{x_0,y_0,z_0\},\{x_1,y_1,z_1\}$. I believe we have to find a plane which have these two points as solutions and have a continuous curve as an intersection with the original surface and then use line integrals, but (intuitively) there can be a myriad such curves. How to find the best one (shortest distance)?

Also, how simple are the curves that we can have as an intersection? I guess that if we are lucky enough, we can find some convenient cases in which it could be written as some of original functions used in the original function, that is: An intersection function in terms of $x²,\sin(y)$, but I guess there are also some examples in which the intersection function can be radically different from the functions given in the original function.

Also I am assuming that the intersection with a plane would yield the best distance, but it could be something else. I am assuming it is a plane because I've seen somewhere that the smallest distance between two points on the sphere is the intersection of it with a plane. This is perhaps, something basic from calculus and my stupidity has forbidden me of seeing it, but I can't really find out by myself. I am also sorry about the complete speculative nature of my question, but I believe it will be meaningful enough to allow answers.

• you have to first figure out the induced metric (if you assume your surface is smoothly embedded in Euclidean space). and then by solving some differential equation, you can get the equation of geodesic, which is locally the shortest path. – Anubhav Mukherjee Jan 15 '17 at 14:57
• The important keyword in what @Anubhav said is "geodesic", and the huge domain (including ordinary surfaces as a particular case) is "differential geometry"". – Jean Marie Jan 15 '17 at 15:07
• some keywords: geodesics, exponential functions on manifolds – Max Jan 15 '17 at 15:07
• @OppaHilbertStyle try Do-Carmo's book on differential/Riemannian geometry – Anubhav Mukherjee Jan 15 '17 at 15:24
• @AskYourself differential geometry is incredibly mildly touched on in multivariate calculus. However, it is a very advanced subject in surface geometry. I don't know for sure, but I am going to assume it is something primarily taught in graduate school. – The Great Duck Jun 7 '17 at 15:07