Dimensional analysis is useful when you want to convert between compositions of units. A good example is comparing the price of petrol where different units are being used. If you know the conversion rate between litres and gallons, and the conversion rate between USD and GBP, then you can figure out the conversion rate between USD/gal and GBP/L:
USD/gal * GBP/USD * gal/L = GBP/L
1.24 USD = 1 GBP
1 gal = 3.78541 L
GBP/USD = 1.24
gal/L = 3.78541
USD/gal * 1.24 * 3.78541 = GBP/L
USD/gal * 4.6939084 = GBP/L
$4.6939084/gal = £1/L
Brings back memories. We had a particularly strict physics teacher who only awarded full marks if our answers were numerically correct, with correct units, and we proved (with a little marginal aside simplifying all mass, length and time) that the dimensions were also correct.
I always go back to the reference https://gmpreussner.com/research/dimensional-analysis-in-pro... for programming language support. It's updated from time to time, and incorporated the work done on Ada in the 2010s. Good read.
This is criminally under taught and under used
Kind of odd that this doesn't really go into metrics directly nor does it mention one of the more interesting cases which is infinite dimensionality.
I learned this in fluid dynamics class for learning about non dimensional value that are used like Reynolds numbers, but more broadly it was a bit like a cheat code because often we had an exam question with units of inputs and then the final answer in another set of units, and even without knowing the correct equation you could with a little intuition, derive the correct solution by combining the input units in fun ways,
Understanding the MLT system in this way made most of mechanical engineering much more straightforward, and I used this almost every day up to my masters degree in computational fluid dynamics.
Best one-lesson favor I ever got was dimensional analysis in high school.
Do it, and most basic physics is trivial.
Check out this NIST technical note on implementing quantity calculus (the broader topic in which dimensional analysis resides - it has nothing to do with integration or differentiation, don't let the 'calculus' part turn you off) in software.
https://www.nist.gov/publications/architecture-software-assi...
This was interesting, but I was expecting something more along the lines of base units => https://en.wikipedia.org/wiki/International_System_of_Units
Dimensions behave somewhat like a "type system" for math. These dimensional-analysis tricks act like the trick you see in Haskell sometimes, where you can easily guess an implementation of an expression once you know it's type (or e.g. search by type signature https://hoogle.haskell.org/ )
Great. Now let's talk about the addition operation not being available for some units / dimensions like Temperature, Density, Speed etc.
Why do we have square meters but not square seconds?
Dimensional analysis crimes are the best crimes. Express velocity in meter-hertz. It's wrong, but the units are right!
Shout out to https://instacalc.com/ . It's like a simple spreadsheet or calculator but with awesome support for dimensional analysis -- you can attach any units you want to a quantity and it will track it throughout the calculations, and do a best-faith effort to figure out conversions / "what you meant".
For example, here's a quick scratchpatch I used for calculating memory bandwidth / CPU transfer rates: https://instacalc.com/56842