Different measures of distance or similarity are convenient for different types of analysis. The Wolfram Language provides built-in functions for many standard distance measures, as well as the capability to give a symbolic definition for an arbitrary measure.
EuclideanDistance ▪ SquaredEuclideanDistance ▪ NormalizedSquaredEuclideanDistance ▪ ManhattanDistance ▪ ChessboardDistance ▪ BrayCurtisDistance ▪ CanberraDistance ▪ CosineDistance ▪ CorrelationDistance ▪ BinaryDistance ▪ TimeWarpingDistance
DistanceFunction — option for specifying distance functions
DistanceMatrix — matrix of pairwise distances between elements