The Magnitude of Metric Spaces

Tom Leinster

Received: August 15, 2012

Communicated by Stefan Schwede

Abstract. Magnitude is a real-valued invariant of metric spaces, analogous to Euler characteristic of topological spaces and cardinality of sets. The definition of magnitude is a special case of a general categorical definition that clarifies the analogies between cardinalitylike invariants in mathematics. Although this motivation is a world away from geometric measure, magnitude, when applied to subsets of ℝ^{n}, turns out to be intimately related to invariants such as volume, surface area, perimeter and dimension. We describe several aspects of this relationship, providing evidence for a conjecture (first stated in joint work with Willerton) that magnitude encodes all the most important invariants of classical integral geometry.

2010 Mathematics Subject Classification: 51F99 (primary), 18D20, 18F99, 28A75, 49Q20, 52A20, 52A38, 53C65 (secondary). Keywords and Phrases: metric space, magnitude, enriched category, Möbius inversion, Euler characteristic of a category, finite metric space, convex set, integral geometry, valuation, intrinsic volume, fractal dimension, positive definite space, space of negative type.

Contents

Introduction  858
1 Enriched categories  861
1.1 The magnitude of a matrix . . . . . . . . . . . . . . . . . . . . 861
1.2 Background on enriched categories . . . . . . . . . . . . . . . . 863
1.3 The magnitude of an enriched category . . . . . . . . . . . . . 864
1.4 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867

2 Finite metric spaces  869
2.1 The magnitude of a finite metric space . . . . . . . . . . . . . . 869
2.2 Magnitude functions . . . . . . . . . . . . . . . . . . . . . . . . 873
2.3 New spaces from old . . . . . . . . . . . . . . . . . . . . . . . . 876
2.4 Positive definite spaces . . . . . . . . . . . . . . . . . . . . . . . 881
2.5 Subsets of Euclidean space . . . . . . . . . . . . . . . . . . . . . 887
3 Compact metric spaces  889
3.1 The magnitude of a positive definite compact metric space … 889
3.2 Subsets of the real line . . . . . . . . . . . . . . . . . . . . . . . 891
3.3 Background on integral geometry . . . . . . . . . . . . . . . . . 893
3.4 Subsets of ℓ_{1}^{N} . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894
3.5 Subsets of Euclidean space . . . . . . . . . . . . . . . . . . . . . 897
References  901

Introduction

Many mathematical objects carry a canonical notion of size. Sets have cardinality, vector spaces have dimension, topological spaces have Euler characteristic, and probability spaces have entropy. This work adds a new item to the list: metric spaces have magnitude. Already, several cardinality-like invariants are tied together by the notion of the Euler characteristic of a category [21]. This is a rational-valued invariant of finite categories. A network of theorems describes the close relationships between this invariant and established cardinality-like invariants, including the cardinality of sets and of groupoids [1], the Euler characteristic of topological spaces and of posets, and even the Euler characteristic of orbifolds. (That Euler characteristic deserves to be considered an analogue of cardinality was first made clear by Schanuel [41, 42].) These results attest that for categories, Euler characteristic is the fundamental notion of size. Here we go further. Categories are a special case of the more general concept of enriched category. Much of ordinary category theory generalizes to the enriched setting, and this is true, in particular, of the Euler characteristic of categories. Rebaptizing Euler characteristic as ‘magnitude’ to avoid a potential ambiguity later, this gives a canonical definition of the magnitude of an enriched category. Metric spaces, as well as categories, are examples of enriched categories:

(categories) ⊂ (enriched categories) ⊃ (metric spaces)

[19, 20]. The analogy between categories and metric spaces can be understood in broad terms immediately. A category has objects; a metric space has points. For any two objects there is a set (the maps between them); for any two points there is a real number (the distance between them). For any three objects there is an operation of composition; for any three points there is a triangle inequality.

Having generalized the definition of magnitude (or Euler characteristic) from ordinary to enriched categories, we specialize it to metric spaces. This gives our invariant. The fundamental role of the Euler characteristic of categories strongly suggests that the magnitude of metric spaces should play a fundamental role too. Our faith is rewarded by a series of theorems showing that magnitude is intimately related to the classical invariants of integral geometry: dimension, perimeter, surface area, volume, …. This is despite the fact that no concept of measure or integration goes into the definition of magnitude; they arise spontaneously from the general categorical definition. This, then, is part of the appeal of magnitude. It is motivated in abstract terms that seem to have nothing to do with geometry or measure, and defined in the very wide generality of enriched categories—yet when specialized to the context of metric spaces, it turns out to have a great deal to say about geometry and measure. There is a further surprise. While the author’s motivation was categorytheoretic, magnitude had already arisen in work on the quantification of biological diversity. In 1994, Solow and Polasky [44] carried out a probabilistic analysis of the benefits of high biodiversity, and isolated a particular quantity that they called the ‘effective number of species’. It is the same as our magnitude. This is no coincidence: the theoretical problem of how to maximize diversity can be solved using the concept of magnitude and some of the results presented here [23]. Indeed, under suitable circumstances, magnitude can be interpreted as maximum diversity, a cousin to maximum entropy.

Our first step is to define the magnitude of an enriched category (Section 1). This puts the notion of the magnitude of a metric space into a wide mathematical context, showing how analogous theories can be built in parts of mathematics far away from metric geometry. The reader interested only in geometry can, however, avoid these general considerations without logical harm, and begin at Section 2. A topological space is not guaranteed to have a well-defined Euler characteristic unless it satisfies some finiteness condition. Similarly, the magnitude of an enriched category is defined under an assumption of finiteness; specializing to metric spaces, the definition of magnitude is just for finite spaces (Section 2). The magnitude of a finite metric space can be thought of as the ‘effective number of points’. It deserves study partly because of its intrinsic interest, partly because of its applications to the measurement of diversity, and partly because it is used in the theory of magnitude of infinite metric spaces. While categorical arguments do not (yet) furnish a definition of the magnitude of an infinite space, several methods for passing from finite to infinite immediately suggest themselves. Meckes [31] has shown that they are largely equivalent. Using the most elementary such method, coupled with some Fourier analysis, we produce evidence for the following conjectural principle:

magnitude encodes all the most important invariants of integral geometry

(Section 3). The most basic instance of this principle is the fact that a line segment of length t has magnitude 1 + t/2, enabling one to recover length from magnitude. Less basic is the notion of the magnitude dimension of a space A, defined as the growth of the function t ↦ |tA|; here tA is A scaled up by a factor of t, and |tA| is its magnitude. We show, for example, that a subset of ℝ^{N} with nonzero Lebesgue measure has magnitude dimension N. Magnitude dimension also appears to behave sensibly for fractals: for instance, Theorem 11 of [27] implies that the magnitude dimension of the ternary Cantor set is the same as its Hausdorff dimension (namely, log_{3} 2). It seems, moreover, that for any convex subset A of Euclidean space, all of the intrinsic volumes of A can be recovered from the function t ↦ |tA|. This was first conjectured in [27], and appears below as Conjecture 3.5.10. In two dimensions, the conjectured formula is

|tA| = \frac{1}{2π} area(A) · t^{2} + \frac{1}{4} perimeter(A) · t + χ(A).

This resembles the theorem of Willerton [51] that for a compact homogeneous Riemannian 2-manifold A,

|tA| = \frac{1}{2π} area(A) · t^{2} + χ(A) + O(t^{−2})

as t → ∞. This in turn resembles the celebrated tube formula of Weyl. Review sections provide the necessary background on both enriched categories and integral geometry. No expertise in category theory or integral geometry is needed to read this paper.

Related work The basic ideas of this paper were first written up in a 2008 internet posting [22]. Several papers have already built on this. Leinster and Willerton [27] studied the large-scale asymptotics of the magnitude of subsets of Euclidean space, and stated the conjecture just mentioned. The precise form of that conjecture was motivated by numerical evidence and heuristic arguments found by Willerton [50]. Leinster [23] established magnitude as maximum diversity. Meckes [31] proved, inter alia, the equivalence of several definitions of the magnitude of compact metric spaces, and by using more subtle analytical methods than are used here, extended some of the results of Section 3 below. The magnitude of spheres is especially well understood [27, 51, 31]. In the literature on quantifying biodiversity, magnitude appears not only in the paper of Solow and Polasky [44], but also in later papers such as [38]. The approach to biodiversity measurement taken in [26] arose from the theory in the present paper. This relationship is explored further in [23] and Section 2 of [31]. Geometry as the study of metric structures is developed in the books of Blumenthal [4] and Gromov [11], among others; representatives of the theory of finite metric spaces are [4] and papers of Dress and collaborators [2, 6]. We will make contact with the theory of spaces of negative type, which goes back to Menger [32] and Schoenberg [43]. This connection has been exploited by Meckes [31]. It is notable that the complete bipartite graph K_{3,2} appears as a minimal example in both [2] and Example 2.2.7 below.

Notation Given N ∈ ℕ = {0, 1, 2, …}, we write ℝ^{N} for real N-dimensional space as a set, topological space or vector space—but with no implied choice of metric except when N = 1. The metric on a metric space A is denoted by d or d_{A}. We write #X for the cardinality of a finite set X. When 𝒞 is a category, C ∈ 𝒞 means that C is an object of 𝒞.

Acknowledgements I have had countless useful conversations on magnitude with Mark Meckes and Simon Willerton. Their insights have played a very important role, and I thank them for it. I also thank John Baez, Neal Bez, Paul Blackwell, Yemon Choi, Christina Cobbold, David Corfield, Alastair Craw, Jacques Distler, Joe Fu, Anton Geraschenko, Martin Hyland, David Jordan, André Joyal, Joachim Kock, Christian Korff, Urs Schreiber, Josh Shadlen, Ivan Smith, David Speyer, and Terry Tao. Two web resources have been crucial to the progress of this work: The n-Category Café^{1} and MathOverflow.^{2} Parts of this work were carried out at the Centre de Recerca Matemàtica (Barcelona) and the School of Mathematics and Statistics at the University of Sheffield. I thank them for their hospitality. This work was supported by an EPSRC Advanced Research Fellowship.

1 Enriched categories

This section describes the conceptual origins of the notion of magnitude. We define the magnitude of an enriched category, in two steps. First we assign a number to every matrix; then we assign a matrix to every enriched category. We pause in between to recall some basic aspects of enriched category theory: the definitions, and how a metric space can be viewed as an enriched category.

1.1 The magnitude of a matrix

A rig (or semiring) is a ring without negatives: a set k equipped with a commutative monoid structure (+, 0) and a monoid structure (·, 1), the latter distributing over the former. For us, rig will mean commutative rig: one whose multiplication is commutative. It will be convenient to use matrices whose rows and columns are indexed by abstract finite sets. Thus, for finite sets I and J, an I × J matrix over a rig k is a function I × J → k. The usual operations can be performed, e.g. an H × I matrix can be multiplied by an I × J matrix to give an H × J matrix. The identity matrix is the Kronecker δ. An I × J matrix ζ has a J × I transpose ζ^{∗}. Given a finite set I, we write u_{I} ∈ k^{I} for the column vector with u_{I}(i) = 1 for all i ∈ I.

1http://golem.ph.utexas.edu/category

2http://mathoverflow.net

Documenta Mathematica 18 (2013) 857–905

Definition 1.1.1 Let ζ be an I × J matrix over a rig k. A weighting on ζ is a column vector w ∈ k^{J} such that ζw = u_{I}. A coweighting on ζ is a row vector v ∈ k^{I} such that vζ = u_{J}^{∗}.

A matrix may admit zero, one, or many (co)weightings, but their freedom is subject to the following constraint.

Lemma 1.1.2 Let ζ be an I × J matrix over a rig, let w be a weighting on ζ, and let v be a coweighting on ζ. Then

∑_{j∈J} w(j) = ∑_{i∈I} v(i).

Proof ∑_{j} w(j) = u_{J}^{∗}w = vζw = vu_{I} = ∑_{i} v(i). □

We refer to the entries w(j) ∈ k of a weighting w as weights, and similarly coweights. The lemma implies that if a matrix ζ has both a weighting and a coweighting, then the total weight is independent of the weighting chosen. This makes the following definition possible.

Definition 1.1.3 A matrix ζ over a rig k has magnitude if it admits at least one weighting and at least one coweighting. Its magnitude is then

|ζ| = ∑_{j} w(j) = ∑_{i} v(i) ∈ k

for any weighting w and coweighting v on ζ.

We will be concerned with square matrices ζ. If ζ is invertible then there are a unique weighting and a unique coweighting. (Conversely, if k is a field then a unique weighting or coweighting implies invertibility.) The weights are then the sums of the rows of ζ^{−1}, and the coweights are the sums of the columns. Lemma 1.1.2 is obvious in this case, and there is an easy formula for the magnitude:

Lemma 1.1.4 Let ζ be an invertible I × I matrix over a rig. Then ζ has a unique weighting w, given by w(j) = ∑_{i} ζ^{−1}(j, i) (j ∈ I), and a unique coweighting given by the dual formula. Moreover,

|ζ| = ∑_{i,j∈I} ζ^{−1}(j, i).

□

Often our matrix ζ will be symmetric, in which case weightings and coweightings are essentially the same.

1.2 Background on enriched categories

Here we review two standard notions: monoidal category, and category enriched in a monoidal category. A monoidal category is a category 𝒱 equipped with an associative binary operation ⊗ (which is formally a functor 𝒱 ×𝒱 → 𝒱 ) and a unit object 𝟙 ∈ 𝒱 . The associativity and unit axioms are only required to hold up to suitably coherent isomorphism; see [28] for details.

Examples 1.2.1 i. 𝒱 is the category Set of sets, ⊗ is cartesian product ×, and 𝟙 is a one-element set {⋆}.

ii. 𝒱 is the category Vect of vector spaces over some field K, the product ⊗ is the usual tensor product ⊗_{K}, and 𝟙 = K.

iii. A poset can be viewed as a category in which each hom-set has at most one element. In particular, consider the poset ([0, ∞], ≥) of nonnegative reals together with infinity. The objects of the resulting category are the elements of [0, ∞], there is one map x → y when x ≥ y, and there are none otherwise. This is a monoidal category with ⊗ = + and 𝟙 = 0.

iv. Let 2 be the category of Boolean truth values [19]: there are two objects, f (‘false’) and t (‘true’), and a single non-identity map, f → t. Taking ⊗ to be conjunction and 𝟙 = t makes 2 monoidal. Then 2 is a monoidal subcategory of Set, identifying f with ∅ and t with {⋆}. It is also a monoidal subcategory of [0, ∞], identifying f with ∞ and t with 0.

Let 𝒱 = (𝒱 , ⊗, 𝟙) be a monoidal category. The definition of category enriched in 𝒱 , or 𝒱 -category, is obtained from the definition of ordinary category by asking that the hom-sets are no longer sets but objects of 𝒱 . Thus, a (small) 𝒱 - category A consists of a set ob A of objects, an object Hom(a, b) of 𝒱 for each a, b ∈ ob A, and operations of composition and identity satisfying appropriate axioms [16]. The operation of composition consists of a map

Hom(a, b) ⊗ Hom(b, c) → Hom(a, c)

