TITLE: How far can I extend a geodesic and still have it be a shortest path?
QUESTION [5 upvotes]: First, I will set the scene: suppose $M$ is a compact connected smooth manifold equipped with a Riemannian metric. The Hopf-Rinow theorem guarantees that any two points $x,y\in M$ can be joined by a geodesic, and of all the geodesics joining $x$ and $y$, at least one is a shortest path from $x$ to $y$.
Now here is what I am trying to prove. Let $p\in M$. I want to show that there is a neighborhood $U$ of $p$ such that if $x,y\in U$, I can extend a shortest-path geodesic from $x$ to $y$ to a third point $z$ so that the path is also a shortest path from $x$ to $z$. The Hopf-Rinow theorem guarantees that the geodesic from $x$ to $y$ can be extended past $y$, but how can I guarantee that the geodesic continues being the shortest path for even just a little bit?

REPLY [5 votes]: This is, e.g., a consequence of the fact that the injectivity radius (see here: https://en.wikipedia.org/wiki/Cut_locus_(Riemannian_manifold)) of a compact smooth manifold is bounded from below (it's upper semicontinuous, see, e.g. here: The continuity of injectivity radius, but you'll find this also in textbooks about differential geometry). If you look at a neighbourhood of a point $p$ of the form $$\{\exp_p(tv): 0\le t \le r_i(p),\, v\in T_pM,  ||v||= 1)$$
with $r_i(p)$ being the injectivity radius of $M$ in $p$, then any geodesic starting in $p$ with length less than $r_i(p)$ will be minimizing.
You just have to make your neighbourhood $U$ small enough to get the result you want. 
The pertinent concept is (strong) geodesic convexity. 
References are, for example, Cheeger-Ebin, Comparison theorems in Riemannian Geometry, or Klingenbergs 'Riemannian Geometry' (and many other textbooks).