Chebyshev Distance

Published date: 2023-08-19

Last edited date: 2023-08-19

Aliases:

  • Tchebychev distance
  • maximum metric
  • L\textbf{L}_\infty metric
  • chessbard distance

Definition

The Chebyshev distance between two vectors or points xx and yy, with standard coordinates xix_i and yiy_i, respectively, is

DChebyshev(x,y)maxi(xiyi).D_{\text{Chebyshev}} (x, y)\coloneqq \max_i (\lvert x_i - y_i \rvert).

This equals the limit of the LpL_p metrics:

limp(i=1nxiyip)1/p,\lim_{p \to \infty} \left(\sum^{n}_{i = 1} \lvert x_i - y_i\rvert^p\right)^{1 / p},

hence it is also known as the L\text{L}_\infty metric.

Example

Let's say we have two points in a 2-dimensional space: Point AA with coordinates (x1,y1)(x_1, y_1) and Point BB with coordinates (x2,y2)(x_2, y_2). The Chebyshev distance between these two points can be computed as follows:

  1. Calculate Absolute Differences: compute the absolute differences between corresponding coordinates of the two points.
  • Absolute difference in xx-coordinates: x2x1\lvert x_2 - x_1 \rvert
  • Absolute difference in yy-coordinates: y2y1\lvert y_2 - y_1 \rvert
  1. Find Maximum Absolute Difference: compare the absolute differences calculated in step 1 and choose the larger of the two values. The maximum absolute difference is the Chebyshev distance between the two points.

Suppose we have Point AA with coordinates (2,5)(2, 5) and Point BB with coordinates (7,9)(7, 9).

  1. Calculate Absolute Differences:
  • absolute difference in xx-coordinates: 72=5\lvert 7 - 2 \rvert = 5
  • absolute difference in yy-coordinates: 95=4\lvert 9 - 5 \rvert = 4
  1. Find Maximum Absolute Difference: the Chebyshev distance between points AA and BB is 55 because it's the larger of the two absolute differences computed above.

References:

  1. Chebyshev distance