And the limitations of Euclidean space for hierarchical data.
Note: This is a compilation of blocks of texts and images gathered from around the internet that I found informative and useful. Sources are listed at the bottom. Thanks to Maria who helped clarify some things.
Grade school mathematics is taught using Euclidean geometry. This assumes Euclid’s axioms (The Elements, 300 BC):
However, the "Parallel Postulate" was a source of debate for centuries:
5. If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two Right Angles, then the two lines inevitably must intersect each other on that side if extended far enough.
More recently rephrased as Playfair's axiom: In a plane, given a line and a point not on it, at most one line parallel to the given line can be drawn through the point. Attempts to prove it failed because it need not hold true in all cases — leading to the discovery of hyperbolic geometry.
Hyperbolic surfaces can be found in nature. Two common examples are sea slugs (Figure 1) and lettuce (Figure 2). Their wavy structure indicates constant negative curvature, whereas a Euclidean surface has zero curvature and a sphere has positive curvature.
Gaussian curvature measures how a geometric object deviates from a flat plane. Figure 4 shows how a triangle behaves differently on differently curved surfaces.
In hyperbolic geometry, for any given line R and point P not on R, there are at least two distinct lines through P that do not intersect R.
The Poincaré disc model represents hyperbolic space as an open disk where space gets infinitely more “dense” as we approach the boundary. Thus, the shortest paths (geodesics) are curved arcs perpendicular to the boundary.
Figures 7 & 8: Visualizing the density increase toward the boundary.
A few notable points:
Hyperbolic space is relatively easy to tessellate compared to Euclidean space. M. C. Escher used this to depict infinity in a finite space, inspired by the geometer H. S. M. Coxeter.
Consider a tree with branching factor $b$. The number of nodes grows exponentially with level $l$. In 2D Euclidean space, leaf nodes quickly get squeezed at the edge because we don't have enough "room" — circumference only grows linearly.
Hyperbolic space matches the exponential growth of trees perfectly. The "distance" between points grows exponentially as we move toward the edge, eliminating the crowding effect.
The hyperbolic distance formula is:
$$d_{p}(\mathbf{x}, \mathbf{y})=\operatorname{arcosh}\left(1+2 \frac{\|\mathbf{x}-\mathbf{y}\|^{2}}{\left(1-\|\mathbf{x}\|^{2}\right)\left(1-\|\mathbf{y}\|^{2}\right)}\right)$$
We can’t exactly achieve the graph distance in hyperbolic space, but we can get arbitrarily close! The tradeoff is that we have to push the points increasingly close to the edge of the disk.