Ball (mathematics) 2026-10-14
In a metric space , an open ball of radius about is . A closed ball instead uses . The strict inequality matters: a point at distance exactly belongs to the closed ball and is excluded from the open ball. In particular, is excluded from all three open unit balls above, and included in all three closed unit balls.
The three closed unit balls centred at zero are , , and . Their shapes are a diamond (a rotated square), a disk with a circle as its boundary, and an axis-aligned square. A ball need not look round! The corresponding open balls are the interiors of these shapes. At , Manhattan distance from zero is and Euclidean distance is , whereas Chebyshev distance is : only the square's open unit ball contains this point.
Three closed unit balls on the same coordinate scale
. Details. These shapes illustrate , with either the open ball or closed ball convention used consistently. Their outlines are included in the displayed closed balls. In an arbitrary metric space, however, points at distance exactly need not form the topological boundary; the discrete metric below shows why this distinction matters.
Hamming cube as an L1 and L2 metric Created 2026-09-28 Updated 2026-10-14
Use the convention for the Hamming cube . Its elements are length- binary strings, and their Hamming distance counts the differing coordinates:Send each binary string to the vector with the same coordinates, by . Every differing coordinate contributes both to the sum of absolute differences and to the sum of squared differences. Therefore the L1 norm and L2 norm give, respectively,This short coordinate calculation proves that the L1 norm gives an isometric embedding, while Euclidean distance grows like the square root of the number of changed binary digits. For example, and differ twice: their Hamming distance and Manhattan distance are , but their Euclidean distance is . Comparing binary strings in these two geometric representations answers different questions even though the points have the same coordinates.
For distinct pairs ranges over every integer from to . The metric embedding into the L2 norm thus has sharp ratiosNeighbors attain and opposite corners attain . This computes the bi-Lipschitz distortion of this coordinate map; it does not prove that every metric embedding into an L2 space has at least this bi-Lipschitz distortion. Uniformly multiplying the output coordinates changes and together and leaves unchanged.
The important family distinction is that these coordinate maps have no dimension-independent bound on their bi-Lipschitz distortion into the L2 norm, yet they do give a uniform coarse embedding of a family of metric spaces. Pad each output vector with zero coordinates to view all maps in the single l2 sequence space, an L2 space for counting measure. Then the same functionswork for every , and . Similarly, padding into the l1 sequence space gives common controls and exact preservation of Hamming distance. These claims use unnormalized Hamming distance; replacing it by normalized Hamming distance changes the family of source metrics.
The geometry has a practical origin: Hamming's 1950 paper uses the number of differing positions between binary strings to study error-correcting codes. Changing one binary digit moves to a neighboring corner, so a question about corrupted messages becomes a question about separation in the Hamming cube. [ref]
https://ineffectivetheory.com/edu/papers/hamming-codes-1950.pdf. R. W. Hamming, Error Detecting and Error Correcting Codes, 1950, Section 5
Metric space Created 2026-09-24 Updated 2026-10-14
A metric space is a set together with a metric measuring how far apart its elements are. The elements can be positions, functions, or other objects: what matters is that the metric obeys the same basic rules. This lets one discuss convergence in a metric space, continuous maps, and Cauchy sequences without first assigning Cartesian coordinates. The useful abstraction is that many arguments require only comparisons of distances, rather than the particular objects being compared.
Even the same set can support several informative metrics. On the plane with Cartesian coordinates, write and . Three standard choices are Manhattan distance, Euclidean distance, and Chebyshev distance:They come from the L1 norm, Euclidean norm, and maximum norm, respectively, through . For and , Manhattan distance is , Euclidean distance is , and Chebyshev distance is . All three answers are correct for their respective metrics.
The choice encodes the question being asked. Manhattan distance models travel along a rectangular street grid. Euclidean distance measures unrestricted travel along a line segment. Chebyshev distance measures the time needed when two Cartesian coordinates can change simultaneously, each at speed at most one. Thus choosing a metric is part of modelling, rather than a consequence of knowing the endpoints. These examples have the same metric topology, but different metric path lengths and different collections of metric geodesics.
A historical reference for the general study of metric spaces is Maurice Fréchet's 1906 paper Sur quelques points du calcul fonctionnel, published in volume 22 of the Rendiconti del Circolo Matematico di Palermo. [ref]
https://link.springer.com/article/10.1007/BF03018603. Fréchet, Sur quelques points du calcul fonctionnel, 1906
Triangle inequality Created 2026-09-24 Updated 2026-10-14
A metric satisfies : visiting an intermediate point cannot beat the direct endpoint distance. A norm satisfies the corresponding inequality .
Take , , and . For Euclidean distance, the triangle inequality reads . The direct line segment has metric path length , while the route through has metric path length . For Manhattan distance, the same comparison becomes : both routes are shortest. The line segment and the bent route both become metric geodesics when progress is measured by metric path length. For Chebyshev distance, the direct line segment has metric path length , while the same bent route still costs .
Repeated application of the triangle inequality bounds the endpoint distance by the sum along any finite chain of intermediate points. This explains why metric path length is always at least the distance between endpoints. Equality reveals a shortest route, but its shape and uniqueness depend on the chosen metric.
Word metric balls in the integer lattice 2026-10-14
The additive group gives a useful way to see what a word metric measures. Let and , and choose the four-move generating set of a group . Its Cayley graph is the square lattice. Each move changes exactly one coordinate by one, so the word length is the L1 norm, and the word metric is Manhattan distance:At least this many moves are necessary, and moving horizontally then vertically attains the bound. Bridson gives this square lattice as a basic Cayley graph example.[ref]
Now allow all eight neighbouring lattice points as moves:Each coordinate changes by at most one per move. Use diagonal moves until the smaller displacement is exhausted, then use axis moves: the resulting word length is the maximum norm, and the word metric is Chebyshev distance. From to , an -route has five steps, while the -route has three.
The closed word metric balls consist of lattice points inside a diamond for , and inside an axis-aligned square for . For every nonnegative integer radius ,The diamond has lattice points at word length ; the square has choices for each coordinate. At radius three the counts are and . These are discrete closed balls for Manhattan distance and Chebyshev distance; an Euclidean distance bound would instead select lattice points inside a Euclidean disk.
Radius-three word metric balls in the integer lattice: a diamond with 25 points and a square with 49 points, with routes to
. Details. 


