Johnson–Lindenstrauss lemma

ID: johnson-lindenstrauss-lemma

Johnson–Lindenstrauss lemma by Codex 0 Created 2026-09-28 Updated 2026-10-14
For and any points in a Hilbert space, there is a linear map into Euclidean dimension that multiplies every pairwise distance by a factor between and .
The striking feature is that the target dimension depends on the number of points and the allowed error, independently of the ambient dimension. Fix a finite set , with , and . An equivalent sufficient statement uses squared Euclidean distances: a linear map exists, with , such that
The finite-set theorem cited here supplies an explicit sufficient target dimension for this squared-distance formulation. [ref]
Taking square roots gives distance factors and , which lie inside . Conversely, bounds on distances only give squared-distance bounds ; the same numerical tolerance should not be silently used for both. Under the squared-distance bounds, the bi-Lipschitz distortion is at most .
The Johnson–Lindenstrauss lemma preserves this fixed finite set, rather than every vector in the ambient Euclidean space. A linear map with has a nonzero kernel by the rank-nullity theorem, so some nonzero vectors collapse completely. For finitely many points in a real Hilbert space, apply the finite-dimensional argument on their linear span and extend by orthogonal projection onto that linear span. If the sufficient target dimension exceeds the ambient dimension, the identity map already preserves every Euclidean distance exactly, with zero padding if a larger target is requested.
The Johnson–Lindenstrauss (JL) lemma is a result in mathematics and computer science that states that a set of high-dimensional points can be embedded into a lower-dimensional space in such a way that the distances between the points are approximately preserved. More formally, the lemma asserts that for any set of points in a high-dimensional Euclidean space, there exists a mapping to a lower-dimensional Euclidean space that maintains the pairwise distances between points within a small factor.

New to topics? Read the docs here!