Geometric Distances
Geometric Distance Metrics
Euclidean Distance
Explanation: Measures the straight-line (as-the-crow-flies) distance between two points in Euclidean space. Common in geometry, physics, and machine learning.
Manhattan Distance
Explanation: Also called “city block” distance. Measures total absolute differences; better for grid-based layouts.
Minkowski Distance
Explanation: A generalized distance metric. When r=1r=1 → Manhattan, r=2r=2 → Euclidean.
Cosine Distance
Explanation: Measures the angle between two vectors. Commonly used in NLP, recommendation systems, and text similarity.
Hamming Distance
Explanation: Counts how many positions two strings differ in. Used for binary strings, error detection/correction.