# Four-point CAT(0) condition

The definition of a metric space guarantees that if we pick three points ${A,B,C}$ from it, we can draw a triangle in the Euclidean plane, with vertices labeled ${A,B,C}$ so that the side lengths are equal to the corresponding distances ${|AB|, |BC|, |CA|}$ in the metric space. In other words, we can represent any triple of points as vertices of a triangle.

The above paragraph is from Tight spans and Gromov hyperbolicity, but here the similarity ends. Moving on to four points ${A,B,C,D}$ we find that it is possible to draw a quadrilateral with side lengths equal to the corresponding distances ${|AB|, |BC|, |CD|, |DA|}$.

Except for the degenerate case (one length equal to the sum of three others), the quadrilateral is not rigid: one can change the angles while keeping the sidelengths the same.

Since the quadrilateral has one degree of freedom, we cannot hope to have the correct lengths of both diagonals ${AC}$ and ${BD}$. One of two diagonals can be made to match the metric space distance, just be drawing two triangles and gluing them together. But this is not so interesting.

There is an interesting class of metric spaces for which one can always draw a Euclidean quadrilateral as above so that neither diagonal is too short (they are allowed to be too long). These are called CAT(0) spaces, and they generalize the concept of a Riemannian manifold of nonpositive sectional curvature (more on this later). Every Euclidean space is CAT(0) for obvious reasons.

For example, if a CAT(0) space contains four points with pairwise distances ${|AB|=|CD|=2}$, ${|BC|=|DA|=1}$, then ${|AC|^2+|BD|^2\le 10}$. Indeed, any Euclidean quadrilateral with these sidelengths is a parallelogram, in which the sum of squares of the diagonals is ${2\cdot (2^2+1^2)=10}$. (It never pays to draw ${ABCD}$ with self-intersections, because that only makes the “diagonals” shorter).

For a non-parallelogram example, take ${|AB|=2}$, ${|BC|=3}$, ${|CD|=4}$,and ${|DA|=5}$. The diagonal lengths ${|AC|=4}$ and ${|BD|=6}$ are allowed by the axioms of a metric space, but not by the CAT(0) condition.

This can be checked using a bunch of cosine formulas: $\displaystyle \cos\angle ADB = \frac{5^2+6^2-2^2}{2\cdot 5\cdot 6} =\frac{19}{20}, \\ {}\\ \cos\angle CDB = \frac{4^2+6^2-3^2}{2\cdot 4\cdot 6} =\frac{43}{48}, \\ {} \\ \cos\angle CDA = \frac{|AD|/2}{|CD|} =\frac{5}{8},$

where the last computation is simpler because ${\triangle CDA}$ is isosceles. Since ${\angle CDA=\angle CDB+\angle ADB}$, the addition law of cosines yields a contradiction.

Let’s see what CAT(0) has to do with curvature. First, a closed curve with intrinsic metric is not a CAT(0) space. Indeed, one can find four points ${A,B,C,D}$ on the curve that are equally spaced at distances ${L/4}$, where ${L}$ is the length of the curve. Then the corresponding Euclidean quadrilateral must be a rhombus of sidelength ${L/4}$. One of its diagonals will be at most ${L\sqrt{2}/4}$, which is less than ${L/2}$ required by the intrinsic metric of the curve.

As a corollary, a CAT(0) space does not have closed geodesics. One can object that compact negatively curved manifolds (e.g., double torus) have plenty of closed geodesics. The answer is that to actually characterize nonnegatively curved spaces, one must impose the CAT(0) condition only locally.

The standard definitions of a CAT(0) space require any two points to be connected by a geodesic, and are stated in terms of geodesics. Here is one of them: for any geodesic ${\gamma\colon [a,b]\rightarrow X}$ and for any fixed point ${A\in X}$ the function $\displaystyle F(t)=d\,^2(\gamma(t),A)-t^2 \ \ \ \ \ (1)$

is convex. (Here ${d\,^2}$ is the square of the distance.)

The condition (1) may look contrived, until one realizes that in a Euclidean space ${F}$ is always an affine function. Thus, the definition says that the distance function in a CAT(0) space is at least as convex as in a Euclidean space. By the way, (1) indeed implies that ${t\mapsto d(\gamma(t),A)}$ is a convex function. I leave this as an exercise.