Problem Solving with Dimensional Analysis
Dimensional analysis is the technique of analyzing relationships through their base quantities. I demonstrate the power of this approach by approximating a Gaussian integral without calculus.
A dimension is a physical quantity that can be measured, while a unit is a specific amount of a physical quantity. For example, time is a dimension, which can be measured in temporal units such as hours or seconds.
Dimensional analysis is the technique of analyzing and simplifying equations by expressing terms using their dimensions rather than their numerical values. Because equations should be dimensionally consistent, meaning that the dimensions on both sides of an equation are equivalent, dimensional analysis is useful for making inferences about functional forms or the dimensions of variables. Note that this is distinct from analyzing units, although that is also a useful problem-solving technique.
In my experience, dimensional analysis is particularly useful when coming at a problem where even the structure or basic terms in the problem are unknown. For example, I often find myself using dimensional analysis when reading unfamiliar code. It does not clarify everything, but it often provides an “initial hook” by allowing me to quickly understand variables’ dimensions or units.
The goal of this post is to demonstrate the power of dimensional analysis by working through the example that first convinced me while reading (Mahajan, 2010): simplifying a Gaussian integral.
Gaussian integral
Consider the integral
Imagine that we didn’t know calculus. We just think of integrals as sums and as “a little bit of ”. And imagine that we had never seen this equation before. Let’s use dimensional analysis to make sense of it.
Perhaps the simplest thing we can say is that both sides of the equation must have the same dimensions. It must be dimensionally valid. Let’s use the notation to denote the dimensions of rather than its numerical value. We’ll use unity to denote a dimensionless quantity, i.e. means that is dimensionless. Using this notation, we can express dimensional validity as
But beyond this, what can we do? The problem is that this problem has no inherent dimensions! If this were a physics problem, perhaps terms would be concretized with units. But here, this is just an abstract mathematical object. However, we can still make progress by assigning an arbitrary dimension to one of the variables and then seeing what that implies. Let’s do this by assigning an arbitrary dimension to , say (imagine this is “length”). What does this imply about the dimension of ?
We can see that and are related via the exponent. Now note that exponents must be dimensionless quantities. That is because raised to is just multiplied by itself that many times:
So is just a number here, not a dimensioned quantity. In general, the full term may have units. If has dimensions feet, and , then has dimensions (or area). However, Euler’s number is actually dimensionless. It’s a mathematical constant, and much like , it doesn’t make sense to talk about the dimension of . Thus, we know that must have no units, because it’s an exponent, and we know that must be dimensionless because it is merely Euler’s number raised to a dimensionless exponent.
For the exponent to be unitless, this implies that must have dimension , since
Now that we have the dimensions of and , let’s analyze the integral. First, observe that the integral is loosely a summation, and it only makes sense to reason about adding two quantities together if they have the same dimensions, e.g. a length plus a length is another length. So we can think of summation and integration as operations that do not change their arguments’ dimensions. And is “a little bit of ” and thus has the same units as . Here, it has dimension .
So we can summarize our analysis so far as
Now observe that is a function of just . This is because is a dummy variable, equivalent to in a sum. So we could write
What does this imply about the functional form of ? Since has dimensions , then must have the functional form
I’ll explain the notation in the next section, but for now, just think of it as approximately equal. How did we get here? Because both sides of the equation above must be dimensionally consistent, we can see that
So we used the dimensions of and to infer the functional form of !
Okay, so now for the impressive bit. How good did we do? If we use calculus, we can see that this integral is equal to
In my mind, this is pretty cool! Using nothing more than reasoning about the dimensions of our problem and applying some fairly elementary mathematical knowledge, we were able to understand the basic structure of an integral!
Equality up to a dimensionless factor
The notation means equality up to a factor without dimensions. Equation is equality up to dimensionless factor because we could multiply by a dimensionless factor and still have Equation hold since
You might wonder if we could be off by an additive factor, but this is handled by the multiplicative factor . Why? We cannot add a dimensioned quantity to a dimenionless quantity. (What is feet plus the number ?) So any additive factor must have dimension , and is thus absorbed by the dimensionless factor .
Finally, a note about in Equation . From a purely mathematical point of view, is just as important as here. But in many real-world applications, where we want to just use mathematics to make sense of a system, is typically much more important. It is the dimensioned quantity whose value changes the value of the integral.
Different initial dimensions
One question you might be asking yourself is: did we just get lucky when we picked ? Wonderfully, no. We could have started anywhere else, and we would have had the same result, because all dimensional analysis is doing is ensuring that equations and their terms are dimensionally consistent.
For example, imagine that we had started with the assumption that the dimension of was . Then the same reasoning about exponents implies that
The integral then has dimensions , and thus so does :
So the only dimensionally valid functional form for is
which is what we inferred previously.
In my mind, this really highlights the power of dimension analysis. If we don’t understand a problem at all, we can still start by assigning arbitrary dimensions and then using those dimensions to make basic inferences about the shape of our problem. And of course, when we do have more context, dimensional analysis is even easier.
A harder problem
Let’s conclude by exploring a similar problem but one in which dimensional analysis fails. Consider the Gaussian integral in Equation but with :
Here, we must immediately infer that is dimensionless, since it is an exponent, and thus is dimensionless. In other words, while this problem looks quite similar to our earlier problem, we are immediately stuck. Perhaps we could have a moment of insight and actually introduce a dimensioned quantity , but that would not help us much, since we could only use dimensional analysis to infer that
In fact, the real value of the integral is . We would still only be wrong up to a dimensionless factor, but this is not as satisfying as our earlier result. The point here is that dimensional analysis, like any tool, has particular uses and limitations. Despite this, I think it is still a useful tool to have in one’s problem-solving toolbelt.
- Mahajan, S. (2010). Street-fighting mathematics: the art of educated guessing and opportunistic problem solving. The MIT Press.