# Metric Spaces -- A Primer

DevFeed: [Metric Spaces -- A Primer](<https://devfeed.tech/articles/metric-spaces-a-primer-40285.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/08/26/metric-spaces-a-primer/>)

Published: 2012-08-26T12:08:25Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [levenshtein-distance](<https://devfeed.tech/tags/levenshtein-distance.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [metric](<https://devfeed.tech/tags/metric.md>), [symmetry](<https://devfeed.tech/tags/symmetry.md>), [topology](<https://devfeed.tech/tags/topology.md>), [triangle-inequality](<https://devfeed.tech/tags/triangle-inequality.md>)

## AI overview

This tutorial introduces metric spaces as sets equipped with distance functions that satisfy non-negativity, symmetry, and the triangle inequality. It explains that metrics impose a topology and contrasts metric-based work with approaches using non-metrics.

## Source excerpt

The Blessing of Distance We have often mentioned the idea of a "metric" on this blog, and we briefly described a formal definition for it. Colloquially, a metric is simply the mathematical notion of a distance function, with certain well-behaved properties. Since we're now starting to cover a few more metrics (and things which are distinctly not metrics) in the context of machine learning algorithms, we find it pertinent to lay out the definition once again, discuss some implications, and explore a few basic examples.