Take points in a Euclidean space of any dimension , and fix a tolerance . The Johnson–Lindenstrauss lemma says there is a linear map into dimension
that changes every pairwise distance by a factor of at most . Two features deserve a double take. The target dimension does not involve the source dimension at all: a million points in compress exactly as well as a million points in . And the dependence on is only logarithmic: squaring the number of points merely doubles .
Better still, the map is oblivious: it is a random projection drawn without looking at the data, and it works for any point set with high probability. This is a different contract from PCA, which studies the data first and preserves global variance directions with no guarantee for any individual pair; the lemma guarantees every pair, and never reads the data. The proof below is the elementary one of Dasgupta and Gupta, and it is two moves long: a tail bound for a single vector, then a union bound.
The statement
Let be a random matrix with independent entries. For points and
with positive probability the map satisfies, for every pair ,
One vector at a time
The map is linear, so : the lemma’s requirement is exactly that preserve the squared norms of the vectors up to the factor . Rescaling changes nothing, since multiplies and by the same , so each of these vectors may be divided by its length. Everything then rests on a single claim: for one fixed unit vector , the squared image lies within of 1 with high probability.
Each coordinate of is a Gaussian linear combination, , and the coordinates are independent since they come from disjoint rows. This is the 2-stability of the Gaussian: projecting any unit vector, in any dimension, produces the same distribution, which is the source of the lemma’s indifference to . Consequently
a chi-square with degrees of freedom: mean , so , exactly the right scale. What remains is concentration, and the chi-square is generous with its moment generating function: for , . The Chernoff recipe, exponentiate, apply Markov, optimize , runs in closed form. For the upper tail, gives
and symmetrically . The elementary inequalities and turn both brackets into a single clean exponential:
One unit vector survives projection except with exponentially small probability in .
The union bound and the constant
A union bound turns the single-vector tail into a statement about all pairs. There are vectors to preserve, so the probability that any pair is distorted beyond is at most
which drops below 1 exactly when , and below when carries the extra factor . That is the whole proof, and it exposes the anatomy of the constant: the per-pair failure probability must be pushed below , an exponential tail converts that demand into in the exponent, and the in the tail is the curvature of the chi-square around its mean. The in the lemma is not geometry; it is the price of a union bound, paid in dimensions.
The numbers
The bound is explicit, so it can be evaluated at concrete values of and :
For points at the bound asks for dimensions, and the factor is the term that controls the cost: halving the tolerance quadruples , while relaxing it to brings the same million points down to about . In the other direction, the figures hold whether the points live in a thousand dimensions or a billion, and pushing from a million to a trillion only doubles them. The bound is also worst-case over all point sets and demands every pair simultaneously; practice routinely uses smaller and measures the distortion it actually gets, which for natural data is usually gentler than the guarantee.
There is a pleasant symmetry with the usual complaints about high dimensions. Concentration of measure is the villain in the story where nearest-neighbor distances stop being informative and the reason Gaussian samples crowd onto a thin spherical shell; here the same phenomenon is the entire mechanism, harnessed rather than suffered: the projection works precisely because a chi-square with degrees of freedom concentrates hard around its mean.
Variants and the lower bound
The Gaussian matrix is the cleanest to analyze, not the cheapest to use, and a line of work has replaced it while preserving the guarantee. Achlioptas showed entries drawn uniformly from work, as does a version with two thirds of the entries zero: no Gaussian sampling, integer arithmetic, the same up to constants. Ailon and Chazelle’s fast transform preconditions with a randomized Hadamard matrix so the projection takes roughly time instead of . Kane and Nelson pushed sparsity to a handful of nonzeros per column. On the applications side, the lemma is a workhorse wherever pairwise Euclidean geometry must survive compression: approximate nearest-neighbor search, where it entered algorithm design through Indyk and Motwani; sketching and streaming; and, through the restricted isometry property, the recovery guarantees of compressed sensing, where a JL-style bound applied to all sparse vectors at once plays the starring role.
For thirty years the nagging question was whether the was an artifact of the union-bound proof. It is not. Larsen and Nelson proved in 2017 that for every and there are point sets for which any embedding into dimensions with distortion , linear or not, requires . The elementary argument above is optimal up to the constant: two moves, and no cleverness left on the table.
A little history
The lemma was never meant to headline. Johnson and Lindenstrauss proved it in a 1984 paper on a question in functional analysis, whether Lipschitz maps defined on -point subsets of a metric space extend to the whole space into Hilbert space with controlled norm growth, and the dimension-reduction statement was a lemma en route, proved there with random orthogonal projections. Frankl and Maehara tightened the constants in 1988. The result crossed into computer science in the late 1990s, most visibly through Indyk and Motwani’s 1998 work on approximate nearest neighbors, and Dasgupta and Gupta’s 2003 note stripped the proof down to the chi-square computation given above. Larsen and Nelson’s 2017 optimality theorem closed the gap between what the union bound pays and what geometry demands, a rare case of a two-step argument from the 1980s being the final word.
References
- William B. Johnson, Joram Lindenstrauss. Extensions of Lipschitz mappings into a Hilbert space. Contemporary Mathematics, 26:189–206, 1984. The original paper; the lemma is the tool, not the theorem.
- Peter Frankl, Hiroshi Maehara. The Johnson–Lindenstrauss lemma and the sphericity of some graphs. Journal of Combinatorial Theory, Series B, 44(3):355–362, 1988. Sharpened constants and an early application.
- Piotr Indyk, Rajeev Motwani. Approximate nearest neighbors: towards removing the curse of dimensionality. Proceedings of STOC, 604–613, 1998. The lemma as an algorithmic workhorse.
- Sanjoy Dasgupta, Anupam Gupta. An elementary proof of a theorem of Johnson and Lindenstrauss. Random Structures and Algorithms, 22(1):60–65, 2003. The chi-square proof followed above.
- Dimitris Achlioptas. Database-friendly random projections: Johnson–Lindenstrauss with binary coins. Journal of Computer and System Sciences, 66(4):671–687, 2003. The ±1 and sparse constructions.
- Nir Ailon, Bernard Chazelle. The fast Johnson–Lindenstrauss transform and approximate nearest neighbors. SIAM Journal on Computing, 39(1):302–322, 2009. The Hadamard-preconditioned fast transform.
- Daniel M. Kane, Jelani Nelson. Sparser Johnson–Lindenstrauss transforms. Journal of the ACM, 61(1):1–23, 2014. Near-optimal sparsity per column.
- Kasper Green Larsen, Jelani Nelson. Optimality of the Johnson–Lindenstrauss lemma. Proceedings of FOCS, 633–638, 2017. The matching lower bound.