in 𝒱 for each a, b, c ∈ ob A, while the identities are provided by a map 𝟙 → Hom(a, a) for each a ∈ ob A. There is an accompanying notion of enriched functor. Given 𝒱 -categories A and A′, a 𝒱 -functor F: A → A′ consists of a function ob A → ob A′, written a ↦ F (a), together with a map

Hom(a, b) → Hom(F (a), F (b))

in 𝒱 for each a, b ∈ ob A, satisfying suitable axioms [16]. We write 𝒱-Cat for the category of 𝒱 -categories and 𝒱 -functors.

Examples 1.2.2 i. Let 𝒱 = Set. Then 𝒱-Cat is the category Cat of (small) categories and functors. ii. Let 𝒱 = Vect. Then 𝒱-Cat is the category of linear categories or

algebroids: categories equipped with a vector space structure on each hom-set, such that composition is bilinear.

iii. Let 𝒱 = [0, ∞]. Then, as observed by Lawvere [19, 20], a 𝒱 -category is a generalized metric space. That is, a 𝒱 -category consists of a set A of objects or points together with, for each a, b ∈ A, a real number Hom(a, b) = d(a, b) ∈ [0, ∞], satisfying the axioms

d(a, b) + d(b, c) ≥ d(a, c), d(a, a) = 0

(a, b, c ∈ A). Such spaces are more general than classical metric spaces in three ways: ∞ is permitted as a distance, the separation axiom d(a, b) = 0 ⇒ a = b is dropped, and, most significantly, the symmetry axiom d(a, b) = d(b, a) is dropped.

A 𝒱 -functor f: A → A′ between generalized metric spaces A and A′ is a distance-decreasing map: one satisfying d(a, b) ≥ d(f(a), f(b)) for all a, b ∈ A. Hence [0, ∞]-Cat is the category MS of generalized metric spaces and distance-decreasing maps. The isomorphisms in MS are the isometries.

iv. Let 𝒱 = 2. A 𝒱 -category is a set equipped with a preorder (a reflexive transitive relation), which up to equivalence of 𝒱 -categories is the same thing as a poset.

The embedding 2 ↪ Set of monoidal categories induces an embedding 2-Cat ↪ Set-Cat; this is the embedding Poset ↪ Cat of Example 1.2.1(iii). Similarly, the embedding 2 ↪ [0, ∞] induces an embedding Poset ↪ MS: as observed in [19], a poset can be understood as a non-symmetric metric space whose distances are all 0 or ∞.

1.3 The magnitude of an enriched category

Here we meet the definition on which the rest of this work is built. Having already defined the magnitude of a matrix, we now assign a matrix to each enriched category. To do this, we assume some further structure on the base category 𝒱 . In fact, we assume that we have a notion of size for objects of 𝒱 . This, then, will lead to a notion of size for categories enriched in 𝒱 . Let 𝒱 be a monoidal category. We will suppose given a rig k and a monoid homomorphism

| · |: (ob 𝒱 / ≅, ⊗, 𝟙) → (k, ·, 1).

(This is, deliberately, the same symbol as for magnitude; no confusion should arise.) The domain here is the monoid of isomorphism classes of objects of 𝒱 .

Examples 1.3.1 i. When 𝒱 is the monoidal category FinSet of finite sets, we take k = ℚ and |X| = #X. ii. When 𝒱 is the monoidal category FDVect of finite-dimensional vector

spaces, we take k = ℚ and |X| = dim X.

iii. When 𝒱 = [0, ∞], we take k = ℝ and |x| = e^{−x}. (If | · | is to be measurable^{3} then the only possibility is |x| = C^{x} for some constant C ≥ 0.)

iv. When 𝒱 = 2, we take k = ℤ, |f| = 0 and |t| = 1. This is a restriction of the functions | · | of (i) and (iii) along the embeddings 2 ↪ FinSet and 2 ↪ [0, ∞] of Example 1.2.1(iv).

Write 𝒱-cat (with a small ‘c’) for the category whose objects are the 𝒱 - categories with finite object-sets and whose maps are the 𝒱 -functors between them.

Definition 1.3.2 Let A ∈ 𝒱-cat.

i. The similarity matrix of A is the ob A × ob A matrix ζ_{A} over k defined by ζ_{A}(a, b) = |Hom(a, b)| (a, b ∈ A).

ii. A (co)weighting on A is a (co)weighting on ζ_{A}.

iii. A has magnitude if ζ_{A} does; its magnitude is then |A| = |ζ_{A}|.

iv. A has Möbius inversion if ζ_{A} is invertible; its Möbius matrix is then μ_{A} = ζ_{A}^{−1}.

Magnitude is, then, a partially-defined function | · |: 𝒱-cat −−→ k.

Examples 1.3.3 i. When 𝒱 = FinSet, we obtain a notion of the magnitude |A| ∈ ℚ of any (suitable) finite category A. This is also called the Euler characteristic of A and written as χ(A) [21]. There are theorems relating it to the Euler characteristics of topological spaces, of graphs, of posets and of orbifolds, the cardinality of sets, and the order of groups.

Very many finite categories have Möbius inversion, or are equivalent to some category with Möbius inversion; all such categories have Euler characteristic. (This includes all finite posets, groupoids, monoids, categories containing no nontrivial idempotents, and categories admitting an epimono factorization system.) The Möbius matrix μ_{A} is a generalization of Rota’s Möbius function for posets [40], which in turn generalizes the classical Möbius function on integers. For details, see [21], and for further material on Euler characteristic and Möbius inversion for categories, see Berger and Leinster [3], Fiore, Lück and Sauer [7, 8], Jacobsen and Møller [14], Leinster [25], and Noguchi [33, 34, 35, 36]. ii. Similarly, taking 𝒱 = FDVect gives an invariant χ(A) = |A| ∈ ℚ

3I thank Mark Meckes for pointing out that the more obvious hypothesis of continuity can be weakened to measurability [9]. In fact it suffices to assume that | · | is bounded on some set of positive measure [18].

Documenta Mathematica 18 (2013) 857–905

of linear categories A with finitely many objects and finite-dimensional hom-spaces.

iii. Taking 𝒱 = [0, ∞] gives the notion of the magnitude |A| ∈ ℝ of a (generalized) finite metric space A. This is the main subject of this paper.

iv. Taking 𝒱 = 2 gives a notion of the magnitude |A| ∈ ℤ of a finite poset A. Under the name of Euler characteristic, this goes back to Rota [40]; see [46] for a modern account. It is always defined. Indeed, every poset has Möbius inversion, and the Möbius matrix is the Möbius function of Rota mentioned in (i). We have noted that a poset can be viewed as a category, or alternatively as a generalized metric space. The three notions of magnitude are compatible: the magnitude of a poset is the same as that of the corresponding category or generalized metric space.

v. Let 𝒱 be a category of topological spaces in which every object has a well-defined Euler characteristic (e.g. finite CW-complexes). Taking |X| to be the Euler characteristic of a space X, we obtain a notion of the magnitude or Euler characteristic of a topologically-enriched category.

The definition of the magnitude of a 𝒱 -category A is independent of the composition and identities in A, so could equally well be made in the generality of 𝒱 -graphs. (A 𝒱 -graph G is a set ob G of objects together with, for each a, b ∈ ob G, an object Hom(a, b) of 𝒱 .) However, it is not clear that it is fruitful to do so. Two theorems on the magnitude or Euler characteristic of ordinary categories illuminate the general situation. The first, Proposition 2.10 of [21], concerns directed graphs. The Euler characteristic of a category A is not in general equal to the Euler characteristic of its underlying graph U(A). But the functor U has a left adjoint F, assigning to a graph G the category F (G) whose objects are the vertices and whose maps are the paths in G. If G is finite and circuit-free then F (G) is finite, and the theorem is that χ(F (G)) = χ(G). So the Euler characteristics of categories and graphs are closely related, but not in the most obvious way. The second theorem, Proposition 1.5 of [25], concerns the classifying space |NA| of a category A (the geometric realization of its simplicial nerve NA). Under a suitable finiteness condition, the topological space |NA| has a welldefined Euler characteristic, and it is a theorem that χ(|NA|) = χ(A). It follows that if two categories have the same underlying graph but different compositions then their classifying spaces, although not usually homotopy equivalent, have the same Euler characteristic. So if we wish the Euler characteristic of a category to be defined in such a way that it is equal to the Euler characteristic of its classifying space, it is destined to be independent of composition. (At least, this is the case under the finiteness condition concerned. This states that the simplicial nerve of A contains only finitely many nondegenerate simplices, as in Proposition 2.11 of [21]. In a different setting, with a different definition of Euler characteristic, Fiore, Lück and Sauer have found a pair of finite categories whose underlying graphs are the same but whose Euler characteristics are different: see [7], after Theorem 1.14.)

1.4 Properties

Much of ordinary category theory generalizes smoothly to enriched categories. This includes many of the properties of the Euler characteristic of categories [21]. We list some of those properties now, using the symbols 𝒱 , k and | · | as in the previous section. There are notions of adjunction and equivalence between 𝒱 -categories [16], generalizing the case 𝒱 = Set of ordinary categories. We write ≃ for equivalence of 𝒱 -categories.

Proposition 1.4.1 Let A, B ∈ 𝒱-cat.

i. If there exist adjoint 𝒱 -functors A ⇄ B, and A and B have magnitude, then |A| = |B|.

ii. If A ≃ B, and A and B have magnitude, then |A| = |B|.

iii. If A ≃ B and n·1 ∈ k has a multiplicative inverse for all positive integers n, then A has magnitude if and only if B does.

Proof Part (i) has the same proof as Proposition 2.4(a) of [21], and part (ii) follows immediately. Part (iii) has the same proof as Lemma 1.12 of [21]. □

For example, take a generalized metric space A and adjoin a new point at distance zero from some existing point. Then the new space A′ is equivalent to A. By Proposition 1.4.1, if A has magnitude then A′ does too, and |A| = |A′|. On the other hand, the proposition is trivial for classical metric spaces A, B: if there is an adjunction between A and B (and in particular if A ≃ B) then in fact A and B are isometric. So far, we have not used the multiplicativity of the function | · | on objects of 𝒱 . We now show that it implies a multiplicativity property of the function | · | on 𝒱 -categories. Assume that the monoidal category 𝒱 is symmetric, that is, equipped with an isomorphism X ⊗ Y → Y ⊗ X for each pair X, Y of objects, satisfying axioms [28]. There is a product on 𝒱-Cat, also denoted by ⊗, defined as follows. Let A, B ∈ 𝒱-Cat. Then A ⊗ B is the 𝒱 -category whose object-set is ob A × ob B and whose hom-objects are given by

Hom((a, b), (a′, b′)) = Hom(a, a′) ⊗ Hom(b, b′).

Composition is defined with the aid of the symmetry [16]. The unit for this product is the one-object 𝒱 -category I whose single hom-object is 𝟙 ∈ 𝒱 .

Examples 1.4.2 i. When 𝒱 = Set, this is the ordinary product × of categories.

ii. There is a one-parameter family of products on metric spaces. For 1 ≤ p ≤ ∞ and metric spaces A and B, let A ⊗_{p} B be the metric space whose point-set is the product of the point-sets of A and B, and whose distances are given by

d((a, b), (a′, b′)) = \begin{cases}(d(a, a′)^{p} + d(b, b′)^{p})^{1/p} & if p < ∞ \\ max\{d(a, a′), d(b, b′)\} & if p = ∞. \end{cases}

Then the tensor product ⊗ defined above is ⊗_{1}.

Proposition 1.4.3 Let A, B ∈ 𝒱-cat. If A and B have magnitude then so does A ⊗ B, with

|A ⊗ B| = |A||B|.

Furthermore, the unit 𝒱 -category I has magnitude 1.

Proof As for Proposition 2.6 of [21]. □

Magnitude is therefore a partially-defined monoid homomorphism

| · |: (𝒱-cat/ ≃, ⊗, I) −−→ (k, ·, 1).

Under mild assumptions, coproducts of 𝒱 -categories exist and interact well with magnitude. Indeed, assume that 𝒱 has an initial object 0, with X ⊗ 0 ≅ 0 ≅ 0 ⊗ X for all X ∈ 𝒱 . Then for any two 𝒱 -categories A and B, the coproduct A + B in 𝒱-Cat exists. It is constructed by taking the disjoint union of A and B and setting Hom(a, b) = Hom(b, a) = 0 whenever a ∈ A and b ∈ B. There is also an initial 𝒱 -category ∅, with no objects. When 𝒱 = [0, ∞], the coproduct of metric spaces A and B is their distant union, the disjoint union of A and B with d(a, b) = d(b, a) = ∞ whenever a ∈ A and b ∈ B. Assume also that |0| = 0, where the 0 on the left-hand side is the initial object of 𝒱 . This assumption and the previous ones hold in all of our examples.

Proposition 1.4.4 Let A, B ∈ 𝒱-cat. If A and B have magnitude then so does A + B, with

|A + B| = |A| + |B|.

Furthermore, the initial 𝒱 -category ∅ has magnitude 0.

Proof As for Proposition 2.6 of [21]. □

It might seem unsatisfactory that not every 𝒱 -category with finite object-set has magnitude. This can be resolved as follows. Given A ∈ 𝒱-cat, there is an evident notion of (co)weighting on A with values in a prescribed k-algebra. As in Lemma 1.1.2, the total weight is always equal to the total coweight. Let R(A) be the free k-algebra containing a weighting w and a coweighting v for A. Then ∑_{a} w(a) = ∑_{a} v(a) = [A], say. This is always defined, and we may call [A] ∈ R(A) the formal magnitude of A. A homomorphism ϕ from R(A) to another k-algebra S amounts to a weighting and a coweighting for A in S; moreover, ϕ([A]) ∈ S is independent of the homomorphism ϕ chosen. In particular, A has magnitude in the original sense if and only if there exists a k-algebra homomorphism ϕ: R(A) → k. In that case, |A| = ϕ([A]) for any such ϕ. This may lead to a more conceptually satisfactory theory, but at a price: the magnitudes of different categories lie in different rigs, complicating results such as those of the present section. In any case, we say no more about this approach.

2 Finite metric spaces

The definition of the magnitude of a finite metric space is a special case of the definition for enriched categories. Its most basic properties are special cases of general results. But metric spaces have many features not possessed by enriched categories in general. By exploiting them, we uncover a geometrically rich theory. A crucial feature of metric spaces is that they can be rescaled. When handed a space, we gain more information about it by considering the magnitudes of its rescaled brothers and sisters than by taking it in isolation. This information is encapsulated in the so-called magnitude function of the space. For some spaces, the magnitude function exhibits wild behaviour: singularities, negative magnitude, and so on. But for geometrically orthodox spaces such as subsets of Euclidean space, it turns out to be rather tame. This is because they belong to the important class of ‘positive definite’ spaces. Positive definiteness will play a central role when we come to extend the definition of magnitude from finite to infinite spaces. It is explored thoroughly in the paper of Meckes [31], who also describes its relationship with the classical notion of negative type. The term metric space will be used in its standard sense, except that ∞ is permitted as a distance. Many of our theorems do hold for the generalized metric spaces of Example 1.2.2(iii), with the same proofs; but to avoid cluttering the exposition, we leave it to the reader to discern which. Throughout, we use matrices whose rows and columns are indexed by abstract finite sets (as in Section 1.1). The identity matrix is denoted by δ.

