### A Scale-Dependent Notion of Dimension for Metric Spaces (Part 1)

#### Posted by Simon Willerton

Consider the following shape that we are zooming into and out of. What dimension would you say it was?

At small scales (or when it is very far away) it appears as a point, so seems zero-dimensional. At bigger scales it appears to be a line, so seems one-dimensional. At even bigger scales it appears to have breadth as well as length, so seems two-dimensional. Then, finally, at very large scales it appears to be made from many widely separated points, so seems zero-dimensional again.

We arrive at an important observation:

The perceived dimension varies with the scale at which the shape is viewed.

Here is a graph of my attempt to capture this perceived notion of dimension mathematically.

Hopefully you can see that, moving from the left, you start off at zero, then move into a region where the function takes value around one, then briefly moves up to two then drops down to zero again.

The ‘shape’ that we are zooming into above is actually a grid of $3000\times 16$ points as that’s all my computer could handle easily in making the above picture. If I’d had a much bigger computer and used say $10^{7}\times 10^{2}$ points then I would have got something that more obviously had both a one-dimensional and two-dimensional regime.

In this post I want to explain how this idea of dimension comes about. It relies on a notion of ‘size’ of metric spaces, for instance, you could use Tom’s notion of magnitude, but the above picture uses my notion of $2$-spread.

I have mentioned this idea before at the Café in the post on my spread paper, but I wanted to expand on it somewhat.

## What do we mean by dimension?

First we should try to understand how we think of dimension. We are used to thinking of it in terms of ‘degrees of freedom’, or the number of different directions you can go in, so a line is one dimensional and a square is two dimensional. This will always give us an integer dimension.

It was realised that there were spaces that could be given meaningful non-integer dimensions by using a different approach to what dimension is. Let’s follow one train of thought. If we think about the square and the line again, we can see that they have different scaling properties. If we scale up a line by a factor of two, then we can fit exactly two copies of the original line in. If we scale up a square by a factor of two then we can fit four copies of the original square in.

More generally if we scale up the line by a factor of $n$ then we can fit $n=n^{1}$ copies of the original line in and if we similarly scale up the square by a factor of $n$ we can fit $n^{2}$ copies of the original square. The indices $1$ and $2$ coincide with the dimensions of the spaces.

Let’s take that as the basis of a different notion of dimension and see what happens when we scale up some fractally shapes.

## A first attempt at defining dimension

Let’s take a not well defined notion of **scale dimension** to be the following. Say that the scale dimension is $D$ if when we scale up by a factor of $n$ (for suitable $n$) we get $n^{D}$ copies of our original space back.

We see that the Koch curve is scaled by a factor of $3$ we can fit four copies of the original in, or more generally when scaled by a factor of $n=3^{k}$ we can fit $4^{k}=(3^{\log _{3}(4)})^{k}= n^{\log _{3}(4)}$ copies in. So this says that the scale dimension is $\log _{3}(4)$.

Similarly for the Cantor set. If you scale it by a factor of three you can fit two copies of the original in, more generally if we scale it by a factor of $n=3^{k}$ we can fit $2^{k}=(3^{\log _{3}(2)})^{k}= n^{\log _{3}(2)}$ copies in. So this says that the scale dimension is $\log _{3}(2)$.

The above idea, although appealing, has several flaws. One flaw is that it is not clear what is meant by having $n$-copies of our original shape: for instance, when we scale up the square and decompose into smaller squares the boundaries overlap, so we get a bit less than four copies. Another flaw is that the above idea only works for certain special shapes: for instance, if we scale up a disk by a factor of two we don’t get a shape we can decompose into four of our original shapes. Indeed, there is no $n\gt 1$ such that when we scale up a disk by a factor of $n$ we get a shape that can be decomposed into $n^{2}$ copies of our original disk.

## A second attempt

We could address these two flaws by observing that when we scale up a plane shape such as a square or a disk by a factor of two we get a shape which is four times the *area* of the original shape. Similarly, when we scale all lengths by a factor of $n$ we get a shape which has $n^{2}$ the area. More generally, for a shape in $D$-dimensional Euclidean space, when we scale all lengths by a factor of $n$ we get a shape which has $n^{D}$ times the volume.

