quality:correction, quality:corruption
Diameter

The diameter of the metric space (M, d g) {\displaystyle (M,d_{g})} is

The Hopf–Rinow theorem shows that if (M, d g) {\displaystyle (M,d_{g})} is complete and has finite diameter, it is compact. Conversely, if (M, d g) {\displaystyle (M,d_{g})} is compact, then the function d g: M × M → R {\displaystyle d_{g}:M\times M\to \mathbb {R} } has a maximum, since it is a continuous function on a compact metric space. This proves the following.

This is not the case without the completeness assumption; for counterexamples one could consider any open bounded subset of a Euclidean space with the standard Riemannian metric. It is also not true that any complete metric space of finite diameter must be compact; it matters that the metric space came from a Riemannian manifold.