(definition)

**Definition:**
The generalized distance between two points. In a plane with point p_{1} at (x_{1}, y_{1}) and p_{2} at (x_{2}, y_{2}), it is (|x_{1} - x_{2}|^{m} + |y_{1} - y_{2}|^{m})^{1/m}.

**Also known as** Minkowski distance.

**See also**
*Euclidean distance*, *rectilinear*, *Manhattan distance*, *Hamming distance*.

*Note:
This is easily generalized to higher dimensions. Euclidean distance is L _{2} distance. Rectilinear, Manhattan or Hamming distance is L_{1} distance. L_{∞} distance is max(|x_{1} - x_{2}|, |y_{1} - y_{2}|). Adapted from [CLR90, page 912].*

Author: PEB

More formal definitions of distance measures. Wikipedia definition of distance in the mathematical or physical sense.

Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul Black.

Entry modified 11 February 2019.

HTML page formatted Wed Mar 13 12:42:46 2019.

Cite this as:

Paul E. Black, "L_{m} distance", in
*Dictionary of Algorithms and Data Structures* [online], Paul E. Black, ed. 11 February 2019. (accessed TODAY)
Available from: https://www.nist.gov/dads/HTML/lmdistance.html