[proofplan]
We prove the existence of length-minimising geodesics under geodesic completeness; the equivalence of (i) and (ii) then follows from standard consequences (any Cauchy sequence lies in a compact set once a minimising geodesic to a cluster point is available, and conversely completeness of the metric space gives extendibility of geodesics). Fix $m \in M$ and an arbitrary target $q \in M$. We first prove a sphere-minimisation claim: for any $p \in M$ and any small enough radius $\delta$, there exists $p_0$ on the geodesic sphere of radius $\delta$ about $p$ such that the distances sum exactly: $d(p, p_0) + d(p_0, q) = d(p, q)$. Armed with the claim, we fix initial data at $m$ pointing towards a minimiser on a small sphere, run the geodesic $\gamma(t) = \exp_m(tv)$, and show that the set $I$ of times $t$ for which $\gamma(t)$ is a "partial minimiser" (i.e., $d(q, \gamma(t)) + t = d(q, m)$) is closed, non-empty, and maximal beyond $d(m, q)$. An open-ended argument: at the maximum time, the sphere-minimisation claim supplies additional minimising distance; concatenation with a new minimal geodesic forces the maximum to reach $d(m, q)$, at which point $q$ lies on $\gamma$.
[/proofplan]
[step:Prove the sphere-minimisation claim for a general $p \in M$]
Fix $p \in M$ and $q \in M$. By the [existence of normal neighbourhoods](/theorems/???), there exists $\delta_0 > 0$ such that for all $0 < \delta < \delta_0$, the exponential map $\exp_p: B_\delta(0) \subset T_p M \to M$ is a diffeomorphism onto its image, and the metric geodesic sphere
\begin{align*}
\partial B^{(g)}_\delta(p) := \{\tilde p \in M : d(p, \tilde p) = \delta\}
\end{align*}
coincides with $\exp_p(\partial B_\delta(0))$, where $\partial B_\delta(0) = \{v \in T_p M : |v|_g = \delta\}$. Since $\partial B_\delta(0)$ is compact in $T_p M$ and $\exp_p$ is continuous, $\partial B^{(g)}_\delta(p)$ is compact in $M$.
The function $\tilde p \mapsto d(\tilde p, q)$ is continuous on $M$, so it attains its minimum on the compact set $\partial B^{(g)}_\delta(p)$ at some point $p_0 \in \partial B^{(g)}_\delta(p)$:
\begin{align*}
d(p_0, q) = \min_{\tilde p \in \partial B^{(g)}_\delta(p)} d(\tilde p, q).
\end{align*}
We claim
\begin{align*}
d(p, q) = d(p, p_0) + d(p_0, q) = \delta + d(p_0, q).
\end{align*}
The inequality "$\leq$" is the triangle inequality $d(p, q) \leq d(p, p_0) + d(p_0, q)$. For the reverse inequality, let $\varepsilon > 0$ and choose any curve $\gamma: [0, T] \to M$ from $p$ to $q$ with length $L(\gamma) \leq d(p, q) + \varepsilon$. Since $\gamma(0) = p \in B^{(g)}_\delta(p)$ (taking $\delta$ small enough that $p$ lies inside the open ball $B^{(g)}_\delta(p) := \{\tilde p : d(p, \tilde p) < \delta\}$ automatically, since $d(p, p) = 0 < \delta$) and $\gamma(T) = q \notin B^{(g)}_\delta(p)$ (taking $\delta < d(p, q)$), continuity and intermediate value give a parameter $t_0 \in (0, T]$ with $\gamma(t_0) \in \partial B^{(g)}_\delta(p)$.
Splitting the length: $L(\gamma) = L(\gamma|_{[0, t_0]}) + L(\gamma|_{[t_0, T]})$. The first piece is a curve from $p$ to $\gamma(t_0)$, so $L(\gamma|_{[0, t_0]}) \geq d(p, \gamma(t_0)) = \delta$. The second piece is a curve from $\gamma(t_0)$ to $q$, so $L(\gamma|_{[t_0, T]}) \geq d(\gamma(t_0), q) \geq d(p_0, q)$, where the last inequality uses that $p_0$ minimises distance to $q$ on $\partial B^{(g)}_\delta(p)$ and $\gamma(t_0) \in \partial B^{(g)}_\delta(p)$. Combining,
\begin{align*}
d(p, q) + \varepsilon \geq L(\gamma) \geq \delta + d(p_0, q).
\end{align*}
Since $\varepsilon > 0$ is arbitrary, $d(p, q) \geq \delta + d(p_0, q)$, and combined with the triangle inequality this gives $d(p, q) = \delta + d(p_0, q) = d(p, p_0) + d(p_0, q)$.
[guided]
Why is a normal neighbourhood a necessary hypothesis to have a geodesic sphere of radius $\delta$ coincide with $\exp_p(\partial B_\delta(0))$? Because $\exp_p$ is only a local diffeomorphism, and the image $\exp_p(\partial B_\delta(0))$ equals the metric sphere $\{\tilde p : d(p, \tilde p) = \delta\}$ only for $\delta$ smaller than the injectivity radius at $p$ — this is content of the [Gauss lemma](/theorems/???) and its companion theorems on radial minimisation. For larger $\delta$, geodesics could curve back and create metric-sphere points that are not reached by radial geodesics.
Once the normal-neighbourhood identification is established, the sphere is a diffeomorphic image of the Euclidean sphere $\partial B_\delta(0) \subset T_p M$, which is compact, so the metric sphere is compact. This is the fact we need for the existence of a minimiser $p_0$.
Now the geometric content of the claim: "distances sum exactly". Any curve $\gamma$ from $p$ to $q$ must cross the sphere $\partial B^{(g)}_\delta(p)$ — it starts inside the open ball $B^{(g)}_\delta(p)$ (at $p$ itself, with zero distance) and ends outside (at $q$, with distance $\geq d(p, q) > \delta$). So $\gamma$ has a crossing point $\gamma(t_0)$ on the sphere, and the length of $\gamma$ splits into two pieces, each of which is bounded below by the appropriate $d$-distance.
The key estimate: $L(\gamma|_{[t_0, T]}) \geq d(p_0, q)$ uses the minimality of $p_0$ on the sphere — any other sphere point $\gamma(t_0)$ has $d(\gamma(t_0), q) \geq d(p_0, q)$. This replaces "distance from wherever $\gamma$ crosses the sphere" with "distance from the best crossing point".
Taking infimum over curves gives $d(p, q) \geq \delta + d(p_0, q)$. The triangle inequality provides the reverse, and we get exact equality — the three points $p, p_0, q$ are "collinear" in the metric sense.
[/guided]
[/step]
[step:Initialise a geodesic $\gamma$ from $m$ aimed at a sphere-minimiser]
Now take $p = m$ and apply the claim: for $\delta < \min(\delta_0, d(m, q))$, there exists $m_0 \in \partial B^{(g)}_\delta(m)$ with
\begin{align*}
d(m, m_0) + d(m_0, q) = d(m, q), \qquad d(m, m_0) = \delta.
\end{align*}
Since $m_0 \in \exp_m(\partial B_\delta(0))$, there exists $v \in T_m M$ with $|v|_g = 1$ and $\exp_m(\delta v) = m_0$. By geodesic completeness, the geodesic
\begin{align*}
\gamma : [0, \infty) &\to M \\
t &\mapsto \exp_m(tv)
\end{align*}
is defined for all $t \geq 0$. It is a unit-speed geodesic: $|\gamma'(t)|_g = |v|_g = 1$ for all $t$.
Define the set
\begin{align*}
I := \{t \in [0, d(m, q)] : d(q, \gamma(t)) + t = d(q, m)\}.
\end{align*}
By the claim, $\delta \in I$ (since $d(q, m_0) + \delta = d(q, m)$ and $m_0 = \gamma(\delta)$). Also $0 \in I$ directly, since $d(q, \gamma(0)) + 0 = d(q, m)$.
The set $I$ is closed in $[0, d(m, q)]$: it is the preimage of $\{0\}$ under the continuous function $t \mapsto d(q, \gamma(t)) + t - d(q, m)$. Let
\begin{align*}
T := \sup I.
\end{align*}
Since $I \ni \delta$ and $I$ is bounded above by $d(m, q)$, we have $\delta \leq T \leq d(m, q)$. Since $I$ is closed, $T \in I$, i.e.,
\begin{align*}
d(q, \gamma(T)) + T = d(q, m).
\end{align*}
[guided]
The object of the proof is to show $\gamma$ reaches $q$ — specifically, $\gamma(d(m, q)) = q$. We construct a growing "realised minimisation" set $I$: at time $t \in I$, the concatenation "radial geodesic from $m$ to $\gamma(t)$" followed by a minimal curve from $\gamma(t)$ to $q$ would have total length $t + d(q, \gamma(t)) = d(q, m)$, which is the shortest possible length from $m$ to $q$. So in effect, $I$ tracks the times at which $\gamma$ is part of a minimising strategy.
Why is $\delta \in I$ automatic? Because we chose $\gamma$ so that $\gamma(\delta) = m_0$ is the sphere-minimiser, and the claim says $d(m, m_0) + d(m_0, q) = d(m, q)$, i.e., $\delta + d(q, \gamma(\delta)) = d(m, q)$, which is exactly the defining condition for membership in $I$.
Why is $I$ closed? Because the function $t \mapsto d(q, \gamma(t)) + t$ is continuous (composition of continuous maps), and its level set $\{d(q, \gamma(t)) + t = d(q, m)\}$ is closed. So $T = \sup I$ lies in $I$.
Our goal: show $T = d(m, q)$. Then $d(q, \gamma(T)) + T = d(q, m)$ reduces to $d(q, \gamma(T)) = 0$, i.e., $\gamma(T) = q$, and $\gamma|_{[0, T]}$ is a length-minimising geodesic from $m$ to $q$ (length $T = d(m, q)$).
[/guided]
[/step]
[step:Extend $I$ past $T$ via the sphere-minimisation claim at $\gamma(T)$ to derive a contradiction with $T < d(m, q)$]
Suppose for contradiction that $T < d(m, q)$. We apply the sphere-minimisation claim with $p := \gamma(T)$, using some radius $\varepsilon$ satisfying $0 < \varepsilon < \min(\delta_0(\gamma(T)), d(\gamma(T), q))$, where $\delta_0(\gamma(T))$ is a normal-neighbourhood radius at $\gamma(T)$ (which exists by the [existence of normal neighbourhoods](/theorems/???) at every point of a Riemannian manifold). The claim produces $p_0 \in \partial B^{(g)}_\varepsilon(\gamma(T))$ with
\begin{align*}
d(\gamma(T), p_0) = \varepsilon, \qquad d(p_0, q) = d(\gamma(T), q) - \varepsilon.
\end{align*}
Using the defining property $d(q, \gamma(T)) + T = d(q, m)$, we have $d(\gamma(T), q) = d(q, m) - T$. Substituting:
\begin{align*}
d(p_0, q) = d(q, m) - T - \varepsilon.
\end{align*}
On the other hand, the triangle inequality gives
\begin{align*}
d(m, p_0) \geq d(m, q) - d(p_0, q) = d(m, q) - (d(q, m) - T - \varepsilon) = T + \varepsilon.
\end{align*}
Now consider the concatenation $\alpha$ of two curves:
- $\gamma|_{[0, T]}$: a unit-speed geodesic from $m$ to $\gamma(T)$, of length $T$.
- A length-minimising path from $\gamma(T)$ to $p_0$: this exists because $p_0 \in \partial B^{(g)}_\varepsilon(\gamma(T))$ and $\varepsilon$ is within a normal neighbourhood of $\gamma(T)$, so the unique radial geodesic from $\gamma(T)$ to $p_0$ in that chart realises the distance $\varepsilon$ (again by [normal neighbourhoods and radial minimisation](/theorems/???)).
The total length of $\alpha$ is $T + \varepsilon$. Thus
\begin{align*}
d(m, p_0) \leq L(\alpha) = T + \varepsilon.
\end{align*}
Combining with the previous inequality $d(m, p_0) \geq T + \varepsilon$, we get $d(m, p_0) = T + \varepsilon$, and $\alpha$ is a length-minimising path from $m$ to $p_0$.
A length-minimising path between two points in a Riemannian manifold is a geodesic ([minimisers are geodesics](/theorems/???)), and concatenations of geodesics are geodesics only if they connect smoothly, i.e., the outgoing velocity of the first piece equals the incoming velocity of the second. Therefore the radial geodesic from $\gamma(T)$ to $p_0$ must be the continuation of $\gamma|_{[0, T]}$, i.e., $p_0 = \gamma(T + \varepsilon)$.
Substituting $p_0 = \gamma(T + \varepsilon)$ into $d(p_0, q) = d(q, m) - T - \varepsilon$:
\begin{align*}
d(q, \gamma(T + \varepsilon)) + (T + \varepsilon) = d(q, m),
\end{align*}
so $T + \varepsilon \in I$. Since $T + \varepsilon \leq d(m, q)$ (from $d(q, \gamma(T + \varepsilon)) \geq 0$ and the identity above: $d(q, m) - T - \varepsilon \geq 0$ iff $T + \varepsilon \leq d(q, m) = d(m, q)$), we have found a point of $I$ strictly greater than $T$. This contradicts $T = \sup I$.
Therefore $T = d(m, q)$. Since $T \in I$,
\begin{align*}
d(q, \gamma(d(m, q))) + d(m, q) = d(q, m), \qquad \text{hence } d(q, \gamma(d(m, q))) = 0,
\end{align*}
i.e., $\gamma(d(m, q)) = q$. The unit-speed geodesic $\gamma|_{[0, d(m, q)]}$ has length $d(m, q)$ and connects $m$ to $q$, so it is length-minimising.
[guided]
The heart of this step is to use the sphere-minimisation claim a second time, now centred at $\gamma(T)$ rather than at $m$. If $T < d(m, q)$, then $\gamma(T)$ is not yet at $q$, and the claim supplies a new minimiser $p_0$ at distance $\varepsilon$ from $\gamma(T)$ towards $q$ (in the metric sense).
We then build a curve $\alpha$ by concatenating $\gamma|_{[0, T]}$ with the radial geodesic from $\gamma(T)$ to $p_0$. This concatenation has length $T + \varepsilon$.
The crucial observation: $d(m, p_0) \geq T + \varepsilon$ by the triangle inequality applied to the three points $m, p_0, q$ (distances must sum to at least $d(m, q)$, and we have explicit control on $d(p_0, q)$). Combined with $L(\alpha) = T + \varepsilon \geq d(m, p_0)$ (length bounds distance from above), we get $L(\alpha) = d(m, p_0)$, so $\alpha$ is a minimiser.
A minimising path must be a smooth geodesic — if it had a corner at $\gamma(T)$, we could shortcut by smoothing the corner and reduce the length (standard variational fact about [minimising paths are smooth geodesics](/theorems/???)). The outgoing direction of $\gamma$ at $\gamma(T)$ is therefore the incoming direction of the radial geodesic from $\gamma(T)$ to $p_0$. By uniqueness of geodesics with given initial data, the radial piece is simply the continuation of $\gamma$, so $p_0 = \gamma(T + \varepsilon)$.
Substituting back, $T + \varepsilon \in I$, contradicting $T = \sup I$. So the assumption $T < d(m, q)$ was false, and $T = d(m, q)$.
A reader might ask: why does $T + \varepsilon \leq d(m, q)$? Because the sphere-minimisation claim gives $d(p_0, q) = d(\gamma(T), q) - \varepsilon = (d(m, q) - T) - \varepsilon \geq 0$, so $T + \varepsilon \leq d(m, q)$. This uses that $\varepsilon < d(\gamma(T), q)$ was part of the choice of $\varepsilon$.
[/guided]
[/step]
[step:Derive (i) $\Leftrightarrow$ (ii) from the existence of length-minimising geodesics and standard metric-space arguments]
(i) $\Rightarrow$ (ii): Let $(x_n)$ be a Cauchy sequence in $(M, d)$. Fix $m \in M$. Cauchy sequences are bounded, so there exists $R > 0$ with $d(m, x_n) \leq R$ for all $n$. By the first part of the theorem, for each $n$ there is a length-minimising unit-speed geodesic $\gamma_n: [0, d(m, x_n)] \to M$ from $m$ to $x_n$. Each $\gamma_n(d(m, x_n))$ equals $x_n$ and lies in $\exp_m(\overline{B}(0, R)) \subset M$.
The closed ball $\overline{B}(0, R) \subset T_m M$ is compact. Since $\exp_m$ is defined on all of $T_m M$ (by geodesic completeness) and is continuous, the image $\exp_m(\overline{B}(0, R))$ is compact in $M$. Hence $(x_n)$ lies in a compact set and has a convergent subsequence $x_{n_k} \to x \in M$. Cauchy sequences with a convergent subsequence are themselves convergent, so $x_n \to x$ in $(M, d)$. Thus $(M, d)$ is complete.
(ii) $\Rightarrow$ (i): Let $\gamma: [0, T) \to M$ be a maximally extended geodesic with $T < \infty$; we show this leads to a contradiction with metric completeness. For a sequence $t_n \uparrow T$, unit-speed-ness (or constant-speed parametrisation) gives
\begin{align*}
d(\gamma(t_n), \gamma(t_m)) \leq L(\gamma|_{[t_m, t_n]}) = c\,|t_n - t_m|,
\end{align*}
where $c = |\gamma'(0)|_g$. Hence $(\gamma(t_n))$ is Cauchy in $(M, d)$. By completeness, $\gamma(t_n) \to p \in M$. Standard [extension of geodesics beyond a limit point](/theorems/???) — using the uniform injectivity radius on a small neighbourhood of $p$ and the ODE existence theorem applied to the geodesic equation with initial condition at $p$ — shows $\gamma$ extends smoothly beyond $T$, contradicting maximality. Hence every geodesic extends to all of $\mathbb{R}$, i.e., $(M, g)$ is geodesically complete.
This completes the proof of the Hopf-Rinow theorem: geodesic completeness implies the existence of length-minimising geodesics between any two points, and is equivalent to metric-space completeness.
[guided]
The $(i) \Rightarrow (ii)$ direction uses what we just proved — existence of length-minimising geodesics — to confine a Cauchy sequence to a compact set, then invokes the topological fact that Cauchy-plus-subsequence-convergent implies convergent. The compactness of $\exp_m(\overline B(0, R))$ is the key: geodesic completeness makes $\exp_m$ defined on all of $T_m M$, so closed bounded sets in $T_m M$ push forward to compact sets in $M$.
The $(ii) \Rightarrow (i)$ direction is the converse: a geodesic cannot "run out of space" in finite time if the space is metrically complete. The intuition is that approaching a finite endpoint $T$ would produce a Cauchy sequence via the unit-speed parametrisation, which by completeness converges to a limit point $p \in M$; then the geodesic ODE, solved locally around $p$ with appropriate initial velocity, extends the geodesic past $T$. Since $T$ was assumed maximal, this is a contradiction unless $T = \infty$.
Combining: the equivalence (i) $\Leftrightarrow$ (ii), together with the length-minimising part, is the full statement of Hopf-Rinow.
[/guided]
[/step]