Johnson–Lindenstrauss lemma 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.