Minkowski spacetime

Minkowski distance formula: D = (Σ |x_i - y_i|^p)^(1/p)

Minkowski spacetime

Minkowski distance formula: D = (Σ |x_i - y_i|^p)^(1/p)

The Minkowski distance formula is a generalization of various distance measures, including Euclidean distance (when p=2) and Manhattan distance (when p=1).

Minkowski distance combines the differences between corresponding coordinates raised to the power of p, summed together, and then takes the p-th root of the total sum. This formula is versatile and can represent different types of distances depending on the value of p.

When p=2, Minkowski distance simplifies to the Euclidean distance, which is commonly used in geometry and physics. As p approaches 1, it becomes the Manhattan distance, often used in urban planning and computer science for grid-like structures.

Example

Consider two points in a 2D space: A(1, 2) and B(4, 6). For Euclidean distance (p=2), D = ((1-4)^2 + (2-6)^2)^(1/2) = (9 + 16)^(1/2) = 5. For Manhattan distance (p=1), D = |1-4| + |2-6| = 3 + 4 = 7.

Understanding Minkowski distance helps in choosing the appropriate distance measure for various applications, such as clustering, classification, and spatial analysis.

Related concepts

One email a day: 5 concepts + the 5 stories that matter →

Swipe through 100 ML concepts daily

Open TickerNews