I mentioned a while back that dimensions are a choice. Here's an example illustrating what I meant.

Here are some differential equations for modeling disease spread that I found on Wikipedia [1]. S, I, R and N=S+I+R correspond to the sizes of population groups and t is time.

dS/dt = -βIS/N
dI/dt = βIS/N-γI
dR/dt = γI

If you use standard physics dimensions then S, I, R and N are dimensionless numbers, t has the dimensions of T (time), and both β and γ have the dimensions T^-1.

Let K be a constant. Note that these differential equations are invariant under this substitution:

S → KS
I → KI
R → KR
N → KN

Whenever a set of equations has a scale invariance like this you can choose to introduce a new dimension with the power of K on the right hand side being the power of the dimension. So along with the usual M (mass), L (length) and T we can now add in P, for "person". So we have [S] = [I] = [R] = [N] = P^1 = P. With this new dimension, the left hand side of the first equation has dimension [dS/dt] = P/T and the right hand side has [-βIS/N] = T^-1 PP/P = P/T. So the first equation is consistent. Same goes for the others.

Among other things, you can use this to check your working. Further down that Wikipedia page is the equation

R0 = β/γ

So [R0] = T^-1/T^-1 = 1.

(That also makes intuitive sense as the Wikipedia article describes R0 as a ratio of numbers of people.)

A few lines later we have

S(t) = S(0)exp(-R0(R(t)-R(0)))

The argument of an exp function needs to be dimensionless. But

[R0(R(t)-R(0))] = 1P = P.

So using dimensions has paid off. We've found an error.

I think the Wikipedia article has mixed two conventions. One where S, I and R represent (dimensionless) proportions of the population in the three three groups, and one where S, I and R represent absolute numbers of people.

This is also something you can implement in software. By giving quantities appropriate types you can think of this as a way you can use a C++ or Haskell compiler, say, as a way to statically prove invariance properties of your quantities. In particular, with such a system in place it would be impossible to implement the putative expression for S(t) without the compiler complaining. Or for systems like Matlab and Excel [2] you can use a separate static analyser to check your code. And you can use it for any scale invariance you (or the machine) identify in your equations, not just the standard ones from physics.

[1] https://en.m.wikipedia.org/wiki/Compartmental_models_in_epidemiology#The_SIR_model_without_vital_dynamics
[2] https://web.engr.oregonstate.edu/~erwig/papers/DimErrors_JVLC09.pdf
Photo
Shared publiclyView activity