I am writing a program that takes two terms like 60 mph and mm/s and converts the first to the second, assuming the units are compatible. (It does this by first converting both to pure SI units.) But my question is, what exactly makes units compatible?
Initially, I assumed it was if the unit dimensions were equivalent, but that excludes seemingly valid conversions like m/s to s/m, which still make good physical sense. These types of conversions can be done if the difference in power of the units is applied to the coefficient:
$$ 5 \text{ m s}^{-1} \equiv 0.2 \text{ s m}^{-1}$$
But, following the same sort of logic, should
$$ 5 \text{ m} \equiv 25 \text{ m}^2$$
make good sense, since $ \text{m} = ({\text{m}^2})^{1/2} $, and $ 5 \text{ m} = ({25\text{ m}^2})^{1/2} $ ?
Furthermore, would it make sense to convert $ \text{m/s}^2 $ to $ \text{m}^{1/2}/\text{s} $, or something similar? Should I allow this as a valid conversion?
$$ \begin{split} 9 \text{m/s}^2 &= (3\text{ m}^{1/2}/\text{s})^2 \\ \therefore 9 \text{m/s}^2 &\equiv 3\text{ m}^{1/2}/\text{s} \end{split} $$
I guess I'm struggling to see where physical context breaks down and nothing but abstract (meaningless) math is left… where is this 'line'? What counts as a meaningful conversion and what doesn't?
Thanks!
Very interesting question. This not-quite-answer is too long for a comment.
I would interpret your assertion that $5 m s^{-1}$ and $0.2 m^{-1}s$ are equivalent (you carefully and correctly don't call them equal) as meaning that they convey the same information about the underlying physical situation you are modeling. In that situation the variables "distance" and "time" are real valued functions of the physical state once you've chosen units for those quantities. Then since $$ \left( 5 m s^{-1} \right)^{-1} = 0.2 m^{-1}s $$ knowing the velocity is the same as knowing its inverse.
You can make a similar argument for your second seemingly wrong example. There the "physical system" is the set of all squares. If you know the numerical value of the side of a square (in, say, meters) then you know its area (in square meters).
You will certainly enjoy the answer to this question at https://what-if.xkcd.com/11/