Linear Algebra
The lemma gives a probabilistic guarantee that distances between vectors can be preserved after projection into a lower-dimensional space.
Why Distances Matter
Many datasets represent each item as a vector with a large number of dimensions. Working with all of those dimensions can be expensive, so dimensionality reduction lowers the number of dimensions while preserving as much important information as possible. In the Johnson-Lindenstrauss setting, the important information is the distances between vectors in a finite set.
The Johnson-Lindenstrauss Lemma describes a way to project a finite collection of vectors from a high-dimensional Euclidean space into a lower-dimensional space. Its central guarantee is probabilistic: after projection, distances between the vectors can be preserved. The result does not claim that every possible vector in the entire space is preserved; its setup concerns a finite vector set.
The Projection Setup
The lemma starts with a finite vector set Q in Rd. The symbol d represents the original number of coordinates, so Rd is the original, possibly high-dimensional, space. The target space has dimension n, where n is an integer satisfying the condition required by the lemma.
The projection is performed with a random matrix W in Rn,d. The target dimension is represented by n, while d represents the original dimension. Each entry of W is normally distributed with zero mean and variance 1/n. Multiplying the vectors by this matrix produces their projected representations in the lower-dimensional setting.
| Symbol | Role |
|---|---|
| Q | Finite set of vectors |
| d | Original dimension |
| n | Target, lower dimension |
| δ | Probability parameter in the lemma's guarantee |
| W | Random projection matrix in Rn,d |
The main objects in the projection setup
Reading the Guarantee
The phrase probabilistic guarantee means that the distance-preservation statement is expressed with a probability parameter rather than as an unconditional statement. The finite set Q, the lower dimension n, the parameter δ, and the random matrix W all belong to the lemma's setup. The guarantee concerns the distances between vectors in Q after the projection.
When interpreting a probability bound in this context, identify two separate ideas. First, the projection changes the representation by moving vectors into a lower-dimensional space. Second, the lemma gives a probability-qualified statement about how well distances between the finite collection of vectors are preserved. The parameter δ is the probability parameter used to express that qualification.
Vectors as Column Objects
In this chapter, vectors are column vectors in finite-dimensional Euclidean spaces. Their coordinates are arranged vertically rather than across a row. A vector with d coordinates belongs to Rd; the symbol d records the number of coordinates.
The superscript T is a compact way to display the coordinate list as a column-vector representation. The important convention is that u is one vertical vector with three coordinates, not three unrelated values.
For two vectors u and v in Rd, the inner product is commonly written as ⟨u, v⟩. It connects the two vectors. When the same vector appears twice, ⟨u, u⟩ is the inner product of that vector with itself.
Three Measurements of One Vector
The same vector can be measured in different ways. The Euclidean norm, also called the ℓ2 norm, combines squared coordinate magnitudes and takes a square root. It is obtained from the inner product of the vector with itself. The ℓ1 norm totals coordinate magnitudes. The ℓ∞ norm keeps only the largest coordinate magnitude.
Worked Norm Calculation
Measuring u = (2, −1, 3)
Calculate the inner product of u with itself, then use it to calculate the Euclidean norm. Also calculate the ℓ1 and ℓ∞ norms.
- 1Self inner product
Multiply corresponding coordinates and add: ⟨u, u⟩ = 2² + (−1)² + 3² = 4 + 1 + 9 = 14.
- 2Euclidean norm
Use the inner product with itself: ||u||₂ = √⟨u, u⟩ = √14.
- 3ℓ1 norm
Add the coordinate magnitudes: ||u||₁ = |2| + |−1| + |3| = 2 + 1 + 3 = 6.
- 4ℓ∞ norm
Keep the largest coordinate magnitude: ||u||∞ =
max(2, 1, 3)= 3.
For u = (2, −1, 3), the self inner product is 14, the Euclidean norm is √14, the ℓ1 norm is 6, and the ℓ∞ norm is 3.
| Measurement | What it uses | Value for u |
|---|---|---|
| ⟨u, u⟩ | Squared coordinate magnitudes without the final square root | 14 |
| ℓ2 norm | Square root of the self inner product | √14 |
| ℓ1 norm | All coordinate magnitudes added together | 6 |
| ℓ∞ norm | Largest coordinate magnitude | 3 |
Different rules measure different features of the same vector
Common Interpretation Errors
Common mistake Treating dimensionality reduction as if it preserved every detail of every vector.
What it looks likeAssuming that projecting into R^n leaves all information unchanged.
Why it failsThe lemma focuses on preserving distances between vectors in a finite set, not on claiming that every detail or every vector in the whole space is unchanged.
Do this insteadState the result in terms of distance preservation for the finite set Q and its probabilistic guarantee.
Common mistake Confusing d with n.
What it looks likeCalling n the original dimension and d the target dimension.
Why it failsd represents the original dimension, while n represents the target lower dimension.
Do this insteadRead W in R^(n,d) with n as the target dimension and d as the original dimension.
Common mistake Forgetting that W is random.
What it looks likeDescribing W as an arbitrary fixed matrix without mentioning how its entries are sampled.
Why it failsThe projection uses a random matrix whose entries are normally distributed with zero mean and variance 1/n.
Do this insteadIdentify W as the random matrix used for projection and include its stated entry distribution.
Common mistake Using the ℓ1 norm when the question asks for the Euclidean norm.
What it looks likeReporting 6 as the Euclidean norm of (2, −1, 3).
Why it failsSix is the sum of coordinate magnitudes, which is the ℓ1 norm.
Do this insteadFor the Euclidean norm, take the square root of the vector's inner product with itself, giving √14 for this vector.
Common mistake Using a coordinate value instead of its magnitude for the ℓ∞ norm.
What it looks likeChoosing −1 as the largest coordinate because it is numerically negative.
Why it failsThe ℓ∞ norm keeps the largest coordinate magnitude.
Do this insteadCompare absolute values and choose the largest magnitude; for (2, −1, 3), the result is 3.
Practice Check
Let v = (−2, 4, 1). Calculate ⟨v, v⟩, ||v||₂, ||v||₁, and ||v||∞. Then state which norm uses the largest coordinate magnitude and which norm totals all coordinate magnitudes.
Hints
- For the self inner product, square each coordinate and add the results.
- For the Euclidean norm, take the square root of the self inner product.
- For the ℓ1 norm, add 2, 4, and 1.
- For the ℓ∞ norm, choose the largest magnitude.
In your own words, explain the roles of Q, d, n, δ, and W in the Johnson-Lindenstrauss setup. Be precise about which dimension is original and which is the target.
Hints
- Q is a finite collection of vectors.
- Compare the meanings of Rd and Rn.
- δ is the probability parameter.
- W is the random matrix used for projection.
Key Takeaways
- 1The Johnson-Lindenstrauss Lemma gives a probabilistic guarantee that distances within a finite vector set can be preserved after projection into a lower-dimensional space.
- 2The setup uses a finite set Q in Rd, a target dimension n, a probability parameter δ, and a random matrix W in Rn,d.
- 3Vectors in this chapter are column vectors in finite-dimensional Euclidean spaces.
- 4The Euclidean norm is obtained by taking the square root of a vector's inner product with itself.
- 5The ℓ1 norm totals coordinate magnitudes, while the ℓ∞ norm keeps the largest coordinate magnitude.
At a glance
- Random projection reduces the number of dimensions while targeting preservation of distances within a finite vector set.
- The Johnson-Lindenstrauss setup distinguishes the original dimension d from the target dimension n and uses a random matrix W.
- The parameter δ expresses the probability-qualified nature of the distance-preservation guarantee.
- The inner product connects two vectors, and the Euclidean norm uses a vector's inner product with itself.
- The ℓ1 and ℓ∞ norms measure different coordinate features: total magnitude and largest magnitude.