2.1 The magnitude of a finite metric space

We begin by restating the definitions from Section 1, without reference to enriched categories. Let A be a finite metric space. Its similarity matrix ζ_{A} ∈ ℝ^{A×A} is defined by ζ_{A}(a, b) = e^{−d(a,b)} (a, b ∈ A). A weighting on A is a function w: A → ℝ such that ∑_{b} ζ_{A}(a, b)w(b) = 1 for all a ∈ A. The space A has magnitude if it admits at least one weighting; its magnitude is then |A| = ∑_{a} w(a) for any weighting w, and is independent of the weighting chosen.

0  ^{1}  ^{2}  ^{3}  ^{4}  ^{5}^{0}^{1}^{2}  d |A|

Figure 1: The magnitude of a two-point space

A finite metric space A has Möbius inversion if ζ_{A} is invertible. Its Möbius matrix is then μ_{A} = ζ_{A}^{−1}. In that case, there is a unique weighting w given by w(a) = ∑_{b} μ(a, b), and |A| = ∑_{a,b} μ_{A}(a, b) (Lemma 1.1.4). A generic real square matrix is invertible, which suggests that most finite metric spaces should have Möbius inversion. Proposition 2.2.6(i) makes this precise. Here are some elementary examples.

Examples 2.1.1 i. The empty space has magnitude 0, and the one-point space has magnitude 1.

ii. Let A be the space consisting of two points distance d apart. Then

ζ_{A} = (\begin{matrix}1 & e^{−d} \\ e^{−d} & 1 \end{matrix}) .

This is invertible, so A has Möbius inversion and its magnitude is the sum of all four entries of μ_{A} = ζ_{A}^{−1}:

|A| = 1 + tanh(d/2)

(Fig. 1). This can be interpreted as follows. When d is small, A closely resembles a 1-point space; correspondingly, the magnitude is little more than 1. As d grows, the points acquire increasingly separate identities and the magnitude increases. In the extreme, when d = ∞, the two points are entirely separate and the magnitude is 2.

iii. A metric space A is discrete [20] if d(a, b) = ∞ for all a ≠ b in A. Let A be a finite discrete space. Then ζ_{A} is the identity matrix δ, each point has weight 1, and |A| = #A.

The definition of the magnitude of a metric space first appeared in a paper of Solow and Polasky [44], although with almost no mathematical development. They called it the ‘effective number of species’, since the points of their spaces represented biological species and the distances represented inter-species differences (e.g. genetic). We can view the magnitude of a metric space as the ‘effective number of points’. Solow and Polasky also considered the magnitude of correlation matrices, making connections with the statistical concept of effective sample size. Three-point spaces have magnitude; the formula follows from the proof of Proposition 2.4.15. Meckes [31, Theorem 3.6] has shown that four-point spaces have magnitude. But spaces with five or more points need not have magnitude (Example 2.2.7). We now describe two classes of space for which the magnitude exists and is given by an explicit formula.

