---
tag: 0TFDZN6AXP
kind: example
name: p-metric on R^n
aliases: [lp-metric]
msc: [46B20]
instance_of: [0VKD1TP7F3]
sources:
  - url: https://en.wikipedia.org/wiki/Lp_space
    locator: The p-norm in finite dimensions
---

## Example

Let $n \ge 1$ be an integer and let $p \ge 1$ be a real number.
For $x = (x_1, \ldots, x_n)$ and $y = (y_1, \ldots, y_n)$ in $\mathbb{R}^n$, let
$$d_p(x, y) = \left( \sum_{i=1}^{n} |x_i - y_i|^p \right)^{1/p}.$$
Then $d_p$ is a [[metric|063W5JMY85]] on $\mathbb{R}^n$.

## Remarks

The triangle inequality for $d_p$ is the Minkowski inequality.
For $p = 1$ it is the [[taxicab metric|07CJNE6ZAQ]], and for $p = 2$ it is the [[Euclidean metric|0E1MMCAY5B]].
For $0 < p < 1$, the same formula does not give a metric when $n \ge 2$: the triangle inequality fails.
The metric $d_p$ comes from the [[p-norm|0KNJWEVSMG]]: $d_p(x, y) = \|x - y\|_p$.

## Explanations

### L1 human

The p-metrics form a family of ways to combine the differences of the coordinates into one distance.
A larger $p$ gives more weight to the largest difference, and for very large $p$ the distance is close to the [[sup metric|0VTAXQEWQD]].
