A similarity measure is a metric or function used to quantify how alike two examples, vectors, documents, or objects are. It is central to clustering, retrieval, recommendation, and nearest-neighbor methods.
In clustering algorithms, the metric used to determine how alike (how similar) any two examples are.