The Minkowski distance or Minkowski metric is a family of distance functions on a real coordinate space, defined by taking the p {\displaystyle p} th power along each coordinate, given a positive parameter p {\displaystyle p} . That is, it is the distance function associated to a p-norm. It is a generalization of both the Euclidean distance ( p = 2 {\displaystyle p=2} ) and the Manhattan distance ( p = 1 {\displaystyle p=1} ). It is named after the mathematician Hermann Minkowski.
Definition The Minkowski distance of order p {\displaystyle p} (where p ≥ 1 {\displaystyle p\geq 1} ) between two points
X = ( x 1 , x 2 , … , x n ) and Y = ( y 1 , y 2 , … , y n ) ∈ R n {\displaystyle X=(x_{1},x_{2},\ldots ,x_{n}){\text{ and }}Y=(y_{1},y_{2},\ldots ,y_{n})\in \mathbb {R} ^{n}}
is defined as:
D p ( X , Y ) = ( ∑ i = 1 n | x i − y i | p ) 1 p . {\displaystyle D_{p}\left(X,Y\right)={\biggl (}\sum _{i=1}^{n}|x_{i}-y_{i}|^{p}{\biggr )}^{\frac {1}{p}}.} This is the metric associated to the norm
‖ X ‖ p = ( ∑ i = 1 n | x i | p ) 1 / p {\displaystyle \|X\|_{p}=\left(\sum _{i=1}^{n}|x_{i}|^{p}\right)^{1/p}}
The Minkowski distance is a metric as a result of the Minkowski inequality,
‖ X + Y ‖ p ≤ ‖ X ‖ p + ‖ Y ‖ p . {\displaystyle \|X+Y\|_{p}\leq \|X\|_{p}+\|Y\|_{p}.}
Geometrically, this is a norm because the unit balls ‖ X ‖ p < 1 {\displaystyle \|X\|_{p}<1} are bounded and open in the standard topology, contain the origin, and are convex and balanced (invariant under X → − X {\displaystyle X\to -X} ). When 0 < p < 1 , {\displaystyle 0<p<1,} the same formula does not define a metric because it fails to satisfy the triangle inequality. For example, distance between ( 0 , 0 ) {\displaystyle (0,0)} and ( 1 , 1 ) {\displaystyle (1,1)} is 2 1 / p > 2 , {\displaystyle 2^{1/p}>2,} but the point ( 0 , 1 ) {\displaystyle (0,1)} is at a distance 1 {\displaystyle 1} from both of these points. However, a metric can be obtained for these values by removing the exponent of 1 / p {\displaystyle 1/p} :
d p ( X , Y ) = ∑ i = 1 n | x i − y i | p , 0 < p < 1. {\displaystyle d_{p}(X,Y)=\sum _{i=1}^{n}|x_{i}-y_{i}|^{p},\quad 0<p<1.}
… excerpt ends here. Continue reading the full article.