Definition 2.1.2 A finite metric space A is scattered if d(a, b) > log((#A)−1) for all distinct points a and b. (Vacuously, the empty space and one-point space are scattered.)

Proposition 2.1.3 A scattered space has magnitude. Indeed, any scattered space A has Möbius inversion, with Möbius matrix given by the infinite sum

μ_{A}(a, b) = ∑_{k=0}^{∞} ∑_{a=a_{0}≠···≠a_{k}=b}(−1)^{k}ζ_{A}(a_{0}, a_{1}) ⋯ ζ_{A}(a_{k−1}, a_{k}).

The inner sum is over all a_{0}, …, a_{k} ∈ A such that a_{0} = a, a_{k} = b, and a_{j−1} ≠ a_{j} whenever 1 ≤ j ≤ k. That a scattered space has magnitude was also proved in [27, Theorem 2], by a different method that does not produce a formula for the Möbius matrix.

Proof Write n = #A. For a, b ∈ A and k ≥ 0, put

μ_{A,k}(a, b) = ∑_{a=a_{0}≠···≠a_{k}=b} ζ_{A}(a_{0}, a_{1}) ⋯ ζ_{A}(a_{k−1}, a_{k}).

(In particular, μ_{A,0} is the identity matrix.) Write ε = min_{a≠b} d(a, b). Then

μ_{A,k+1}(a, b) = ∑_{b′: b′≠b} ∑_{a=a_{0}≠···≠a_{k}=b′} ζ_{A}(a_{0}, a_{1}) ⋯ ζ_{A}(a_{k−1}, b′)ζ_{A}(b′, b)

≤ ∑_{b′: b′≠b} ∑_{a=a_{0}≠···≠a_{k}=b′} ζ_{A}(a_{0}, a_{1}) ⋯ ζ_{A}(a_{k−1}, b′)e^{−ε}

= e^{−ε} ∑_{b′: b′≠b} μ_{A,k}(a, b′).

The last sum is over (n − 1) terms, so by induction, μ_{A,k}(a, b) ≤ ((n − 1)e^{−ε})^{k} for all a, b ∈ A and k ≥ 0. But A is scattered, so (n − 1)e^{−ε} < 1, so the sum ∑_{k=0}^{∞}(−1)^{k}μ_{A,k}(a, b) converges for all a, b ∈ A. A telescoping sum argument finishes the proof. □

Definition 2.1.4 A metric space is homogeneous if its isometry group acts transitively on points.

t a_{1} a_{2} a_{3}  b_{1} b_{2} b_{3}

Figure 2: tK_{n,n} and its subspace 2tK_{n}, shown for n = 3.

Proposition 2.1.5 (Speyer [45]) Every homogeneous finite metric space has magnitude. Indeed, if A is a homogeneous space with n ≥ 1 points then

|A| = \frac{n^{2}}{∑_{a,b} e^{−d(a,b)}} = \frac{n}{∑_{a} e^{−d(x,a)}}

for any x ∈ A. There is a weighting w on A given by w(a) = |A|/n for all a ∈ A.

Proof By homogeneity, the sum S = ∑_{a} ζ_{A}(x, a) is independent of x ∈ A. Hence there is a weighting w given by w(a) = 1/S for all a ∈ A. □

Example 2.1.6 For any (undirected) graph G and t ∈ (0, ∞], there is a metric space tG whose points are the vertices and whose distances are minimal pathlengths, a single edge having length t. Write K_{n} for the complete graph on n vertices. Then

|tK_{n}| = \frac{n}{1 + (n − 1)e^{−t}} .

In general, e^{−d(a,b)} can be interpreted as the similarity or closeness of the points a, b ∈ A [26, 44]. Proposition 2.1.5 states that the magnitude of a homogeneous space is the reciprocal mean similarity.

Example 2.1.7 A subspace can have greater magnitude than the whole space. Let K_{n,m} be the graph with vertices a_{1}, …, a_{n}, b_{1}, …, b_{m} and one edge between a_{i} and b_{j} for each i and j. If n is large then the mean similarity between two points of tK_{n,n} is approximately \frac{1}{2}(e^{−t} + e^{−2t}) (Fig. 2). On the other hand, tK_{n,n} has a subspace 2tK_{n} = {a_{1}, …, a_{n}} in which the mean similarity is approximately e^{−2t}. Since e^{−t} > e^{−2t}, the mean similarity between points of tK_{n,n} is greater than that of its subspace 2tK_{n}; hence |tK_{n,n}| < |2tK_{n}|. In fact, it can be shown using Proposition 2.1.5 that |tK_{n,n}| < |2tK_{n}| whenever n > e^{t} + 1.

2.2 Magnitude functions

In physical situations, distance depends on the choice of unit of length; making a different choice rescales the metric by a constant factor. In the definition of |x| as e^{−x} (Example 1.3.1(iii)), the constant e^{−1} was chosen without justification; choosing a different constant between 0 and 1 also amounts to rescaling the metric. For both these reasons, every metric space should be seen as a member of the one-parameter family of spaces obtained by rescaling it.

Definition 2.2.1 Let A be a metric space and t ∈ (0, ∞). Then tA denotes the metric space with the same points as A and d_{tA}(a, b) = td_{A}(a, b) (a, b ∈ A).

Most familiar invariants of metric spaces behave in a predictable way when the space is rescaled. This is true, for example, of topological invariants, diameter, and Hausdorff measure of any dimension. But magnitude does not behave predictably under rescaling. Graphing |tA| against t therefore gives more information about A than is given by |A| alone.

Definition 2.2.2 Let A be a finite metric space. The magnitude function of A is the partially-defined function t ↦ |tA|, defined for all t ∈ (0, ∞) such that tA has magnitude.

Examples 2.2.3 i. Let A be the space consisting of two points distance d apart. By Example 2.1.1(ii), the magnitude function of A is defined everywhere and given by t ↦ 1 + tanh(dt/2).

ii. Let A = {a_{1}, …, a_{n}} be a nonempty homogeneous space, and write E_{i} = d(a_{1}, a_{i}). By Proposition 2.1.5, the magnitude function of A is

t ↦ n/∑_{i=1}^{n} e^{−E_{i}t}.

In the terminology of statistical mechanics, the denominator is the partition function for the energies E_{i} at inverse temperature t.^{4}

iii. Let R be a finite commutative ring. For a ∈ R, write

ν(a) = min{k ∈ ℕ : a^{k+1} = 0} ∈ ℕ ∪ {∞}.

There is a metric d on R given by d(a, b) = ν(b − a), and the resulting metric space A_{R} is homogeneous. Write q = e^{−t}, and Nil(R) for the ideal of nilpotent elements. By Proposition 2.1.5, A_{R} has magnitude function

t ↦ |tA_{R}| = #R/ ∑_{a∈Nil(R)} q^{ν(a)} = #R/(1−q) ∑_{k=0}^{∞} #{a ∈ R : a^{k+1} = 0}·q^{k}

where the last expression is an element of the field ℚ((q)) of formal Laurent series.

4I thank Simon Willerton for suggesting that some such relationship should exist.

Documenta Mathematica 18 (2013) 857–905

To establish the basic properties of magnitude functions, we need some auxiliary definitions and a lemma. A vector v ∈ ℝ^{I} is positive if v(i) > 0 for all i ∈ I, and nonnegative if v(i) ≥ 0 for all i ∈ I. Recall the definition of distance-decreasing map from Example 1.2.2(iii).

Definition 2.2.4 A metric space A is an expansion of a metric space B if there exists a distance-decreasing surjection A → B.

Lemma 2.2.5 Let A and B be finite metric spaces, each admitting a nonnegative weighting. If A is an expansion of B then |A| ≥ |B|.

Proof Take a distance-decreasing surjection f: A → B. Choose a right inverse function g: B → A (not necessarily distance-decreasing). Then ζ_{B}(f(a), b) ≥ ζ_{A}(a, g(b)) for all a ∈ A and b ∈ B. Let w_{A} and w_{B} be nonnegative weightings on A and B respectively. Then

|A| = ∑_{a,b} w_{A}(a)ζ_{B}(f(a), b)w_{B}(b) ≥ ∑_{a,b} w_{A}(a)ζ_{A}(a, g(b))w_{B}(b) = |B|,

as required. □

Proposition 2.2.6 Let A be a finite metric space. Then:

i. tA has Möbius inversion (and therefore magnitude) for all but finitely many t > 0.

ii. The magnitude function of A is analytic at all t > 0 such that tA has Möbius inversion.

iii. For t ≫ 0, there is a unique, positive, weighting on tA.

iv. For t ≫ 0, the magnitude function of A is increasing.

v. |tA| → #A as t → ∞.

Proof We use the space ℝ^{A×A} of real A × A matrices, and its open subset GL(A) of invertible matrices. We also use the notions of weighting on, and magnitude of, a matrix (Section 1.1). For ζ ∈ GL(A), the unique weighting w_{ζ} on ζ and the magnitude of ζ are given by

w_{ζ}(a) = ∑_{b∈A} ζ^{−1}(a, b) = ∑_{b∈A}(adj ζ)(a, b)/ det ζ,  |ζ| = ∑_{a∈A} w_{ζ}(a) (1)

(a ∈ A), where adj denotes the adjugate. For (i), first note that ζ_{tA} → δ ∈ GL(A) as t → ∞; hence ζ_{tA} is invertible for t ≫ 0. The matrix ζ_{tA} = (e^{−td(a,b)}) is defined for all t ∈ ℂ, and det ζ_{tA} is analytic in t. But det ζ_{tA} ≠ 0 for real t ≫ 0, so by analyticity, det ζ_{tA} has only finitely many zeros in (0, ∞). Part (ii) follows from equations (1).

0  ^{1}  ^{2}  ^{3}  ^{4}^{log \sqrt{2}}^{−1}^{0}^{1}^{2}^{3}^{4}^{5}^{6}  t |tK_{3,2}|

Figure 3: The magnitude function of the bipartite graph K_{3,2}

For (iii), each of the functions ζ ↦ w_{ζ}(a) (a ∈ A) is continuous on GL(A) by (1). But w_{δ}(a) = 1 for all a ∈ A, so there is a neighbourhood U of δ in GL(A) such that w_{ζ}(a) > 0 for all ζ ∈ U and a ∈ A. Since ζ_{tA} → δ as t → ∞, we have ζ_{tA} ∈ U for all t ≫ 0. Part (iv) follows from part (iii) and Lemma 2.2.5. For (v), lim_{t→∞} |tA| = | lim_{t→∞} ζ_{tA}| = |δ| = #A. □

Part (i) implies that magnitude functions have only finitely many singularities. Proposition 2.4.17 will provide an explicit lower bound for parts (iii) and (iv). Part (v) also appeared as Theorem 3 of [27]. Many natural conjectures about magnitude are disproved by the following example. Later we will see that subspaces of Euclidean space are less prone to surprising behaviour.^{5}

Example 2.2.7 Fig. 3 shows the magnitude function of the space K_{3,2} defined in Example 2.1.7. It is given by

|tK_{3,2}| = \frac{5 − 7e^{−t}}{(1 + e^{−t})(1 − 2e^{−2t})}

(t ≠ log \sqrt{2}); the magnitude of (log \sqrt{2})K_{3,2} is undefined. (One can compute this directly or use Proposition 2.3.13.) Several features of the graph are apparent. At some scales, the magnitude is negative; at others, it is greater than the number of points. There are also intervals on which the magnitude function is strictly decreasing. Furthermore, this example shows that a space with magnitude can have a subspace without magnitude: for (log \sqrt{2})K_{3,2} is a subspace of (log \sqrt{2})K_{3,3}, which, being homogeneous, has magnitude (Proposition 2.1.5).

5‘Our approach to general metric spaces bears the undeniable imprint of early exposure to Euclidean geometry. We just love spaces sharing a common feature with ℝ^{n}.’ (Gromov [11], page xvi.)

Documenta Mathematica 18 (2013) 857–905

(The graph K_{3,2} is also a well-known counterexample in the theory of spaces of negative type [10]. The connection is explained, in broad terms, by the remarks in Section 2.4.)

The first example of a finite metric space with undefined magnitude was found by Tao [48], and had 6 points. The first examples of n-point spaces with magnitude outside the interval [0, n] were found by the author and Simon Willerton, and were again 6-point spaces.

Example 2.2.8 This is an example of a space A for which lim_{t→0} |tA| ≠ 1, due to Willerton (personal communication, 2009). Let A be the graph K_{3,3} (Fig. 2) with three new edges adjoined: one from b_{i} to b_{j} whenever 1 ≤ i < j ≤ 3. Then |tA| = 6/(1 + 4e^{−t}) → 6/5 as t → 0.

2.3 New spaces from old

For each way of constructing a new metric space from old, we can ask: is the magnitude of the new space determined by the magnitudes of the old ones? Here we give a positive answer for four constructions: unions of a particular type, tensor products, fibrations, and constant-distance gluing.

Unions

Let X be a metric space with subspaces A and B. The magnitude of A ∪ B is not in general determined by the magnitudes of A, B and A ∩ B: consider onepoint spaces. In this respect, magnitude of metric spaces is unlike cardinality of sets, for which there is the inclusion-exclusion formula. We do, however, have an inclusion-exclusion formula for magnitude when the union is of a special type.

Definition 2.3.1 Let X be a metric space and A, B ⊆ X. Then A projects to B if for all a ∈ A there exists π(a) ∈ A ∩ B such that for all b ∈ B,

d(a, b) = d(a, π(a)) + d(π(a), b).

In this situation, d(a, π(a)) = inf_{b∈B} d(a, b). If all distances in X are finite then π(a) is unique for a.

Proposition 2.3.2 Let X be a finite metric space and A, B ⊆ X. Suppose that A projects to B and B projects to A. If A, B and A ∩ B have magnitude then so does A ∪ B, with

|A ∪ B| = |A| + |B| − |A ∩ B|.

Indeed, if w_{A}, w_{B} and w_{A∩B} are weightings on A, B and A ∩ B respectively then there is a weighting w on A ∪ B defined by

w(x) = \begin{cases}w_{A}(x) & if x ∈ A \ B \\ w_{B}(x) & if x ∈ B \ A \\ w_{A}(x) + w_{B}(x) − w_{A∩B}(x) & if x ∈ A ∩ B. \end{cases}

Proof Let a ∈ A \ B. Choose a point π(a) as in Definition 2.3.1. Then

∑_{x∈A∪B} ζ(a, x)w(x)

= ∑_{a′∈A} ζ(a, a′)w_{A}(a′) + ∑_{b∈B} ζ(a, b)w_{B}(b) − ∑_{c∈A∩B} ζ(a, c)w_{A∩B}(c)

= 1 + ζ(a, π(a)){∑_{b∈B} ζ(π(a), b)w_{B}(b) − ∑_{c∈A∩B} ζ(π(a), c)w_{A∩B}(c)} = 1.

Similar arguments apply when we start with a point of B \ A or A ∩ B. This proves that w is a weighting, and the result follows. □

It can similarly be shown that if A, B and A ∩ B all have Möbius inversion then so does A ∪ B. The proof is left to the reader; we just need the following special case.

Corollary 2.3.3 Let X be a finite metric space and A, B ⊆ X. Suppose that A ∩ B is a singleton {c}, that for all a ∈ A and b ∈ B,

d(a, b) = d(a, c) + d(c, b),

and that A and B have magnitude. Then A ∪ B has magnitude |A| + |B| − 1. Moreover, if A and B have Möbius inversion then so does A ∪ B, with

μ_{A∪B}(x, y) = \begin{cases}μ_{A}(x, y) & if x, y ∈ A and (x, y) ≠ (c, c) \\ μ_{B}(x, y) & if x, y ∈ B and (x, y) ≠ (c, c) \\ μ_{A}(c, c) + μ_{B}(c, c) − 1 & if (x, y) = (c, c) \\ 0 & otherwise. \end{cases}

Proof The first statement follows from Proposition 2.3.2, and the second is easily checked. □

Corollary 2.3.4 Every finite subspace of ℝ has Möbius inversion. If A = {a_{0} < ⋯ < a_{n}} ⊆ ℝ then, writing d_{i} = a_{i} − a_{i−1},

|A| = 1 + ∑_{i=1}^{n} tanh \frac{d_{i}}{2} .

The weighting w on A is given by

w(a_{i}) = \frac{1}{2} (tanh \frac{d_{i}}{2} + tanh \frac{d_{i+1}}{2} )

(0 ≤ i ≤ n), where by convention d_{0} = d_{n+1} = ∞ and tanh ∞ = 1.

Proof This follows by induction from Example 2.1.1(ii), Proposition 2.3.2 and Corollary 2.3.3. (An alternative proof is given in [27, Theorem 4].) □

Thus, in a finite subspace of ℝ, the weight of a point depends only on the distances to its neighbours. This is reminiscent of the Ising model in statistical mechanics [5], although whether there is a substantial connection remains to be seen.

Example 2.3.5 The magnitude function is not a complete invariant of finite metric spaces. Indeed, let X = {0, 1, 2, 3} ⊆ ℝ. Let Y be the four-vertex Y-shaped graph, viewed as a metric space as in Example 2.1.6. I claim that X and Y have the same magnitude function, even though they are not isometric. For put A = {0, 1, 2} ⊆ ℝ and B = {0, 1} ⊆ ℝ. Both tX and tY can be expressed as unions, satisfying the hypotheses of Corollary 2.3.3, of isometric copies of tA and tB. Hence |tX| = |tA| + |tB| − 1 = |tY | for all t > 0.

Tensor products

Recall from Example 1.4.2(ii) the definition of the tensor product of metric spaces. Proposition 1.4.3 implies (and it is easy to prove directly):

Proposition 2.3.6 If A and B are finite metric spaces with magnitude then A ⊗ B has magnitude, given by |A ⊗ B| = |A||B|. □

Example 2.3.7 Let q be a prime power, and denote by 𝔽_{q} the field of q elements metrized by d(a, b) = 1 whenever a ≠ b. Then for N ∈ ℕ, the metric tensor product 𝔽_{q}^{⊗N} is the set 𝔽_{q}^{N} with the Hamming metric. Its magnitude function is

t ↦ |t𝔽_{q}|^{N} = (\frac{q}{1 + (q − 1)e^{−t}} )^{N}

by Example 2.1.6 and Proposition 2.3.6. More generally, a linear code is a vector subspace C of 𝔽_{q}^{N} [29]. Its (singlevariable) weight enumerator is the polynomial W_{C}(x) = ∑_{i=0}^{N} A_{i}(C)x^{i} ∈ ℤ[x], where A_{i}(C) is the number of elements of C whose Hamming distance from 0 is i. Since C is homogeneous, Proposition 2.1.5 implies that its magnitude function is

t ↦ (#C)/W_{C}(e^{−t}).

The magnitude function of a linear code therefore carries the same, important, information as its weight enumerator.

Similarly, if A and B are finite metric spaces with magnitude then their coproduct or distant union A+B (Section 1.4) has magnitude |A+B| = |A|+|B|.

Fibrations

A fundamental property of the Euler characteristic of topological spaces is its behaviour with respect to fibrations. If a space A is fibred over a connected base B, with fibre F, then under suitable hypotheses, χ(A) = χ(B)χ(F).

A^{B}  ↓^{p}^{•}^{p(a)}  ^{•}^{b′}^{•}^{a}  ^{•} ^{a_{b′}}^{•} ^{a′}

Figure 4: Metric fibration

An analogous formula holds for the Euler characteristic of a fibred category (Proposition 2.8 of [21] and, in a different context, Theorem 7.7 of [7]). Apparently no general notion of fibration of enriched categories has yet been formulated. Nevertheless, we define here a notion of fibration of metric spaces sharing common features with the categorical and topological notions, and we prove an analogous theorem on magnitude.

Definition 2.3.8 Let A and B be metric spaces. A (metric) fibration from A to B is a distance-decreasing map p: A → B with the following property (Fig. 4): for all a ∈ A and b′ ∈ B with d(p(a), b′) < ∞, there exists a_{b′} ∈ p^{−1}(b′) such that for all a′ ∈ p^{−1}(b′),

d(a, a′) = d(p(a), b′) + d(a_{b′}, a′).  (2)

Example 2.3.9 Let C_{t} be the circle of circumference t, metrized nonsymmetrically by taking d(a, b) to be the length of the anticlockwise arc from a to b. (This is a generalized metric space in the sense of Example 1.2.2(iii).) Let k be a positive integer. Then the k-fold covering C_{kt} → C_{t}, locally an isometry, is a fibration.

Lemma 2.3.10 Let p: A → B be a fibration of metric spaces. Let b, b′ ∈ B with d(b, b′) < ∞. Then the fibres p^{−1}(b) and p^{−1}(b′) are isometric.

Proof Equation (2) and finiteness of d(b, b′) imply that a_{b′} is unique for a ∈ p^{−1}(b), so we may define a function γ_{b,b′}: p^{−1}(b) → p^{−1}(b′) by γ_{b,b′}(a) = a_{b′}. It is distance-decreasing: for if a, c ∈ p^{−1}(b) then

d(b, b′) + d(γ_{b,b′}(a), γ_{b,b′}(c)) = d(a, γ_{b,b′}(c))
≤ d(a, c) + d(c, γ_{b,b′}(c)) = d(a, c) + d(b, b′),

giving d(γ_{b,b′}(a), γ_{b,b′}(c)) ≤ d(a, c) by finiteness of d(b, b′). There is a distance-decreasing map γ_{b′,b}: p^{−1}(b′) → p^{−1}(b) defined in the same way. It is readily shown that γ_{b,b′} and γ_{b′,b} are mutually inverse; hence they are isometries. □

Let B be a nonempty metric space all of whose distances are finite, and let p: A → B be a fibration. The fibre of p is any of the spaces p^{−1}(b) (b ∈ B); it is well-defined up to isometry.

Theorem 2.3.11 Let p: A → B be a fibration of finite metric spaces. Suppose that B is nonempty with d(b, b′) < ∞ for all b, b′ ∈ B, and that B and the fibre F of p both have magnitude. Then A has magnitude, given by |A| = |B||F |.

Proof Choose a weighting w_{B} on B. Choose, for each b ∈ B, a weighting w_{b} on the space p^{−1}(b). For a ∈ A, put w_{A}(a) = w_{p(a)}(a)w_{B}(p(a)). It is straightforward to check that w_{A} is a weighting, and the theorem follows. □

Examples 2.3.12 i. A trivial example of a fibration is a productprojection B ⊗ F → B. In that case, Theorem 2.3.11 reduces to Proposition 2.3.6.

ii. Let B be a finite metric space in which the triangle inequality holds strictly for every triple of distinct points. Let F be a finite metric space of small diameter:

diam(F) ≤ min{d(b, b′) + d(b′, b′′) − d(b, b′′) : b, b′, b′′ ∈ B, b ≠ b′ ≠ b′′}.

Choose for each b, b′ ∈ B an isometry γ_{b,b′}: F → F, in such a way that γ_{b,b} is the identity and γ_{b′,b} = γ_{b,b′}^{−1}. Then the set A = B × F can be metrized by putting

d((b, c), (b′, c′)) = d(b, b′) + d(γ_{b,b′}(c), c′)

(b, b′ ∈ B, c, c′ ∈ F). The projection A → B is a fibration (but not a product-projection unless γ_{b′,b′′} ∘ γ_{b,b′} = γ_{b,b′′} for all b, b′, b′′). So if B and F have magnitude, |A| = |B||F |.

Arguments similar to Lemma 2.3.10 show that a fibration over B amounts to a family (A_{b})_{b∈B} of metric spaces together with a distance-decreasing map γ_{b,b′}: A_{b} → A_{b′} for each b, b′ ∈ B such that d(b, b′) < ∞, satisfying the following three conditions. First, γ_{b,b} is the identity for all b ∈ B. Second, γ_{b′,b} = γ_{b,b′}^{−1}. Third,

sup_{a∈A_{b}} d(γ_{b′,b′′}γ_{b,b′}(a), γ_{b,b′′}(a)) ≤ d(b, b′) + d(b′, b′′) − d(b, b′′)

for all b, b′, b′′ ∈ B such that d(b, b′), d(b′, b′′) < ∞.

Constant-distance gluing

Given metric spaces A and B and a real number D ≥ max{diam A, diam B}/2, there is a metric space A +_{D} B defined as follows. As a set, it is the disjoint union of A and B. The metric restricted to A is the original metric on A; similarly for B; and d(a, b) = d(b, a) = D for all a ∈ A and b ∈ B.

Proposition 2.3.13 Let A and B be finite metric spaces, and take D as above. Suppose that A and B have magnitude, with |A||B| ≠ e^{2D}. Then A +_{D} B has magnitude

\frac{|A| + |B| − 2e^{−D}|A||B|}{1 − e^{−2D}|A||B|}.

Proof Given weightings w_{A} on A and w_{B} on B, there is a weighting w on A +_{D} B defined by

w(a) = \frac{1 − e^{−D}|B|}{1 − e^{−2D}|A||B|}w_{A}(a), w(b) = \frac{1 − e^{−D}|A|}{1 − e^{−2D}|A||B|}w_{B}(b)

(a ∈ A, b ∈ B). The result follows. □

This provides an easy way to compute the magnitude functions in Examples 2.2.7 and 2.2.8.

2.4 Positive definite spaces

We saw in Example 2.2.7 that the magnitude of a finite metric space may be undefined, or smaller than the magnitude of one of its subspaces, or even negative. We now introduce a class of spaces for which no such behaviour occurs. Very many spaces of interest—including all subsets of Euclidean space—belong to this class. It has been studied in greater depth by Meckes [31].

Definition 2.4.1 A finite metric space A is positive definite if the matrix ζ_{A} is positive definite.

We emphasize that positive definiteness of a matrix is meant in the strict sense.

Lemma 2.4.2 i. A positive definite space has Möbius inversion.

ii. The tensor product of positive definite spaces is positive definite.

iii. A subspace of a positive definite space is positive definite.

Proof Parts (i) and (iii) are elementary. For (ii), ζ_{A⊗B} is the Kronecker product ζ_{A} ⊗ ζ_{B}, and the Kronecker product of positive definite matrices is positive definite. □

In particular, a positive definite space has magnitude and a unique weighting.

Proposition 2.4.3 Let A be a positive definite finite metric space. Then

|A| = sup_{v≠0} \frac{(∑_{a∈A} v(a))^{2}}{v^{∗}ζ_{A}v}

where the supremum is over v ∈ ℝ^{A} \ {0} and v^{∗} denotes the transpose of v. A vector v attains the supremum if and only if it is a nonzero scalar multiple of the unique weighting on A.

Proof Since ζ_{A} is positive definite, we have the Cauchy–Schwarz inequality:

(v^{∗}ζ_{A}v) · (w^{∗}ζ_{A}w) ≥ (v^{∗}ζ_{A}w)^{2}

for all v, w ∈ ℝ^{A}, with equality if and only if one of v and w is a scalar multiple of the other. Taking w to be the unique weighting on A gives the result. □

Corollary 2.4.4 If A is a positive definite finite metric space and B ⊆ A, then |B| ≤ |A|. □

Corollary 2.4.5 A nonempty positive definite finite metric space has magnitude ≥ 1. □

For any finite metric space A, the set Sing(A) = {t ∈ (0, ∞) : ζ_{tA} is singular} is finite (Proposition 2.2.6(i)). When Sing(A) = ∅, put sup(Sing(A)) = 0.

Proposition 2.4.6 Let A be a finite metric space. Then tA is positive definite for all t > sup(Sing(A)). In particular, tA is positive definite for all t ≫ 0.

Proof Write λ_{min}(ξ) for the minimum eigenvalue of a real symmetric A × A matrix ξ. Then λ_{min}(ξ) is continuous in ξ. Also λ_{min}(ξ) > 0 if and only if ξ is positive definite, and if λ_{min}(ξ) = 0 then ξ is singular. Now ζ_{tA} → δ as t → ∞, and λ_{min}(δ) = 1, so λ_{min}(ζ_{tA}) > 0 for all t ≫ 0. On the other hand, λ_{min}(ζ_{tA}) is continuous and nonzero for t > sup(Sing(A)). Hence λ_{min}(ζ_{tA}) > 0 for all t > sup(Sing(A)). □

It follows that a space with Möbius inversion at all scales also satisfies an apparently stronger condition.

Definition 2.4.7 A finite metric space A is stably positive definite if tA is positive definite for all t > 0.

Corollary 2.4.8 Let A be a finite metric space. Then tA has Möbius inversion for all t > 0 if and only if A is stably positive definite. □

Example 2.4.9 Let A be the space of Example 2.2.8. It is readily shown that tA has a unique weighting for all t > 0. By the remarks after Definition 1.1.3, tA has Möbius inversion for all t > 0, so A is stably positive definite. Hence magnitude is not continuous with respect to the Gromov–Hausdorff metric even when restricted to stably positive definite finite spaces. (Theorem 2.6 of [31] implies that it is, however, lower semicontinuous.)

Meckes [31, Theorem 3.3] has shown that a finite metric space is stably positive definite if and only if it is of negative type. By definition, a finite metric space A is of negative type if ∑_{a,b} v(a)d(a, b)v(b) ≤ 0 for all v ∈ ℝ^{A} such that ∑_{a} v(a) = 0. A general metric space A is of negative type if every finite subspace is of negative type, or equivalently if (A, \sqrt{d_{A}}) embeds isometrically into some Hilbert space [43]. Many of the most commonly encountered spaces are of negative type, including those that we prove below to be stably positive definite; see [31, Theorem 3.6] for a list. But whereas the classical results on negative type typically rely on embedding theorems, we are able to prove our results directly. Lemma 2.2.5 gave additional hypotheses on finite metric spaces A and B guaranteeing that if A is an expansion of B then |A| ≥ |B|. Some additional hypotheses are needed, since not every magnitude function is increasing (Example 2.2.7). The following will also do.

Lemma 2.4.10 Let A and B be finite metric spaces. Suppose that A is positive definite and B admits a nonnegative weighting. If A is an expansion of B then |A| ≥ |B|.

Proof First consider a distance-decreasing bijection f: A → B. Choose a nonnegative weighting w_{B} on B. Without loss of generality, f is the identity as a map of sets; thus, ζ_{A}(a, a′) ≤ ζ_{B}(a, a′) for all points a, a′. Hence

|A| ≥ \frac{(∑ w_{B}(a))^{2}}{w_{B}^{∗}ζ_{A}w_{B}} ≥ \frac{(∑ w_{B}(a))^{2}}{w_{B}^{∗}ζ_{B}w_{B}} = |B|,

by Proposition 2.4.3. Now consider the general case of a distance-decreasing surjection from A to B. We may choose a subspace A′ ⊆ A and a distance-decreasing bijection A′ → B. The space A′ is positive definite, so |A′| ≥ |B| by the previous argument; but also |A| ≥ |A′| by Corollary 2.4.4. □

A positive definite space cannot have negative magnitude, but the following example shows that it can have magnitude greater than the number of points.

Example 2.4.11 Take the space K_{3,2} of Example 2.2.7. It is easily shown that Sing(K_{3,2}) = \{log \sqrt{2}\}. Choose u > log \sqrt{2} such that |uK_{3,2}| > 5 (say, u = 0.35): then A = uK_{3,2} is positive definite by Proposition 2.4.6, and |A| > #A. This example also shows that a positive definite expansion of a positive definite space may have smaller magnitude: for if s > 1 then sA is an expansion of A, but |sA| < |A| (Fig. 3).

A different positivity condition is sometimes useful: the existence of a nonnegative weighting.

Lemma 2.4.12 Let A be a finite metric space admitting a nonnegative weighting. Then 0 ≤ |A| ≤ #A.

Proof Choose a nonnegative weighting w on A. For all a ∈ A we have 0 ≤ w(a) ≤ (ζ_{A}w)(a) = 1, so 0 ≤ w(a) ≤ 1. Summing, 0 ≤ |A| ≤ #A. □

We now list some sufficient conditions for a space to be positive definite, or have a positive weighting, or both.

Proposition 2.4.13 Every finite subspace of ℝ is positive definite with positive weighting.

Proof Let us temporarily say that a finite metric space A is good if it has Möbius inversion and for all v ∈ ℝ^{A},

v^{∗}μ_{A}v ≥ max_{a∈A} v(a)^{2}.

I claim that if A ∪ B is a union of the type in Corollary 2.3.3 and A and B are both good, then A ∪ B is good. Indeed, let v ∈ ℝ^{A∪B}. By Corollary 2.3.3,

v^{∗}μ_{A∪B}v = v|_{A}^{∗}μ_{A}v|_{A} + v|_{B}^{∗}μ_{B}v|_{B} − v(c)^{2}

where v|_{A} is the restriction of v to A. Now let x ∈ A ∪ B. Without loss of generality, x ∈ A. Since A is good, v|_{A}^{∗}μ_{A}v|_{A} ≥ v(x)^{2}. Since B is good, v|_{B}^{∗}μ_{B}v|_{B} ≥ v(c)^{2}. Hence v^{∗}μ_{A∪B}v ≥ v(x)^{2}, proving the claim. Every metric space with 0, 1 or 2 points is good. Every finite subset of ℝ with 3 or more points can be expressed nontrivially as a union of the type in Corollary 2.3.3. It follows by induction that every finite subset of ℝ is good and therefore positive definite. Positivity of the weighting is immediate from Corollary 2.3.4. □

For N ∈ ℕ and 1 ≤ p ≤ ∞, write ℓ_{p}^{N} = ℝ^{⊗_{p}N}, where ⊗_{p} is as defined in Example 1.4.2(ii). Thus, ℓ_{p}^{N} is ℝ^{N} with the metric induced by the p-norm, ∥x∥_{p} = (∑_{r} |x_{r}|^{p})^{1/p}.

Theorem 2.4.14 Every finite subspace of ℓ_{1}^{N} is positive definite.

Proof Let A be a finite subspace of ℓ_{1}^{N}. Write pr_{1}, …, pr_{N}: ℓ_{1}^{N} → ℝ for the projections. Each space pr_{r}A is positive definite by Proposition 2.4.13, so ∏_{r=1}^{N} pr_{r}A ⊆ ℓ_{1}^{N} is positive definite by Lemma 2.4.2(ii), so A is positive definite by Lemma 2.4.2(iii). □

We prove the same result for Euclidean space in the next section. In the category of metric spaces and distance-decreasing maps (Example 1.2.2(iii)), the categorical product × is ⊗_{∞}. The class of positive definite spaces is not closed under ×. For if it were then, by an argument similar to the proof of Theorem 2.4.14, every finite subspace of ℓ_{∞}^{N} would be positive definite. But in fact, every finite metric space embeds isometrically into ℓ_{∞}^{N} for some N ([43], p.535), whereas not every finite metric space is positive definite. Comprehensive results on (non-)preservation of positive definiteness by the products ⊗_{p} have been proved by Meckes [31, Section 3.2].

Proposition 2.4.15 Every space with 3 or fewer points is positive definite with positive weighting.

Proof The proposition is trivial for spaces with 2 or fewer points. Now take a 3-point space A = {a_{1}, a_{2}, a_{3}}, writing Z_{ij} = ζ(a_{i}, a_{j}). We use Sylvester’s criterion: a symmetric real n × n matrix is positive definite if and only if the upper-left m × m submatrix has positive determinant whenever 1 ≤ m ≤ n. This holds for Z when m = 1 or m = 2, and

det Z = (1 − Z_{12})(1 − Z_{23})(1 − Z_{31}) + (1 − Z_{12})(Z_{12} − Z_{13}Z_{32})
+ (1 − Z_{23})(Z_{23} − Z_{21}Z_{13}) + (1 − Z_{31})(Z_{31} − Z_{32}Z_{21})

which is positive by the triangle inequality. The unique weighting is v/ det Z, where

v_{1} = (1 − Z_{12})(1 − Z_{23})(1 − Z_{31}) + (1 − Z_{23})(Z_{23} − Z_{21}Z_{13}) > 0

and similarly v_{2} and v_{3}. □

Meckes [31, Theorem 3.6] has shown that 4-point spaces are also positive definite. By Example 2.2.7, his result is optimal.

Example 2.4.16 The weighting on a 4-point space may have negative components, as may the weighting on a finite subspace of ℓ_{1}^{N}. Indeed, using Proposition 2.3.2 one can show that in the space {(0, 0), (t, 0), (0, t), (−t, 0)} ⊆ ℓ_{1}^{2}, the weight at (0, 0) is negative whenever t < log 2.

Every finite metric space, when scaled up sufficiently, becomes positive definite with positive weighting (Propositions 2.2.6 and 2.4.6). The following result provides an alternative, quantitative proof, using the notion of scattered space (Definition 2.1.2).

Proposition 2.4.17 Every scattered space is positive definite with positive weighting.

Proof Let A be a scattered space with n ≥ 2 points. Positive definiteness follows from a version of the Levy–Desplanques theorem (Theorem 6.1.10 of [13]), but since the argument is simple, we repeat it here. Let v ∈ ℝ^{A}. Then

v^{∗}ζ_{A}v = ∑_{a} v(a)^{2} + ∑_{a≠b} v(a)ζ_{A}(a, b)v(b) ≥ ∑_{a} v(a)^{2} − \frac{1}{n − 1} ∑_{a≠b} |v(a)||v(b)|

= \frac{1}{2(n − 1)} ∑_{a≠b}(|v(a)| − |v(b)|)^{2} ≥ 0.

The inequality ζ_{A}(a, b) < 1/(n−1) (a ≠ b) is strict, so if v^{∗}ζ_{A}v = 0 then v = 0. To show that the unique weighting w_{A} on A is positive, we use the proof of Proposition 2.1.3. There we showed that A has Möbius inversion and that the Möbius matrix is a sum μ_{A} = ∑_{k=0}^{∞}(−1)^{k}μ_{A,k}, where the matrices μ_{A,k} satisfy

μ_{A,k+1}(a, b) < \frac{1}{n − 1} ∑_{b′: b′≠b} μ_{A,k}(a, b′)  (3)

for all a, b. Hence w_{A} = ∑_{k=0}^{∞}(−1)^{k}w_{A,k}, where w_{A,k}(a) = ∑_{b} μ_{A,k}(a, b). Summing (3) over all b ∈ A gives

w_{A,k+1}(a) < \frac{1}{n − 1} ∑_{b,b′: b′≠b} μ_{A,k}(a, b′) = w_{A,k}(a)

(a ∈ A). Hence w_{A}(a) = ∑_{k=0}^{∞}(−1)^{k}w_{A,k}(a) > 0 for all a ∈ A. □

A metric space A is ultrametric if max{d(a, b), d(b, c)} ≥ d(a, c) for all a, b, c ∈ A.

Proposition 2.4.18 Every finite ultrametric space is positive definite with positive weighting.

Positive definiteness was proved by Varga and Nabben [49], and positivity of the weighting (rather indirectly) by Pavoine, Ollier and Pontier [38]. Another proof of positive definiteness is given by Meckes [31, Theorem 3.6]. Both parts of the following proof are different from those cited.

Proof Let Ω be the set of symmetric matrices Z over [0, ∞) such that Z_{ik} ≥ min{Z_{ij}, Z_{jk}} for all i, j, k and Z_{ii} > max_{j≠k} Z_{jk} for all i. (For a 1 × 1 matrix, this maximum is to be interpreted as 0.) We show by induction that every matrix in Ω is positive definite and that its unique weighting (Definition 1.1.1) is positive. The proposition will follow immediately. The result is trivial for 0 × 0 and 1 × 1 matrices. Now let Z ∈ Ω be an n × n matrix with n ≥ 2. Put z = min_{i,j} Z_{ij}. There is an equivalence relation ∼ on {1, …, n} defined by i ∼ j if and only if Z_{ij} > z. It is not the case that i ∼ j for all i, j. Hence we may partition {1, …, n} into two nonempty subsets that are each a union of equivalence classes: say {1, …, m} and {m + 1, … n}. We have Z_{ij} = z whenever i ≤ m < j, so Z is a block sum

Z = (\begin{matrix}Z′ & zU_{m}^{n−m} \\ zU_{n−m}^{m} & Z′′ \end{matrix})

where U_{k}^{ℓ} denotes the k × ℓ matrix all of whose entries are 1. Since Z′ ∈ Ω and Z′_{ij} = Z_{ij} ≥ z for all i, j ≤ m, we have Y′ = Z′ − zU_{m}^{m} ∈ Ω. Similarly, Y′′ = Z′′ − zU_{n−m}^{n−m} ∈ Ω, and

Z = zU_{n}^{n} + (\begin{matrix}Y′ & 0 \\ 0 & Y′′ \end{matrix}) .

The first summand is positive semidefinite. By inductive hypothesis, Y′ and Y′′ are positive definite, so the second summand is positive definite. Hence Z is positive definite. Also by inductive hypothesis, Y′ and Y′′ have positive weightings v′ and v′′ respectively. Let v be the concatenation of v′ and v′′. It is straightforward to verify that

\frac{v}{z(|Y′| + |Y′′|) + 1}

Documenta Mathematica 18 (2013) 857–905

is a weighting on Z, and it is positive since v′ and v′′ are positive and z, |Y′|, |Y′′| ≥ 0. □

Corollary 2.4.19 If A is a finite ultrametric space then |A| ≤ e^{diam A}.

Proof Let Δ be the metric space with the same point-set as A and d(a, b) = diam A for all distinct points a, b. By Proposition 2.1.5, |Δ| ≤ e^{diam A} and Δ has a positive weighting. But Δ is an expansion of A, so |A| ≤ |Δ| by Lemma 2.2.5. □

A homogeneous space always has a positive weighting, by Proposition 2.1.5. However, Example 2.1.7 and Corollary 2.4.4 together show that a homogeneous space need not be positive definite. A homogeneous space need not even have Möbius inversion: (log 2)K_{3,3} is an example. In particular, a finite metric space may have magnitude but not Möbius inversion. Magnitude can be understood in terms of entropy or diversity. For every finite metric space A and q ∈ [0, ∞], there is a function ^{q}D^{A} assigning to each probability distribution p on A a real number ^{q}D^{A}(p), the diversity of order q of the distribution [26]. An ecological community can be modelled as a finite metric space A (as explained in Section 2.1) together with a probability distribution p on A (representing the relative abundances of the species). Then ^{q}D^{A}(p) is a measure of the biodiversity of the community. In the special case that A is discrete, the diversities are the exponentials of the Rényi entropies [39], and in particular, the diversity of order 1 is the exponential of the Shannon entropy. It is a theorem [23] that for each finite metric space A, there is some probability distribution p maximizing ^{q}D^{A}(p) for all q ∈ [0, ∞] simultaneously. Moreover, the maximal value of ^{q}D^{A}(p) is independent of q; call it D_{max}(A). If A is positive definite with nonnegative weighting then, in fact, |A| = D_{max}(A): magnitude is maximum diversity.

2.5 Subsets of Euclidean space

Here we show that every finite subspace of Euclidean space ℓ_{2}^{N} is positive definite. In particular, every such space has well-defined magnitude. Write L_{1}(ℝ^{N}) for the space of Lebesgue-integrable complex-valued functions on ℝ^{N}. Define the Fourier transform f̂ of f ∈ L_{1}(ℝ^{N}) by

f̂(ξ) = ∫_{ℝ^{N}} e^{−2πi⟨ξ,x⟩}f(x) dx

(ξ ∈ ℝ^{N}). Define functions g and ψ on ℝ^{N} by

g(x) = e^{−∥x∥_{2}}, ψ(ξ) = C_{N}/(1 + 4π^{2}∥ξ∥_{2}^{2})^{(N+1)/2}

where C_{N} is the constant 2^{N}π^{(N−1)/2}Γ((N + 1)/2) > 0.

Lemma 2.5.1 ψ ∈ L_{1}(ℝ^{N}) and ψ̂ = g.

Proof The first statement is straightforward. Theorem 1.14 of [47] states that ĝ = ψ; but g is continuous and even, so the second statement follows by Fourier inversion. □

The next lemma is elementary and standard (e.g. [15], Theorem VI.2.8).

Lemma 2.5.2 Let ϕ ∈ L_{1}(ℝ^{N}), let A be a finite subset of ℝ^{N}, and let v ∈ ℝ^{A}. Then

∑_{a,b∈A} v(a)ϕ̂(a − b)v(b) = ∫_{ℝ^{N}} |∑_{a∈A} v(a)e^{−2πi⟨ξ,a⟩}|^{2}ϕ(ξ) dξ.

□

In analytic language, our task is to show that the function g is strictly positive definite. This would follow from the easy half of Bochner’s theorem [15], except that Bochner’s theorem concerns non-strict positive definiteness. We therefore need to refine the argument slightly.

Theorem 2.5.3 Every finite subspace of Euclidean space is positive definite.

Proof Let A be a finite subspace of ℓ_{2}^{N}. Let v ∈ ℝ^{A}. Then

v^{∗}ζ_{A}v = ∑_{a,b∈A} v(a)g(a − b)v(b) = ∫_{ℝ^{N}} |∑_{a∈A} v(a)e^{−2πi⟨ξ,a⟩}|^{2}ψ(ξ) dξ ≥ 0

by Lemmas 2.5.1 and 2.5.2. Suppose that v ≠ 0. The characters e^{−2πi⟨·,a⟩} (a ∈ A) are linearly independent, so the squared term is positive (that is, strictly positive) for some ξ ∈ ℝ^{N}. By continuity, the squared term is positive for all ξ in some nonempty open subset of ℝ^{N}. Moreover, ψ is continuous and everywhere positive. So the integral is positive, as required. □

On the other hand, some of the weights on a finite subspace of Euclidean space can be negative; see Willerton [50] for examples.

Corollary 2.5.4 Every finite subspace of Euclidean space has magnitude. □

A similar argument gives an alternative proof of Theorem 2.4.14, that finite subspaces of ℓ_{1}^{N} are positive definite. For this we use the explicit formula for the Fourier transform of x ↦ e^{−∥x∥_{1}}. For p ≠ 1, 2 there is no known formula for the Fourier transform of e^{−∥x∥_{p}}, so matters become more difficult. Nevertheless, Meckes [31, Section 3] has shown that every finite subspace of ℓ_{p}^{N} is positive definite whenever 0 < p ≤ 2, and that this is false for p > 2.

3 Compact metric spaces

To extend the notion of magnitude from finite to infinite spaces, there are broadly speaking two strategies. In the first, we approximate an infinite space by finite spaces. As an initial attempt, given a compact metric space A, we might take a sequence (A_{k}) of finite metric spaces converging to A in the Gromov–Hausdorff metric, and try to define |A| as the limit of the sequence (|A_{k}|). However, this ‘definition’ is inconsistent; recall Example 2.2.8. We might respond by constraining the sequence (A_{k}): for example, by taking (A_{k}) to be a sequence of subsets of A converging to A in the Hausdorff metric. The second strategy is to work directly with the infinite space, replacing finite sums by integrals. Weightings are now measures, or perhaps distributions. For example, a weight measure on a metric space A is a finite signed Borel measure w such that ∫_{A} e^{−d(a,b)}dw(b) = 1 for all a ∈ A. If A admits a weight measure w then an argument similar to Lemma 1.1.2 shows that w(A) is independent of the choice of w, and we may define the magnitude of A to be w(A). This was the definition used by Willerton in [51]. Meckes [31] has shown that to a large extent, these different approaches produce the same result. Here we implement the first strategy, defining the magnitude of a space to be the supremum of the magnitudes of its finite subspaces. This works well when the space is compact and its finite subspaces are positive definite.

3.1 The magnitude of a positive definite compact metric space

Definition 3.1.1 A metric space is positive definite if every finite subspace is positive definite. The magnitude of a compact positive definite space A is

|A| = sup{|B| : B is a finite subspace of A} ∈ [0, ∞].

These definitions are consistent with the definitions for finite metric spaces, by Lemma 2.4.2(iii) and Corollary 2.4.4. There may even be non-compact spaces for which this definition of magnitude is sensible. For example, let t > 0, and let A be a space with infinitely many points and d(a, b) = t for all a ≠ b; then every finite subspace of A is positive definite, and the supremum of their magnitudes is e^{t} < ∞. In any case, we confine ourselves to compact spaces. A metric space A is stably positive definite if tA is positive definite for all t > 0, or equivalently if every finite subspace of A is stably positive definite. (A further equivalent condition, due to Meckes, is that A is of negative type [31, Theorem 3.3].) We already know that ℓ_{1}^{N} and ℓ_{2}^{N} are stably positive definite; much of the rest of this paper concerns the magnitudes of their compact subspaces. Ultrametric spaces are also stably positive definite (Proposition 2.4.18), and, if compact, have finite magnitude (Corollary 2.4.19). Many other commonly occurring spaces, such as hyperbolic space, are stably positive definite too; see [31, Theorem 3.6].

Definition 3.1.2 Let A be a stably positive definite compact metric space. The magnitude function of A is the function

\begin{matrix}(0, ∞) & → & [0, ∞] \\ t & ↦ & |tA|. \end{matrix}

Lemma 3.1.3 Let A be a positive definite compact metric space. Then:

i. Every closed subspace B of A is positive definite, and |B| ≤ |A|.

ii. If A is nonempty then |A| ≥ 1. □

Proposition 3.1.4 Let A and B be positive definite compact spaces. Then A ⊗ B is positive definite and compact, and |A ⊗ B| = |A||B|.

In the case A = ∅ and |B| = ∞, we interpret 0 · ∞ as 0.

Proof Let C be a finite subspace of A ⊗ B. Then C ⊆ A′ ⊗ B′ for some finite subspaces A′ ⊆ A and B′ ⊆ B. Since A and B are positive definite, so are A′ and B′. By Lemma 2.4.2, A′ ⊗ B′ is positive definite, so C is positive definite. Hence A ⊗ B is positive definite. A similar argument shows that |A ⊗ B| = |A||B|, using Proposition 2.3.6 and Corollary 2.4.4. □

Similarly, Proposition 2.3.2 on unions extends to the compact setting.

Proposition 3.1.5 Let X be a metric space and A, B ⊆ X, with A and B compact and A ∪ B positive definite. Suppose that A projects to B and B projects to A. Then

|A ∪ B| + |A ∩ B| = |A| + |B|.

Proof Let ε > 0. Choose finite sets E ⊆ A ∪ B and H ⊆ A ∩ B such that |A ∪ B| ≤ |E| + ε and |A ∩ B| ≤ |H| + ε. For each a ∈ E ∩ A, choose π_{A}(a) ∈ A ∩ B satisfying the condition of Definition 2.3.1, and similarly π_{B}(b) for b ∈ E ∩ B. Put

H′ = H ∪ π_{A}(E ∩ A) ∪ π_{B}(E ∩ B), F = (E ∩ A) ∪ H′, G = (E ∩ B) ∪ H′.

Then F and G are finite subsets of X, each projecting to the other. Also E ⊆ F ∪ G and H ⊆ F ∩ G. Applying Proposition 2.3.2 to F and G gives |A ∪ B| + |A ∩ B| ≤ |A| + |B| + 2ε. Since ε was arbitrary, |A ∪ B| + |A ∩ B| ≤ |A| + |B|. For the opposite inequality, again let ε > 0, and choose finite sets F ⊆ A and G ⊆ B such that |A| ≤ |F | + ε and |B| ≤ |G| + ε. For each a ∈ F, choose π_{A}(a) ∈ A ∩ B satisfying the condition of Definition 2.3.1, and similarly π_{B}(b) for b ∈ G. Put

F′ = F ∪ π_{A}F ∪ π_{B}G, G′ = G ∪ π_{A}F ∪ π_{B}G.

Then F′ and G′ are finite subsets of X, each projecting to the other; also F ⊆ F′ ⊆ A and G ⊆ G′ ⊆ B. A similar argument proves that |A| + |B| ≤ |A ∪ B| + |A ∩ B| + 2ε. □

3.2 Subsets of the real line

As soon as we ask about the magnitude of real intervals, connections with geometric measure begin to appear.

Proposition 3.2.1 Let t ≥ 0 and let (A_{k}) be a sequence of finite subsets of ℝ converging to [0, t] in the Hausdorff metric. Then (|A_{k}|) converges to 1 + t/2.

This result was announced in [22], and also appears, with a different proof, as Proposition 6 of [27].

Proof Given A = {a_{0} < ⋯ < a_{n}} ⊆ ℝ, we have

(1 + t/2) − |A| = ∑_{i=1}^{n}\{\frac{a_{i} − a_{i−1}}{2} − tanh(\frac{a_{i} − a_{i−1}}{2} )\} + \frac{t − (a_{n} − a_{0})}{2}

by Corollary 2.3.4. The result will follow from the facts that tanh(0) = 0 and tanh′(0) = 1. Indeed, write f(x) = (x−tanh(x))/x, so that f(x) → 0 as x → 0. Then

|(1 + t/2) − |A|| ≤ (\frac{a_{n} − a_{0}}{2} ) max_{1≤i≤n}|f(\frac{a_{i} − a_{i−1}}{2} )| + |\frac{t − (a_{n} − a_{0})}{2}|.

But max_{i}(a_{i}−a_{i−1}) → 0 and a_{n}−a_{0} → t as A → [0, t], proving the proposition.

□

Theorem 3.2.2 The magnitude of a closed interval [0, t] is 1 + t/2.

Proof Proposition 3.2.1 immediately implies that |[0, t]| ≥ 1+t/2. Now let A be a finite subset of [0, t]. We may choose a sequence (A_{k}) of finite subsets of ℝ such that lim_{k→∞} A_{k} = [0, t] and A ⊆ A_{k} for all k. Then |A| ≤ |A_{k}| → 1 + t/2 as k → ∞, so |A| ≤ 1 + t/2. □

Schanuel [41] argued from basic geometric intuition that the ‘size’ of a closed interval of length t inches ought to be (t inches + 1). Ignoring the factor of 1/2 (which is purely a product of convention), Theorem 3.2.2 makes his idea rigorous. As noted by Willerton [51], there is a weight measure on [0, t]. It is w = (δ_{0} + λ + δ_{t})/2, where δ_{x} is the Dirac measure at x and λ is Lebesgue measure on [0, t]. Then w([0, t]) = 1 + t/2. Hence w([0, t]) = |[0, t]|, as guaranteed by Theorems 2.3 and 2.4 of Meckes [31]. The magnitude of subsets of ℝ is also described by the following formula, which has no known analogue in higher dimensions.

Proposition 3.2.3 Let A be a compact subspace of ℝ. Then

|A| = \frac{1}{2} ∫_{ℝ} sech^{2} d(x, A) dx

where d(x, A) = inf_{a∈A} d(x, a).

Proof First we prove the identity for finite spaces A ⊆ ℝ, by induction on n = #A. It is elementary when n ≤ 2. Now suppose that n ≥ 3, writing the points of A as a_{1} < ⋯ < a_{n}. Put B = {a_{1}, …, a_{n−1}} and C = {a_{n−1}, a_{n}}. Then

\frac{1}{2} ∫_{ℝ} sech^{2} d(x, A) dx = \frac{1}{2} ∫_{−∞}^{a_{n−1}} sech^{2} d(x, B) dx + \frac{1}{2} ∫_{a_{n−1}}^{∞} sech^{2} d(x, C) dx.

Since ∫_{0}^{∞} sech^{2} u du = 1, this in turn is equal to

\frac{1}{2}(∫_{ℝ} sech^{2} d(x, B) dx − 1) + \frac{1}{2}(∫_{ℝ} sech^{2} d(x, C) dx − 1)

which by inductive hypothesis is |B| + |C| − 1. On the other hand, |A| = |B| + |C| − 1 by Corollary 2.3.3. This completes the induction. Now take a compact space A ⊆ ℝ. We know that

|A| = sup\{\frac{1}{2} ∫_{ℝ} sech^{2} d(x, B) dx : B is a finite subset of A\}.

Since sech^{2} is decreasing on [0, ∞), this implies that

|A| ≤ \frac{1}{2} ∫_{ℝ} sech^{2} d(x, A) dx.

To prove the opposite inequality, choose a sequence (B_{k}) of finite subsets of A converging to A in the Hausdorff metric. We have 0 ≤ sech^{2} d(x, B_{k}) ≤ sech^{2} d(x, A) for all x and k, so

lim_{k→∞} ∫_{ℝ} sech^{2} d(x, B_{k}) dx = ∫_{ℝ} sech^{2} d(x, A) dx

by the dominated convergence theorem. The result follows. □

3.3 Background on integral geometry

To go further, we need some concepts and results from integral geometry. Those concerning ℓ_{2}^{N} can be found in standard texts such as [17]. Those concerning ℓ_{1}^{N} can be found in [24]. Write 𝒦_{N} for the set of compact convex subsets of ℝ^{N}. A valuation on 𝒦_{N} is a function ϕ: 𝒦_{N} → ℝ such that

ϕ(∅) = 0,  ϕ(A ∪ B) = ϕ(A) + ϕ(B) − ϕ(A ∩ B)  (4)

whenever A, B, A ∪ B ∈ 𝒦_{N}. It is continuous if continuous with respect to the Hausdorff metric on 𝒦_{N}, and invariant if ϕ(gA) = ϕ(A) for all A ∈ 𝒦_{N} and isometries g: ℓ_{2}^{N} → ℓ_{2}^{N} (not necessarily fixing the origin).

Examples 3.3.1 i. N-dimensional Lebesgue measure is a continuous invariant valuation on 𝒦_{N}, denoted by Vol.

ii. Euler characteristic χ is a continuous invariant valuation on 𝒦_{N}. Since the sets are convex, χ(A) is 0 or 1 according as A is empty or not.

The continuous invariant valuations on 𝒦_{N} form a real vector space, Val_{N}. When A ⊆ ℓ_{p}^{N} and t > 0, the abstract metric space tA can be interpreted as the subspace {ta : a ∈ A} of ℓ_{p}^{N}. A valuation ϕ is homogeneous of degree i if ϕ(tA) = t^{i}ϕ(A) for all A ∈ 𝒦_{N} and t > 0.

Theorem 3.3.2 (Hadwiger [12]) The vector space Val_{N} has dimension N + 1 and a basis V_{0}, …, V_{N} where V_{i} is homogeneous of degree i. □

This description determines the valuations V_{i} uniquely up to scale factor. They can be uniquely normalized to satisfy two conditions. First, V_{N}(A) = Vol(A) for A ∈ 𝒦_{N}. Second, whenever ℓ_{2}^{N} is embedded isometrically into ℓ_{2}^{N+1} and 0 ≤ i ≤ N, the value V_{i}(A) is the same whether A is regarded as a subset of ℓ_{2}^{N} or of ℓ_{2}^{N+1}. With this normalization, V_{i} is called the ith intrinsic volume. For example, V_{0} = χ. When A ∈ 𝒦_{2}, V_{1}(A) is half of the perimeter of A; when A ∈ 𝒦_{3}, V_{2}(A) is half of the surface area. Here is a general formula for the intrinsic volumes. For each 0 ≤ i ≤ N, there is an O(N)-invariant measure ν_{N,i} on the Grassmannian Gr_{N,i}, unique up to scale factor. Given P ∈ Gr_{N,i}, write π_{P} : ℝ^{N} → P for orthogonal projection. Then for A ∈ 𝒦_{N},

V_{i}(A) = c_{N,i} ∫_{Gr_{N,i}} Vol(π_{P} A) dν_{N,i}(P)

where c_{N,i} is a positive constant chosen so that the normalizing conditions are satisfied. Hadwiger’s theorem solves the classification problem for valuations on ℓ_{2}^{N}. More generally, we can try to classify the valuations on any metric space, in the following sense.

A metric space A is geodesic [37] if for all a, b ∈ A there exists an isometry γ: [0, d(a, b)] → A with γ(0) = a and γ(d(a, b)) = b. Given a metric space X, write 𝒦 (X) for the set of compact subsets of X that are geodesic with respect to the subspace metric. For example, 𝒦 (ℓ_{2}^{N}) = 𝒦_{N}. A valuation on 𝒦 (X) is a function ϕ: 𝒦 (X) → ℝ satisfying equations (4) whenever A, B, A ∪ B, A ∩ B ∈ 𝒦 (X). It is continuous if continuous with respect to the Hausdorff metric, and invariant if ϕ(gA) = ϕ(A) for all isometries g of X. Write Val(X) for the vector space of continuous invariant valuations on 𝒦 (X). For example, Val(ℓ_{2}^{N}) = Val_{N}. Given any metric space X, one can attempt to describe the vector space Val(X). Here we will need to know the answer for ℓ_{1}^{N}, as well as ℓ_{2}^{N}. To state it, we write 𝒦′_{N} = 𝒦 (ℓ_{1}^{N}) and call its elements compact ℓ_{1}-convex sets; similarly, we write Val′_{N} = Val(ℓ_{1}^{N}). There are far more ℓ_{1}-convex sets than convex sets. On the other hand, there are far fewer isometries of ℓ_{1}^{N} than of ℓ_{2}^{N}; they are generated by translations, coordinate permutations, and reflections in coordinate hyperplanes. The following Hadwiger-type theorem is proved in [24].

Theorem 3.3.3 The vector space Val′_{N} has dimension N + 1 and a basis V′_{0}, …, V′_{N} where V′_{i} is homogeneous of degree i. □

Again, this determines the valuations V′_{i} uniquely up to scaling. They can be described as follows. For 0 ≤ i ≤ N, let Gr′_{N,i} be the set of i-dimensional vector subspaces of ℝ^{N} spanned by some subset of the standard basis. For A ∈ 𝒦′_{N}, put

V′_{i}(A) = ∑_{P ∈Gr′_{N,i}} Vol(π_{P} A).

These valuations V′_{0}, …, V′_{N} are called the ℓ_{1}-intrinsic volumes, and satisfy two normalization conditions analogous to those in the Euclidean case. The intrinsic volumes of a product space are given by the following formula, proved in [24, Proposition 8.1] and precisely analogous to the classical Euclidean formula [17, Theorem 9.7.1].

Proposition 3.3.4 Let A ∈ 𝒦′_{M} and B ∈ 𝒦′_{N}. Then A × B ∈ 𝒦′_{M+N}, and

V′_{k}(A × B) = ∑_{i+j=k} V′_{i}(A)V′_{j}(B)

whenever 0 ≤ k ≤ M + N. □

3.4 Subsets of ℓ_{1}^{N}

Our investigation of the magnitude of subsets of ℓ_{1}^{N} begins with sets of a particularly amenable type.

Definition 3.4.1 A cuboid in ℓ_{1}^{N} is a subspace of the form [x_{1}, y_{1}] × ⋯ × [x_{N}, y_{N}], where x_{r}, y_{r} ∈ ℝ with x_{r} ≤ y_{r}.

As an abstract metric space, a cuboid is a tensor product [x_{1}, y_{1}]⊗⋯⊗[x_{N}, y_{N}].

Theorem 3.4.2 For cuboids A ⊆ ℓ_{1}^{N},

|A| = ∑_{i=0}^{N} 2^{−i}V′_{i}(A).  (5)

Proof First let I = [x, y] ⊆ ℝ be a nonempty interval. By Theorem 3.2.2,

|I| = 1 + (y − x)/2 = χ(I) + Vol(I)/2 = V′_{0}(I) + 2^{−1}V′_{1}(I).

This proves the theorem for N = 1. The theorem also holds for N = 0. It now suffices to show that if A ∈ 𝒦′_{M} and B ∈ 𝒦′_{N} satisfy (5) then so does A × B ∈ 𝒦′_{M+N}. Indeed, as a metric space, A × B ⊆ ℓ_{1}^{M+N} is A ⊗ B, and the result follows from Propositions 3.1.4 and 3.3.4. □

In fact, V′_{i}(∏[x_{r}, y_{r}]) is the ith elementary symmetric polynomial in (y_{r} − x_{r})_{r=1}^{N}, again by Proposition 3.3.4. It is also equal to V_{i}(∏[x_{r}, y_{r}]), the Euclidean intrinsic volume. But in general, the Euclidean and ℓ_{1}-intrinsic volumes of a convex set are not equal.

Corollary 3.4.3 The magnitude function of a cuboid A ⊆ ℓ_{1}^{N} is given by

|tA| = ∑_{i=0}^{N} 2^{−i}V′_{i}(A)t^{i}.

In particular, the magnitude function of a cuboid A is a polynomial whose degree is the dimension of A, and whose coefficients are proportional to the ℓ_{1}-intrinsic volumes of A. □

The moral is that for spaces belonging to this small class, the dimension and all of the ℓ_{1}-intrinsic volumes can be recovered from the magnitude function. In this sense, magnitude encodes those invariants. For the rest of this work we advance the conjectural principle—first set out in [27]—that the same is true for a much larger class of spaces, in both ℓ_{1}^{N} and ℓ_{2}^{N}. We begin by showing that the principle holds for subspaces of ℓ_{1}^{N} when the invariant concerned is dimension.

Definition 3.4.4 The growth of a function f: (0, ∞) → ℝ is

inf{ν ∈ ℝ : f(t)/t^{ν} is bounded for t ≫ 0} ∈ [−∞, ∞].

For example, the growth of a polynomial is its degree.

Definition 3.4.5 The (magnitude) dimension dim A of a stably positive definite compact metric space A is the growth of its magnitude function.

Examples 3.4.6 i. The magnitude dimension of a cuboid in ℓ_{1}^{N} is its dimension in the usual sense, by Corollary 3.4.3.

ii. The magnitude dimension of a nonempty finite space is 0, by Proposition 2.2.6(v).

Lemma 3.4.7 Let A be a stably positive definite compact space. Then:

i. Every closed subspace B ⊆ A satisfies dim B ≤ dim A.

ii. If A ≠ ∅ then dim A ≥ 0.

Proof For (i), we have 0 ≤ |tB| ≤ |tA| for all t > 0, so dim B ≤ dim A. For (ii), take B to be a one-point subspace of A. □

Recall that the magnitude of a positive definite compact space can in principle be infinite (although there are no known examples).

Theorem 3.4.8 Let A be a compact subset of ℓ_{1}^{N}. Then:

i. |A| < ∞.

ii. dim A ≤ N, with equality if A has nonempty interior.

We will show in Theorem 3.5.8 that the hypothesis ‘nonempty interior’ can be relaxed to ‘nonzero measure’.

Proof A is a subset of some cuboid B ⊆ ℓ_{1}^{N}, which has finite magnitude by Theorem 3.4.2, so |A| ≤ |B| < ∞. Also dim A ≤ dim B ≤ N by Lemma 3.4.7 and Example 3.4.6(i). If A has nonempty interior then it contains an Ndimensional cuboid, giving dim A ≥ N. □

We now ask whether the ℓ_{1}-intrinsic volumes of an ℓ_{1}-convex set can be extracted from its magnitude function. Let 𝒞_{N} be the smallest class of compact subsets of ℓ_{1}^{N} containing all cuboids and closed under unions of the type in Proposition 3.1.5. By that proposition and Theorem 3.4.2, equation (5) holds for all A ∈ 𝒞_{N}.

Example 3.4.9 Let T be a solid, compact triangle in ℓ_{1}^{2} with two edges parallel to the coordinate axes. We compute |T | by exhaustion. For each k ≥ 1, let I_{k} be the union of k rectangles approximating T from the inside as in Fig. 5; similarly, let E_{k} be the exterior approximation by k rectangles. Then T, I_{k}

T  I10  E10

Figure 5: Triangle T ⊆ ℓ_{1}^{2}, with interior and exterior approximations I_{10}, E_{10}

and E_{k} are all ℓ_{1}-convex with I_{k}, E_{k} ∈ 𝒞_{2}, and lim_{k→∞} I_{k} = T = lim_{k→∞} E_{k}, so

lim_{k→∞} |I_{k}| = lim_{k→∞} ∑_{i=0}^{2} 2^{−i}V′_{i}(I_{k}) = ∑_{i=0}^{2} 2^{−i}V′_{i}(T)

= lim_{k→∞} ∑_{i=0}^{2} 2^{−i}V′_{i}(E_{k}) = lim_{k→∞} |E_{k}|

(using continuity of V′_{i} in the second and third equalities). But |I_{k}| ≤ |T | ≤ |E_{k}| for all k, so |T | = ∑_{i=0}^{2} 2^{−i}V′_{i}(T). Similar arguments prove this identity for all compact convex polygons in ℓ_{1}^{2}.

These and other examples suggest the following conjecture.

Conjecture 3.4.10 Let A be a compact ℓ_{1}-convex subspace of ℓ_{1}^{N}. Then

|A| = ∑_{i=0}^{N} 2^{−i}V′_{i}(A).

If the conjecture holds then |tA| = ∑_{i=0}^{N} 2^{−i}V′_{i}(A)t^{i} for all t > 0 and A ∈ 𝒦′_{N}. Hence we can recover all of the ℓ_{1}-intrinsic volumes of an ℓ_{1}-convex set from its magnitude function.

3.5 Subsets of Euclidean space

We now prove results for ℓ_{2}^{N} similar to some of those for ℓ_{1}^{N}. Our first task is to prove that the magnitude of a compact subset of Euclidean space is finite. Given A ⊆ ℝ^{N}, write

𝒮 (A) = {Schwartz functions ϕ: ℝ^{N} → ℝ such that ϕ̂(a − b) = 1
for all a, b ∈ A}.

Lemma 3.5.1 Let A ⊆ ℝ^{N} be a bounded set. Then 𝒮 (A) ≠ ∅.

898 Tom Leinster Proof Since A is bounded, there is a real even Schwartz function f such that f(a − b) = 1 for all a, b ∈ A; then there is a unique real Schwartz function ϕ such that ϕ̂ = f. □ The rest of the proof uses the function ψ from Section 2.5. For a Schwartz function ϕ on ℝ^{N}, write

c(ϕ) = sup_{ξ∈ℝ^{N}} |ϕ(ξ)/ψ(ξ)| < ∞.

Lemma 3.5.2 Let A be a compact subspace of ℓ_{2}^{N} and ϕ ∈ 𝒮 (A). Then |A| ≤ c(ϕ). Proof Let B be a finite subset of A; thus, B is positive definite by Theorem 2.5.3. Then for all v ∈ ℝ^{B}, using Lemma 2.5.2 twice,

c(ϕ) · v^{∗}ζ_{B}v = c(ϕ) ∫_{ℝ^{N}} |∑_{a∈B} v(a)e^{−2πi⟨ξ,a⟩}|^{2}ψ(ξ) dξ

≥ ∫_{ℝ^{N}} |∑_{a∈B} v(a)e^{−2πi⟨ξ,a⟩}|^{2}ϕ(ξ) dξ

= ∑_{a,b∈B} v(a)ϕ̂(a − b)v(b) = (∑_{a∈B} v(a))^{2}.

Taking v to be the unique weighting on B gives c(ϕ) ≥ |B|. □ Proposition 3.5.3 The magnitude of a compact subspace of ℓ_{2}^{N} is finite. □ We can extract more from the argument. For a compact set A ⊆ ℝ^{N}, write

⟨A⟩ = inf{c(ϕ) : ϕ ∈ 𝒮 (A)} < ∞.

Lemma 3.5.2 states that |A| ≤ ⟨A⟩. Lemma 3.5.4 Let A be a compact subset of ℝ^{N} and t ≥ 1. Then ⟨tA⟩ ≤ t^{N}⟨A⟩. Proof Let ϕ ∈ 𝒮 (A). Define θ: ℝ^{N} → ℝ by θ(ξ) = t^{N}ϕ(tξ). Then θ is Schwartz, and if a, b ∈ tA then θ̂(a − b) = ϕ̂((a − b)/t) = 1. Hence θ ∈ 𝒮 (tA). I now claim that c(θ) ≤ t^{N}c(ϕ). Indeed, using the fact that ψ(ξ) ≥ ψ(tξ) for all ξ ∈ ℝ^{N},

c(θ) = t^{N} sup_{ξ∈ℝ^{N}} |\frac{ϕ(tξ)}{ψ(ξ)}| ≤ t^{N} sup_{ξ∈ℝ^{N}} |\frac{ϕ(tξ)}{ψ(tξ)}| = t^{N}c(ϕ).

This proves the claim, and the result follows. □ Theorem 3.5.5 A compact subspace of ℓ_{2}^{N} has dimension at most N.

Documenta Mathematica 18 (2013) 857–905

Proof For compact A ⊆ ℓ_{2}^{N} and t ≥ 1, we have |tA| ≤ ⟨tA⟩ ≤ t^{N}⟨A⟩; hence dim A ≤ N. □

The same proof can be adapted to ℓ_{1}^{N}, although we already have a much more elementary proof (Theorem 3.4.8). Having bounded magnitude from above, we now bound it from below.

Theorem 3.5.6 Let ∥ · ∥ be a norm on ℝ^{N} whose induced metric is positive definite. Write B = {x ∈ ℝ^{N} : ∥x∥ ≤ 1}. For a compact set A ⊆ ℝ^{N}, equipped with the subspace metric,

|A| ≥ \frac{Vol(A)}{N! Vol(B)}.

Before proving this, we state some consequences. Write ω_{N} for the volume of the unit Euclidean N-ball.

Corollary 3.5.7 Let A be a compact subset of ℝ^{N}.

i. If A is given the subspace metric from ℓ_{2}^{N} then |A| ≥ Vol(A)/N!ω_{N}.

ii. If A is given the subspace metric from ℓ_{1}^{N} then |A| ≥ Vol(A)/2^{N}.

Proof Part (i) is immediate. Part (ii) follows from the fact that the unit ball in ℓ_{1}^{N} has volume 2^{N}/N!, or can be derived from Lemma 3.5.9 below. □

Theorem 3.5.8 Let p ∈ {1, 2} and let A be a compact subspace of ℓ_{p}^{N}. Then dim A ≤ N, with equality if A has nonzero Lebesgue measure.

Proof The inequality follows from Theorems 3.4.8 and 3.5.5. Now suppose that Vol(A) > 0. By Corollary 3.5.7, there is a constant K_{A} > 0 such that |tA| ≥ K_{A}t^{N} for all t > 0, giving dim A ≥ N. □

Generalizations of these theorems have been proved by Meckes, using more sophisticated methods ([31], Theorems 4.4 and 4.5). In particular, Theorem 3.5.8 is extended to ℓ_{p}^{N} for all p ∈ [1, 2]. To prove Theorem 3.5.6, we first need a standard calculation.

Lemma 3.5.9 Let ∥ · ∥ be a norm on ℝ^{N}. Write B for the unit ball. Then

∫_{ℝ^{N}} e^{−∥x∥} dx = N! Vol(B).

Proof ∫_{ℝ^{N}} e^{−∥x∥} dx = ∫_{r=0}^{∞} e^{−r} d(Vol(rB)) = ∫_{0}^{∞} e^{−r}Nr^{N−1} Vol(B) dr =

N! Vol(B). □

Proof of Theorem 3.5.6 We use the result of Meckes [31, Theorem 2.4] that for a compact positive definite space A and a finite Borel measure v on A,

|A| ≥ v(A)^{2}/∫_{A} ∫_{A} e^{−d(a,b)} dv(a) dv(b).

Let A ⊆ ℝ^{N} be a compact set and take v to be Lebesgue measure: then

|A| ≥ \frac{Vol(A)^{2}}{∫_{A} ∫_{A} e^{−∥a−b∥} da db} ≥ \frac{Vol(A)^{2}}{∫_{A} ∫_{ℝ^{N}} e^{−∥a−b∥} da db}

= \frac{Vol(A)^{2}}{∫_{A} ∫_{ℝ^{N}} e^{−∥x∥} dx db} = \frac{Vol(A)}{∫_{ℝ^{N}} e^{−∥x∥} dx}.

The theorem follows from Lemma 3.5.9. □

This proof is a rigorous rendition of part of Willerton’s bulk approximation argument [50]. There is an alternative proof in the same spirit, not depending on the results of Meckes but instead working with finite approximations. We sketch it now.

Alternative proof of Theorem 3.5.6 For δ > 0, write

S_{δ} = {x ∈ δℤ^{N} : A ∩ ∏_{r=1}^{N}[x_{r}, x_{r} + δ) ≠ ∅}.

Define α: δℤ^{N} → ℝ^{N} by choosing for each x ∈ S_{δ} an element α(x) ∈ A ∩ ∏[x_{r}, x_{r} + δ), and putting α(x) = x for x ∈ δℤ^{n} \ S_{δ}. A calculation similar to that in the first proof of Theorem 3.5.6 shows that for all δ > 0,

|A| ≥ \frac{#S_{δ}}{∑_{x∈δℤ^{N}} E_{δ}(x)}

where

E_{δ}(x) = \frac{1}{#S_{δ}} ∑_{y∈S_{δ}} e^{−∥α(x+y)−α(y)∥} (≈ e^{−∥x∥}).

(Apply Proposition 2.4.3 to the finite space αS_{δ}.) Since Lebesgue measure is outer regular, lim_{δ→0}(δ^{N}(#S_{δ})) = Vol(A). From the fact that ∥α(x) − x∥ ≤ diam([0, δ)^{N}) for all δ > 0 and x ∈ δℤ^{N}, it also follows that

lim_{δ→0}(δ^{N} ∑_{x∈δℤ^{N}} E_{δ}(x)) = ∫_{ℝ^{N}} e^{−∥x∥} dx.

The theorem now follows from Lemma 3.5.9. □

These results suggest the following conjecture, first stated in [27]:

Conjecture 3.5.10 Let A be a compact convex subspace of ℓ_{2}^{N}. Then

|A| = ∑_{i=0}^{N} \frac{1}{i!ω_{i}} V_{i}(A).

Assuming the conjecture, the magnitude function of a compact convex set A ⊆ ℓ_{2}^{N} is a polynomial:

|tA| = ∑_{i=0}^{N} \frac{1}{i!ω_{i}} V_{i}(A)t^{i}.  (6)

All of the intrinsic volumes, as well as the dimension, can therefore be recovered from the magnitude function. The evidence for Conjecture 3.5.10 is as follows.

• The two sides of equation (6) have the same growth (by Theorem 3.5.8).

• The left-hand side of (6) is greater than or equal to the leading term of the right-hand side (by Corollary 3.5.7).

• Both sides of (6) are monotone increasing in A (by Lemma 3.1.3).

• The conjecture holds for N = 1 (by Theorem 3.2.2).

• It is closely analogous to Conjecture 3.4.10, which, while itself a conjecture, is known to hold for a nontrivial class of examples. (To see the analogy, note that in both cases the ith coefficient is 1/i! Vol(B_{i}), where B_{i} is the i-dimensional unit ball.)

• There is good numerical evidence, due to Willerton [50], when A is a disk, square or cube.

One strategy for proving Conjecture 3.5.10 would be to apply Hadwiger’s theorem (3.3.2). There are currently two obstacles. First, it is not known that magnitude is a valuation on compact convex sets. Certainly it is not a valuation on all compact subsets of ℓ_{2}^{N}: consider the union of two points. Second, even if we knew that magnitude was a valuation on convex sets, the conjecture would still not be proved. We would know that magnitude was an invariant valuation, monotone and therefore continuous by Theorem 8 of McMullen [30]. By Hadwiger’s theorem, there would be constants c_{i} such that |A| = ∑ c_{i}V_{i}(A) for all convex sets A. However, current techniques provide no way of computing those constants. Knowing the magnitude of balls or cubes would be enough; but apart from subsets of the line, there is not a single convex subset of Euclidean space whose magnitude is known.

References

[1] J. Baez and J. Dolan. From finite sets to Feynman diagrams. In Mathematics Unlimited—2001 and Beyond. Springer, Berlin, 2001.

[2] H.-J. Bandelt and A. W. M. Dress. A canonical decomposition theory for metrics on a finite set. Advances in Mathematics, 92:47–105, 1992.

[3] C. Berger and T. Leinster. The Euler characteristic of a category as the sum of a divergent series. Homology, Homotopy and Applications, 10:41– 51, 2008.

[4] L. M. Blumenthal. Theory and Applications of Distance Geometry. Chelsea, New York, 2nd edition, 1970.

[5] P. Di Francesco, P. Mathieu, and D. Sénéchal. Conformal Field Theory. Graduate Texts in Contemporary Physics. Springer, Berlin, 1997.

[6] A. Dress, K. T. Huber, and V. Moulton. Metric spaces in pure and applied mathematics. Documenta Mathematica, Quadratic Forms LSU:121–139, 2001.

[7] T. M. Fiore, W. Lück, and R. Sauer. Euler characteristics of categories and homotopy colimits. Documenta Mathematica, 16:301–354, 2011.

[8] T. M. Fiore, W. Lück, and R. Sauer. Finiteness obstructions and Euler characteristics of categories. Advances in Mathematics, 226:2371–2469, 2011.

[9] M. Fréchet. Pri la funkcia ekvacio f(x+y) = f(x)+f(y). L’Enseignement Mathématique, 15:390–393, 1913.

[10] R. L. Graham and P. M. Winkler. On isometric embeddings of graphs. Transactions of the American Mathematical Society, 288:527–536, 1985.

[11] M. Gromov. Metric Structures for Riemannian and Non-Riemannian Spaces. Birkhäuser, Boston, 2001.

[12] H. Hadwiger. Vorlesungen über Inhalt, Oberfläche und Isoperimetrie. Springer, Berlin, 1957.

[13] R. A. Horn and C. R. Johnson. Matrix Analysis. Cambridge University Press, Cambridge, 1985.

[14] M. W. Jacobsen and J. Møller. Euler characteristics and Möbius algebras of p-subgroup categories. Journal of Pure and Applied Algebra, 216:2665– 2696, 2012.

[15] Y. Katznelson. An Introduction to Harmonic Analysis. Cambridge University Press, Cambridge, 3rd edition, 2004.

[16] G. M. Kelly. Basic Concepts of Enriched Category Theory, volume 64 of London Mathematical Society Lecture Note Series. Cambridge University Press, Cambridge, 1982. Also Reprints in Theory and Applications of Categories 10 (2005), 1–136.

[17] D. A. Klain and G.-C. Rota. Introduction to Geometric Probability. Lezioni Lincee. Cambridge University Press, Cambridge, 1997.

[18] M. Kormes. On the functional equation f(x + y) = f(x) + f(y). Bulletin of the American Mathematical Society, 32:689–693, 1926.

[19] F. W. Lawvere. Metric spaces, generalized logic and closed categories. Rendiconti del Seminario Matematico e Fisico di Milano, XLIII:135–166, 1973. Also Reprints in Theory and Applications of Categories 1:1–37, 2002.

[20] F. W. Lawvere. Taking categories seriously. Revista Colombiana de Matemáticas, XX:147–178, 1986. Also Reprints in Theory and Applications of Categories 8:1–24, 2005.

[21] T. Leinster. The Euler characteristic of a category. Documenta Mathematica, 13:21–49, 2008.

[22] T. Leinster.  Metric spaces.  Post at The n-Category Café,

http://golem.ph.utexas.edu/category/2008/02/metric spaces.html, 2008.

[23] T. Leinster. A maximum entropy theorem with applications to the measurement of biodiversity. arXiv:0910.0906, 2009.

[24] T. Leinster. Integral geometry for the 1-norm. Advances in Applied Mathematics, 49:81–96, 2012.

[25] T. Leinster. Notions of Möbius inversion. Bulletin of the Belgian Mathematical Society, 19:911–935, 2012.

[26] T. Leinster and C. A. Cobbold. Measuring diversity: the importance of species similarity. Ecology, 93:477–489, 2012.

[27] T. Leinster and S. Willerton. On the asymptotic magnitude of subsets of Euclidean space. Geometriae Dedicata, 164:287–310, 2013.

[28] S. Mac Lane. Categories for the Working Mathematician. Graduate Texts in Mathematics 5. Springer, Berlin, 1971.

[29] F. J. MacWilliams and N. J. A. Sloane. The Theory of Error-Correcting Codes. North-Holland, Amsterdam, 1977.

[30] P. McMullen. Valuations and Euler-type relations on certain classes of convex polytopes. Proceedings of the London Mathematical Society, 35:113– 135, 1977.

[31] M. W. Meckes. Positive definite metric spaces. Positivity, in press, 2013.

[32] K. Menger. Die Metrik des Hilbertschen Raumes. Anzeiger der Akademie der Wissenschaften in Wien, mathematisch-naturwissenschaftliche Klasse, 65:159–160, 1928.

[33] K. Noguchi. The Euler characteristic of acyclic categories. Kyushu Journal of Mathematics, 65:85–99, 2011.

[34] K. Noguchi. The zeta function of a finite category and the series Euler characteristic. arXiv:1207.6750, 2012.

[35] K. Noguchi. The zeta function of a finite category which has Möbius inversion. arXiv:1205.4380, 2012.

[36] K. Noguchi. Euler characteristics of categories and barycentric subdivision. Münster Journal of Mathematics, in press, 2013.

[37] A. Papadopoulos. Metric Spaces, Convexity, and Nonpositive Curvature. European Mathematical Society, Zürich, 2005.

[38] S. Pavoine, S. Ollier, and D. Pontier. Measuring diversity from dissimilarities with Rao’s quadratic entropy: Are any dissimilarities suitable? Theoretical Population Biology, 67:231–239, 2005.

[39] A. Rényi. On measures of entropy and information. In J. Neymann, editor, 4th Berkeley Symposium on Mathematical Statistics and Probability, volume 1, pages 547–561. University of California Press, 1961.

[40] G.-C. Rota. On the foundations of combinatorial theory I: theory of Möbius functions. Z. Wahrscheinlichkeitstheorie und Verw. Gebiete, 2:340–368, 1964.

[41] S. H. Schanuel. What is the length of a potato? An introduction to geometric measure theory. In Categories in Continuum Physics, Lecture Notes in Mathematics 1174. Springer, Berlin, 1986.

[42] S. H. Schanuel. Negative sets have Euler characteristic and dimension. In Category Theory (Como, 1990), Lecture Notes in Mathematics 1488, pages 379–385. Springer, Berlin, 1991.

[43] I. J. Schoenberg. Metric spaces and positive definite functions. Transactions of the American Mathematical Society, 44:522–536, 1938.

[44] A. R. Solow and S. Polasky. Measuring biological diversity. Environmental and Ecological Statistics, 1:95–107, 1994.

[45] D. Speyer. Re: Metric spaces. Comment at [22], 2008.

[46] R. P. Stanley. Enumerative Combinatorics Volume 1. Cambridge Studies in Advanced Mathematics 49. Cambridge University Press, Cambridge, 1997.

[47] E. M. Stein and G. Weiss. Introduction to Fourier Analysis on Euclidean Spaces. Princeton Mathematical Series 32. Princeton University Press, Princeton, N.J., 1971.

[48] T. Tao. Re: Metric spaces. Comments at [22], 2008.

[49] R. S. Varga and R. Nabben. On symmetric ultrametric matrices. In L. Reichel, A. Ruttan, and R. S. Varga, editors, Numerical Linear Algebra, pages 193–199. Walter de Gruyter, 1993.

[50] S. Willerton. Heuristic and computer calculations for the magnitude of metric spaces. arXiv:0910.5500, 2009.

[51] S. Willerton. On the magnitude of spheres, surfaces and other homogeneous spaces. Geometriae Dedicata, in press, 2013.

Tom Leinster School of Mathematics University of Edinburgh The King’s Buildings Mayfield Road Edinburgh EH9 3JZ United Kingdom 906

Documenta Mathematica 18 (2013)