The definition of geodesic convexity is like that of convexity, but with straight lines in an affine space generalized to geodesics in a Riemannian manifold or metric space.
Let $(X,g)$ be a Riemannian manifold and $C \subset X$ a subset. We say that $C$ is
weakly geodesically convex if for any two points from $C$ there exists exactly one minimizing geodesic in $C$ connecting them;
geodesically convex if for any two points in $C$ there exists exactly one minimizing geodesic in $X$ connecting them, and that geodesic arc lies completely in $C$
strongly geodesically convex if for any two points in $\overline{C}$ there exists exactly one minimizing geodesic in $X$ connecting them, and that geodesic arc lies completely in $C$, except possibly the endpoints; and furthermore there exists no nonminimizing geodesic inside $C$ connecting the two points.
The convexity radius at a point $p \in X$ is the supremum (which may be $+ \infty$) of $r \in \mathbb{R}$ such that for all $\eta \lt r$ the geodesic ball $B_p(r)$ is strongly geodesically convex.
The convexity radius of $(X,g)$ is the infimum over the points $p \in X$ of the convexity radii at these points.
For $X$ a metric space, a distance-preserving path is a function $x \colon [a,b]\to X$ which is an isometry. This is a metric-space analogue of an “arc-length-parametrized minimizing geodesic” on a Riemannian manifold. In particular, the existence of such a path implies that $d(x(a),x(b)) = b-a$. We then say that $X$ is geodesic (or geodesically convex) if any two points can be connected by a distance-preserving path.
We say that $X$ is a length space if for any $x$ and $y$, the distance $d(x,y)$ is the infimum of the lengths of all continuous paths from $x$ to $y$. The Hopf-Rinow theorem? says that for a metric space in which every closed bounded subset is compact, being a length space is equivalent to being geodesic.
At any point $p \in X$ of a Riemannian manifold, the convexity radius is positive.
This is due to (Whitehead).
If $X$ is a compact space then the convexity radius of $(X,g)$ is positive.
This is reproduced for instance as proposition 95 in (Berger)
Every paracompact manifold admits a complete Riemannian metric with bounded absolute sectional curvature and positive injectivity radius.
This is shown in (Greene).
Original literature includes
A review of geodesic convexity in Riemannian manifolds is in
A categorical perspective on geodesic convexity for metric spaces can be found in
Much of the issues on geodesic convexity becomes more complicated when trying to generalize from Riemannian to Lorentzian manifolds, as discussed at length at
In particular, the conclusions of the Hopf-Rinow Theorem fail to hold for complete Lorentzian manifolds.