Public

I mentioned a while back that dimensions are a

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

[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

*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

- When they teach you freshman-level physics it
*seems*as if dimensions aren't a choice. Then you gradually learn otherwise.

I remember being amazed and confused when I got far enough along to realize that different common unit systems for electromagnetism actually affected the form of Maxwell's equations.

Part of that has to do with dimensioned constants, and part of it has to do with factors of 4pi. In these discussions we usually think of 4pi as dimensionless but I suppose one could characterize the difference between rationalized and non-rationalized electromagnetic unit systems by explicitly treating it as having dimensions of steradians.Jun 20, 2016 - +John Baez , +Jacob Biamonte An interesting perspective, which raises an interesting question: if the differential "master equation" form is dimension-full, does the probabilstic equations form somehonw acquire that in the process of going to the limit?Jun 20, 2016
- The dimensional analysis Wikipedia page has some stuff I've never seen before. Check out Huntley and Siano's extensions https://en.m.wikipedia.org/wiki/Dimensional_analysis

What other symmetries can we encode?Jun 20, 2016 - +Dan Piponi if you're looking at symmetries and invariants arising as a consequence of them; note that you can use relational parametricity to encode such conserved quantities "for free". for details see https://pure.strath.ac.uk/portal/en/publications/from-parametricity-to-conservation-laws-via-noethers-theorem(547ac90d-a000-40e5-b6f4-927d9a3acf5c).htmlJun 22, 2016
- +Suhail Shergill It's silly, I know, but I've been avoiding that paper. It combines many things I'm interested in but I wanted to see if I could get there myself.Jun 22, 2016
- +Dan Piponi it might be silly, but I know the feeling and can relate :)Jun 22, 2016

Add a comment...