Units Have More Depth Than I Thought
Last week I stumbled over Dimensional Analysis which is not only useful for applied fields (physics, biology, economics), but also for math (Why did no one tell me that you can almost always think of df/dx as having “the type of f”/”the type of x”? The fact that exponents always have to be unit-less etc.? It had never occurred to me to make this distinction. In my mind, f(x)=x went from the reals to the reals, just like did.
One example of a question that before I would have had to think slowly about: What is the type of the standard deviation of a distribution? What is the type of the z-score of a sample?
Answer
The standard deviation has the unit of the random variable X, while the z-score is unitless
If you found the above interesting, I recommend reading (or skimming) this lecture, it’s excellent!
It had never occurred to me that I could use linear algebra to literally solve for an equation. Yes, avoiding type errors in a typed programming language is also great, but what’s different there is that often it really doesn’t matter if something is a dict or a list, it just has to fit with the rest of your code. Searching a type that correctly maps to the territory across scales is a more tricky business than efficient code for a simple programming problem. If you keep not being able to distinguish “weight” and “mass” you will keep getting lost. If you notice your confusion between the difference of the act of weighing and gravity, it might get you far.
I expect you learned calculus the wrong way, in a math class instead of in physics. That’s the point the notation, and the key reason it’s an improvement over something like ˙f or f′!
Yep! When I was in high school I was self-learning physics and was learning calculus via Khan academy, which made me learn that “sometimes”, “somehow”, you can for example solve a differential equation by getting all the dx and x’s on one side and dy’s and y’s on the other. I was always expecting when I would study this stuff more rigorously in university, this would be explained at some point. To my great disappointment, the mandatory class on this subject for my CS degree “real analysis”, did not in fact clear up why this works in the slightest!? I don’t know if every real analysis class is this bad (My linear algebra courses were excellent in comparison), but mine was mostly focusing on making students adopt “rigor”[1], presenting definition after definition and theorem after theorem (for short theorems proofs were included, but with zero sub-text what the motivation or idea of the proof was. Complicated proofs were just skipped). Starting studying during Corona and not being able to ask professors questions like that directly certainly didn’t help. Somehow I forgot, though, that I never got these questions answered that I had hoped to get an answer to. Also, the quotient in df/dx still confuses me, and it might be due to my confusion about division? Looking at the wikipedia article you link, maybe I should take a look at differential forms?
As my secondary subject for my bachelor, I chose physics, but that mostly involved applying Euler-Lagrange to particular systems. I remember becoming really confused why this can work at this point and noticing that I can’t fit the explanation in my head (I am in fact still confused and would love if you can point me to useful resources!). I remember thinking why can you differentiate with respect to speed and treat acceleration etc. as not dependent on speed, weird. Clearly, when framing them all as a function of time, it made no sense (and still doesn’t). I was looking it up on Wikipedia and apparently “Differential Geometry” was the answer to my questions, so I got 2–3 textbooks on Differential Geometry (for physics), but just skimming, I couldn’t find something that made this click.
Probably I should have looked more aggressively for people to tutor me. Now with language models it feels worth taking another stab at this though. For example when I told GPT4-o the rough areas I am confused about (link to full chat): there are these people talking about scaling laws in the context of “scaling laws” in engineering, and it seems like I might be missing some prerequisites, because I’ve bounced off this topic a few times even though this seems extremely interesting. Which led it to introduce dimensionless analysis to me, and then I asked more questions and ultimately gave me some textbook recommendations: “Street fighting mathematics”, I had already heard praise for in “Biology by the numbers”, so then I checked it out and discovered this gold.
Another question I am still confused by: how does your choice of units affect what types of dimensionless quantities you discover? Why do we have Ampere as a fundamental unit instead of just M,L,T? What do I lose? What do I lose if I reduce the number of dimensions even further? Are there other units that would be worth adding under some circumstances? What makes this non-arbitrary? Why is Temperature a different unit from Energy?
Also, I notice all the formalizations of dimensional analysis that Terence Tao mentions here strike me as ugly? Is that me being stupid, thinking that there must exist something nicer?
Which I found mostly annoying and trivial, but made me glade I had spent ~60h before university just practicing proving things. How to proove it is a great book!
It’s pretty arbitrary, I tried to explain this point via a short fictional story here.
Gaussian units only has M,L,T base units, with nothing extra for electromagnetism.
There are practical tradeoffs involved in how many units you use—basically adding units gives you more error-checking at the expense of more annoyance. See the case of radians that I discuss here.
Not quite what you asked, but I found this video visualizing Lagrange multipliers quite helpful. Plausibly it’ll help clarify Euler–Lagrange as well.
Your units question is easy: you get the same dimensionless quantities whatever units you choose. Instead of thinking of units as dimensions, I’d think of them as basis vectors in a five-dimensional space (length, mass, time, current, temperature[1]): you should have exactly five of them, and they need to be “linearly” independent, but beyond that, you can choose any set you like: you could instead have something like the natural units of (speed, gravitationality[2], angular momentum, entropy, charge). In this conception, this 5D space is fundamental: you need at least five dimensions (the ones spanned by c, G, h, k and e), and if you want more, you need to find some new as-yet-unknown independent dimension (maybe baryon/lepton number counts?).
Of the seven SI units, the other two are Candela, which is some “human visual perception” bullshit masquerading as fundamental, and amount of stuff/Avogadro’s constant, which I don’t think meaningfully constitutes a “dimension.”
ykwim: something with the units of G. If you don’t like this, just choose mass instead.
I seem to have unusually low fondness for dimensional analysis, and feel it is overhyped. Some bits are useful, like having units at all, or a couple type signature like ideas—except the ones I find the most useful are ‘officially’ dimensionless! To me, ‘radians’ are a unit (which isn’t the same as length!), log(x) has the unit of ‘log-[X units]‘, etc. Z-scores are sorta unitless, but only in the way that is “X metres”, X is unitless. The version for Z-scores is, of course, “SDs of [X units]”, which is in part its own unit (but with implicit casts to [X units]). As an example, if someone is +x SDs in variable X, and variable Y correlates with correlation r with X, then the mean estimate for their Y value is r*x SDs in Y. Diopters and wavevectors both are officially in inverse length units, yet to me wavevectors actually have the units of radian(phase)/meter—and indeed I think of optical power separately from spatial frequency. I don’t usually use the unit of “moles”, but rather the unit of “moles of X”. While I am sure my way of thinking is not original, books and teachers wouldn’t use these sorts of ‘units’ except occasionally at the college level, by professors who informally reason in a similar way—a way that does not get into the course material! For some reason people think that “dimensions” must refer to “physical quantities” as if radians and decibels are not a true physical quantity.
For mathematics, basically the only useful units are those ‘officially dimensionless ones’. Thinking in terms of types, however, is extremely useful—I wouldn’t understand differential geometry otherwise. As an example, a covector field on manifold M basically has type M → (((M → R) → R) → R). Being passingly familiar with basic category theory lets you draw diagrams of various concepts, where often the main value add of the diagram is just “this function has this type, and is a composition of these other functions, and equal to this other composition of functions”.
If someone merely says that it’s important to track what each variable in a physical equation represents, then I will of course agree with them. But some of the claims dimensional analysis advocates make in e.g. physics just seem like bullshit. “Ah, you see, you can deduce that this equation is wrong because of the unit mismatch—and see, over here there should be a proportionality factor dependent of material properties!” seems to be a terrible way to reason because of how “just add a factor whose value is 1 and that has units that make it work” literally happens sometimes.
To me it is also a bad way to think of proportionality factors—in reality whatever reasoning you used to get the equation should be obviously something that is merely proportional, or alternatively you are adding a ‘fudge factor’ meant to account of deviations from your model (which you are implicitly assuming to not vary much), or you are literally taking a taylor series whose coefficients you plan to fit to data—and how could you forget the coefficients there, when you clearly don’t know the derivatives? Likewise, I do not think “figure out how it should scale, as a fermi estimate” falls under the same category—that part is great, but has almost nothing to do with units or dimensions, and everything to do with being good at making simple approximate models.
The Buckingham-pi theorem is clearly cool. Yet, I have not seen someone actually use it, instead of retroactively using it. And even just taking the exampre from the Wikipedia page of the pendulum: I find it worrying that the analysis doesn’t alert you that it should fail for large angles. As another famous example, I don’t think it provides a good explanation of the Reynolds number: it’s much better to think of comparing inertial effects to viscous ones. In practice to come up with dimensionless characterizing quantities I find it easier to just divide each term in an equation by a ‘scale value’, basically taking the scale as my units. See for example the van der Waals equation, which is usefully written with variables taken relative to the critical point.
Importantly, the reason why those work, and are ways that people actually reason, is because they are about physics. They require thinking about the physical system, and give you analyses of it—and thus you can notice things like “ah, the angle has to be small”, can understand which dimensionless units have important physical interpretations, and not worrying about typecasts that shouldn’t be worried about.
This description seems imprecise/confusing to me. It’s rather that you need to notice that you need an extra assumption for inertial_mass=gravitational_mass, and then you can embark on finding a theory where those are identical by thinking stuff like “can i frame it as earth actually just accelerating up?”.