Minkowski Distance Calculator (Generalized L_p)
Minkowski distance d_p generalized calculator: L_p family, unit balls, Holder inequality, and applications in machine learning and functional analysis.
Report a calculation error
Help us improve. Describe what is wrong with the calculation.
Result
| Voce | Valore |
|---|
Show full details
Share result
Disclaimer: this calculation is for informational purposes only. For important decisions, consult a qualified professional.
Minkowski distance
Minkowski distance d_p between two points A = (a_1, ..., a_n) and B = (b_1, ..., b_n) for parameter p >= 1:
d_p(A, B) = (sum_{i=1}^{n} |a_i - b_i|^p)^(1/p)
Generalizes three classical distances: p = 1 Manhattan (L1), p = 2 Euclidean (L2), p -> infty Chebyshev (Linf, max coordinate). Introduced by Hermann Minkowski (1864-1909) as part of normed space theory.
L_p norms family
Minkowski distance induces L_p norms family: ||x||_p = (sum |x_i|^p)^(1/p). For every p >= 1, L_p is legitimate NORM (positivity, homogeneity, triangle inequality). For 0 < p < 1, loses triangle (QUASI-norm). For p = infty: ||x||_inf = max |x_i|.
Notable cases
- p = 1: Manhattan (L1, taxicab). Outlier-robust, induces sparsity.
- p = 2: Euclidean (L2). Standard in math, physics, ML.
- p = infty: Chebyshev (Linf). King moves in chess.
- p = 0.5: NOT metric (no triangle). Level set is concave star.
- p = 1.5, 3: rarely used but valid.
L_p unit balls
Set S_p = {x : ||x||_p = 1} is "unit ball" in L_p. 2D shape varying p:
- p = 0.5: 4-point concave star (NOT convex).
- p = 1: DIAMOND vertices (1,0), (0,1), (-1,0), (0,-1).
- p = 1.5: smoothed intermediate.
- p = 2: classic CIRCLE.
- p = 3: nearly square with rounded corners.
- p = 5: closer to square.
- p = infty: exact SQUARE axis-aligned.
2D L_p volume: V = 4 r^2 (Gamma(1+1/p))^2 / Gamma(1+2/p). p=2: pi r^2, p=1: 2 r^2, p=infty: 4 r^2.
Convexity
L_p unit ball S_p is:
- NOT convex for 0 < p < 1.
- Convex for p >= 1.
- Strictly convex for 1 < p < infty.
- Convex with flat sides for p = 1, infty.
Holder inequality
For real p, q with 1/p + 1/q = 1 (conjugate exponents), and any vectors a, b in R^n:
|sum a_i b_i| <= ||a||_p * ||b||_q
Case p = q = 2 (self-conjugate): Cauchy-Schwarz |<a,b>| <= ||a||_2 ||b||_2. Case p = 1, q = infty: |sum a_i b_i| <= ||a||_1 ||b||_inf. Otto Holder (1889).
Minkowski inequality
For all p >= 1: ||a + b||_p = 1. For p < 1 reversed.
Equivalent norms
In finite dim n, all L_p norms are EQUIVALENT (constants C_1, C_2 with C_1 ||x||_p <= ||x||_q <= C_2 ||x||_p). Specific:
- ||x||_inf <= ||x||_2 <= sqrt(n) ||x||_inf.
- ||x||_2 <= ||x||_1 <= sqrt(n) ||x||_2.
- ||x||_inf <= ||x||_1 <= n ||x||_inf.
In INFINITE dim (function spaces), norms NO LONGER equivalent: fundamental distinction L^1, L^2, L^p, L^infty.
ML and optimization applications
- L1: Lasso, sparse coding, outlier robustness.
- L2: Ridge regression, SVM kernel, neural network weight decay.
- L1.5: sometimes used as compromise (Berhu loss).
- Linf: minimax loss, extreme robustness.
- Variable L_p: optimal p search per dataset.
- Mahalanobis: Euclidean weighted by covariance matrix.
Physics and math applications
- Banach spaces: complete normed (Lp with p in [1, infty]).
- Hilbert spaces: inner product (only L2 in Lp family).
- Lebesgue integration in Lp.
- PDEs: Lp estimates of solutions.
- Probability: Lp convergence.
- Differential geometry: general metric spaces.
History
Hermann Minkowski (1864-1909) studies geometry of numbers and normed spaces. Otto Holder (1889) proves key inequality. Frigyes Riesz (1907) develops L^p space theory. Stefan Banach (1932) "Theorie des operations lineaires" systematizes functional analysis.
Lp function spaces and the Riesz-Fischer theorem
Minkowski distance between vectors extends naturally to function spaces, giving rise to the Lp spaces, among the most important in modern analysis. The Lp space of a measure set gathers the functions whose p-th power of the absolute value is integrable, with norm given by the p-th root of that integral. For p=1 one has the integrable functions, for p=2 the square-integrable ones, fundamental in quantum mechanics and signal theory.
The crucial result is the Riesz-Fischer theorem: for every p between 1 and infinity the Lp space is complete, that is, every Cauchy sequence converges to an element of the space. This completeness makes the Lp Banach spaces, the ideal setting for functional analysis. Of all of them, only L2 possesses an inner product that induces the norm, becoming a Hilbert space: it is this additional geometric structure that makes L2 so special, with notions of orthogonality, projection and orthonormal bases.
Lp-Lq duality and the Riesz representation theorem
The Holder inequality, besides being an estimation tool, reveals a deep duality structure between Lp spaces with conjugate exponents. The Riesz representation theorem states that, for p strictly between 1 and infinity, the dual space of Lp, that is, the set of continuous linear functionals on it, is exactly Lq with 1/p + 1/q = 1. Every continuous functional is written as the integral of the product with a fixed function of Lq.
This duality has deep consequences: for 1 less than p less than infinity the Lp spaces are reflexive, that is, they coincide with their bidual, a property guaranteeing the existence of minima in many optimization problems and the weak compactness of bounded sets. The extreme cases p=1 and p=infinity behave differently and are more delicate. Lp-Lq duality is one of the pillars of functional analysis, with applications from partial differential equations to approximation theory.
Updated July 2026
Comments (0)
Login to leave a comment.
No comments yet. Be the first!