# The difference between a theoretical physicist and a mathematician is…

A mathematician can say what he likes… A physicist has to be at least partly sane

J. Willard Gibbs

What is it that makes a physicist sane (if only in part)? Everything has to be related back to the 'real world', or the 'real universe'. That is, a physicist has to talk about how things work in the world or universe in which we live, not some hypothetical universe. That's how I think of it, and I know, having done a bit of research with some of my students, a lot of them think the same way. That's not to say mathematicians don't have a lot to say about this universe too. It's just that the constraints on them are somewhat less.

Another way of looking at it is that physicists work with dimensioned quantities. Most things of physical relevance have **dimensions**. For example, a book has a length, width and thickness. All of these are distances, and can be measured. The unit doesn't matter; we could use centimetres, inches or light-years – but the physical size of the object is determined by lengths. Also, the book has a mass (one could measure it in kilograms). It might find its way onto my desk at a particular time (measured, for example, in hours, minutes, seconds, millennia or whatever). Perhaps it is falling at a particular velocity – which describes what distance it travels in a particular time. All of these things are physical quantities, and they carry dimensions.

One of my pet hates as a physicist is reading physics material in which the dimensions have been removed. You can do this by writing lengths in terms of a 'standard' length, but then only quoting how many of the standard length it is. So we might talk about lengths in terms of the length of a piece of A4 paper (which happens to be 297 mm); a piece of A2 paper has length 2 standard-lengths, and an area of 4 standard-areas. The problem really comes when the discussion drops the 'standard-length' or 'standard-area' bit and we are left with statements such as a piece of A2 paper has a length of 2 and an area of 4. It is left to the reader to work out what this actually means in practice. A mathematician can get away with it – she can say what she likes, but not so the physicist.

Here's a question which illustrates the point? What is the length of a side of a cube whose volume is equal to its surface area? The over-zealous mathematics student blunders straight in there: Let the length be x. Then volume is x^3, and surface area is 6 x^2 (the area of a face is x^2, and there are six on a cube). So x^3 = 6 x^2 ; cancelling x^2 from both sides, we have x=6. Six what? centimetres, inches, furlongs, parsecs? The point is that the volume of a cube can never be equal to its surface area. Volume and area are fundamentally different things.

The Wikipedia page on 'fundamental units' , along with many text books, blunders in this way too. The authors should really know better. (Yes, I should fix it, I know…) For example:

A widely used choice is the so-called Planck units, which are defined by setting

ħ=c=G= 1

No, NO, NO! What is wrong with this? How can the speed of light 'c' be EQUAL to Newton's constant of Gravitation 'G". They are fundamentally different things. The speed of light is a speed (distance per unit time), Newton's constant of gravitation is… well.. it's a length-cubed per mass per time-squared. It's certainly not a speed, so it can't possible be equal to the speed of light. And neither can be equal to 1, which is a dimensionless number. What the statement should say, is that c = 1 length-unit per time-unit; and G = 1 length-unit-cubed per mass-unit per time-unit squared.

However, doing physics can be more complicated that this. A lot of physics is now done by computer. In writing a computer programme to do a physics calculation, we almost always don't have explicit record of the units or dimensions in our calculations. Our variables are just numbers. It's left to us to keep track of what units each of these numbers is in. Strictly speaking, I'd say it's rather slack. It would be nice to have a physics-programming language that actually keeps track of the units as well. However, I'm not aware of one. (If someone could enlighten me otherwise, that would be fascinating…) Otherwise, I'll have to have a go at constructing one.

What's prompted this little piece is that I've been reviewing a paper that has been submitted to a physics journal. The authors have standardized the dimensions out of existence, which makes it awfully hard for me to work out what things mean physically. Just how fast is a speed of 1.5? How many centimetres per second is it? While that might be an answer their computer programme spits out, the authors really should have made the effort of turning it back into something that relates to the real world. In a mathematics journal, they might get away with it. But not in a physics journal. At least, not if I'm a reviewer…

## 5 Responses to “The difference between a theoretical physicist and a mathematician is…”

As a student, I did some work for the Auckland Bioengineering Institute that involved curating a model of mathematical models of biological systems written in an XML-based markup language called CellML.

When it came to equations, CellML used another XML-based markup language called MathML, and unsurprisingly it was pretty clunky to write from scratch. On its own, MathML does what you’ve described here and just works with dimensionless numbers, but CellML included units (and ways to define them using scale factor prefixes, exponents, and base units). Being XML it was still pretty clunky, but this the software that interpreted the models and was able to integrate them could at least validate them to make sure the units matched up on both sides.

I don’t think there’s any particular reason why CellML couldn’t be used for non-biological systems, but as far as I can tell the project hasn’t been updated for a while.

Sounds like a nice idea to me.

As I kind of expected, if the question is “what programming language has a powerful enough type system to do [x]?” the answer is “a functional language”.

F# seems to have some cool stuff. Here’s the docs:

https://msdn.microsoft.com/en-us/library/dd233243.aspx

And here’s a paper:

http://research.microsoft.com/en-us/um/people/akenn/units/CEFP09TypesForUnitsOfMeasure.pdf

In your “physics computer program”, the units are set by YOU, in both the constants included at the start of your program and the values you input as the program runs. Any changes to the units are likewise dictated by the programming. So adding the units back on to the outputted values should be easy to do.

Making sure that the units maintain consistency (dimensional anaylsis, IIRC) is another matter.

Adding units back to the outputted values is all well and good, but it does rely on consistency in the programming and input steps, and your problem turns from one in physics to one in algebra. That adds an extra point where errors can occur. Being able to carry units through a calculation is a really good way of checking for mistakes, and it’s something I emphasize with my students – put your units in everywhere. You can’t pick up every mistake like this, but a lot you can.