Skip to content

Euclidean Distance

Measure of proximity between two embeddings: the usual geometric distance between points in multidimensional space.

Formula

 d = sqrt( Σ (aᵢ − bᵢ)² )

The smaller the value, the closer the vectors.

Comparison with Cosine

Euclidean Cosine Similarity
What it considers Length and direction Direction only
Scale sensitivity Yes No
When more convenient Clustering, geometry Text search

Where Used

  • clustering (k-means);
  • nearest neighbor search;
  • image and feature comparison.

See Also

← All terms