Norms and distance
Ways to measure vector size (**norms**) and closeness (**distances**)—L1, L2, and cousins used in losses and nearest-neighbor search.
What it is
Ways to measure vector size (norms) and closeness (distances)—L1, L2, and cousins used in losses and nearest-neighbor search.
Why it matters
Explains “nearest embedding,” regularization penalties, and why distance choice changes results.
How it works (plain)
L2 = straight-line size; L1 = taxi-cab style sum of absolutes. Distances derive from norms. Cosine cares about angle more than length.
Try it
Compute L1 vs L2 feel for vector (3,4) on paper (L2=5).
Myths
- ⚠️ Myth: One distance fits every retrieval problem.
- ✓ Reality: Match metric to embedding space and task.
Sources
- Course 04 dot products; Course 09 embeddings/RAG
- 3Blue1Brown: https://www.3blue1brown.com/ ↗
