# Wasserstein metric

In mathematics, the Wasserstein distance or KantorovichRubinstein metric is a distance function defined between probability distributions on a given metric space ${\displaystyle M}$. It is named after Leonid Vaseršteĭn.
Intuitively, if each distribution is viewed as a unit amount of earth (soil) piled on ${\displaystyle M}$, the metric is the minimum "cost" of turning one pile into the other, which is assumed to be the amount of earth that needs to be moved times the mean distance it has to be moved. This problem was first formalised by Gaspard Monge in 1781. Because of this analogy, the metric is known in computer science as the earth mover's distance.