So we could try to say that a shape has volume dimension $D$ if when you scale it up by a factor of $n$ the volume changes by a factor of $n^{D}$. Unfortunately, that doesn’t work for various reasons. Firstly, you have to specify the kind of volume you need for each shape, so you need length for lines and area for squares, so you’re presupposing the dimension when you pick the volume to use! Secondly, this is not going to work for fractals as none of these volumes make sense for a fractal. The Koch curve does not have a meaningfully non-trivial length or area. (To define fractal dimensions such as the Hausdorff or Minkowski dimension you’d take a different turn at this point, but we’ll carry on the way we’re going.)

## Defining dimension using a notion of size

An alternative would be if we had a single notion of size which we could use for all shapes simultaneously. For a given shape we could then see how this size changes under scaling and use that to define a notion of dimension. This is the approach I used as I know of several appropriate notions of size.

Tom Leinster introduced ‘magnitude’ $|\cdot |$ which is a notion of size which is defined for every compact subset of a Euclidean space — and more generally, for every compact, positive definite metric space. I’ll not give the definition here.

Tom also introduced ‘maximum diversity’ which is based on magnitude, is a bit more complicated to define but is somewhat better behaved on all metric spaces. He gives the definition in this post if you are interested.

I introduced a one-parameter family $\{ E_{q}\} _{q\ge 0}$ of notions of size which are defined for every finite metric space — and I suspect for every compact subset of Euclidean space as well. These are easier to define and calculate, but I’ll just give the definitions for $E_{0}$ and $E_{2}$, which are particularly nice to write down. If $(X,d)$ is a finite metric space with $N$ points then the $0$-spread and $2$-spread are defined as follows: $E_{0}(X)\coloneqq \sum _{x\in X}\frac{1}{\displaystyle\sum _{y\in X}e^{-d(x,y)}}; \qquad E_{2}(X)\coloneqq \frac{N^{2}}{\displaystyle\sum _{x,y\in X}e^{-d(x,y)}}.$

Once we have a notion of size $S$, we want to use this to define a notion of dimension which tells us how the size alters under scaling. Typically we can’t do anything as naive as finding a $D$ such that if we scale by a factor of $n$ then the size scales by a factor of $n^{D}$, the sizes described above are generally more interesting than that!

For a shape $X$ and $t\gt 0$ we define $t X$ to be the shape $X$ scaled up by a factor of $t$. We then have the size $S(t X)$ being a function of $t$ and we define the dimension of $X$ to be the growth rate of this function at $t=1$. By growth rate I mean some number associated to a function such that the growth rate of $t^{D}$ is $D$. Recalling from school that the way to calculate the growth rate of a function is to plot the function on log-log paper and measure the gradient, we take the instantaneous growth rate of a function to be the logarithmic derivative, $\frac{d (\ln (f(t)))}{d \ln (t)}$. A couple of applications of the chain rule tell us that this is just $\frac{d f(t)}{dt}\frac{t}{f(t)}$.

For a notion of size $S$, this leads us to define the **S-dimension** of a shape $X$ by
$\dim _{S}(X)\coloneqq \frac{d \ln (S(t X))}{d \ln (t)}\bigg | _{t=1}=\frac{d S(t X)}{dt}\frac{t}{S(t X)}\bigg |_{t=1}.$

The graph in the introduction is the $E_2$-dimension of the $3000\times 16$ lattice of points in the animation plotted as we scale the set of points, i.e. it’s the graph of $dim_S(t X)$ as we vary $t$.

In practice, it seems that the magnitude, $E_{0}$ and $E_{2}$ dimensions of a given shape look very similar. They have different advantages over each over: for instance, we know, or have conjectured, closed forms for magnitudes of several shapes; but in the case of things that we don’t have a closed form for it is quicker to calculate the $0$- or $2$-spread dimension.

## Next time…

Next time I’ll give more examples. I’ll also say something about connections with Minkowski dimension, although I don’t understand the full story there.

## Re: A Scale-Dependent Notion of Dimension for Metric Spaces (Part 1)

If your growth rate graph width was scaled from 400 to 380, HTML layout wouldn’t create all that blank space and position it after the right side bar ends.