Space-filling Curves
One-dimensional lines that fill two-dimensional space
In 1890, Giuseppe Peano constructed a continuous curve that passes through every point in a unit square - a one-dimensional object that fills two-dimensional space. The result scandalised mathematicians who had assumed dimension was a straightforward concept. David Hilbert published a simpler variant in 1891, and the family of space-filling curves has grown to include dozens of variants, each with different properties.
The key practical property is locality preservation. Nearby points on the Hilbert curve tend to stay nearby in two-dimensional space. This makes Hilbert curves valuable for mapping multidimensional data onto one dimension while keeping related items close together. Google's S2 geometry library uses Hilbert curves to index the surface of the Earth, enabling efficient spatial queries. Database systems use them for range queries on geospatial data.
Space-filling curves also challenge our intuition about dimension. A curve is one-dimensional, a square two-dimensional - yet one can perfectly fill the other. The resolution comes from fractal geometry: the Hausdorff dimension of a space-filling curve is 2, not 1. It is topologically a curve but metrically a surface. This distinction, formalised by Hausdorff in 1918, was one of the insights that led to fractal geometry as a discipline.