Skip to content
nonconvexcard

Three similarities agree on the unit sphere

ProofFoundation⏱ 15 minRAGcosinedot producteuclideannormalisation

Problem

Prove ∥u−v∥22=2−2⟨u,v⟩\|u-v\|_2^2 = 2-2\langle u,v\rangle for unit vectors, deduce that ranking by cosine, dot product and negative Euclidean distance coincide on the sphere, and give an explicit example off the sphere where dot-product and Euclidean rankings disagree.

Write a complete argument. Every inequality you use should be one you could state precisely.

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
A sufficient condition for correct retrievalRAGProofIntermediate30 min
Measure anisotropy in an embedding space runRAGCodingIntermediate1 hour
The density of the cosine between random directionsRAGProofAdvanced1 hour
The maximum of N distractor similaritiesRAGProofAdvanced30 min