Skip to content
AI360Xpert
Glossary
Definition

Euclidean Distance

Straight-line distance between two points, the L2 norm of the vector between them.

Think of It Like This

What a bird flies, not what a taxi drives.

Euclidean distance is ab2=i(aibi)2\lVert a - b \rVert_2 = \sqrt{\sum_i (a_i - b_i)^2} — Pythagoras, extended to as many dimensions as you have. It is the default notion of "close" in k-nearest neighbours, k-means, and most clustering.

The property that matters in practice is that it is sensitive to scale. A feature measured in metres and one measured in millimetres contribute wildly unequally, so the largest-range feature dominates the distance and effectively decides your neighbours. Standardising features before any distance-based method is not optional.

It also degrades in very high dimensions: distances between random points concentrate into a narrow band, so nearest and farthest neighbours become hard to distinguish. That concentration is one reason cosine similarity is preferred for embeddings — though for unit-length vectors the two produce the same ranking, since ab2=22cosθ\lVert a - b \rVert^2 = 2 - 2\cos\theta.