Application: Dimensionless Variables
Physical quantities carry units: metres, kilograms, seconds. Multiplying them together with the right powers can cancel every unit and leave a pure number, a dimensionless variable such as the Reynolds number. Finding those powers is a homogeneous linear system, and its null space tells you how many independent dimensionless numbers a problem has.
Dimensions as vectors
Every mechanical quantity has a dimension of the form (mass, length, time). Record it as the exponent vector :
| Quantity | Dimension | Vector (M, L, T) |
|---|---|---|
| length | ||
| mass | ||
| time | ||
| velocity | ||
| acceleration | ||
| force | ||
| density | ||
| viscosity |
Multiplying quantities adds their exponent vectors, and raising to a power scales them. So the product is dimensionless exactly when
That is a homogeneous system , where the columns of the dimension matrix are the exponent vectors.
Example: the pendulum
What can the period of a pendulum depend on? Perhaps its length , the mass of the bob and gravity .
from sympy import Matrix
# P l m g
D = Matrix([[0, 0, 1, 0], # M
[0, 1, 0, 1], # L
[1, 0, 0, -2]]) # T
print("rank:", D.rank())
for v in D.nullspace():
print("exponents (P, l, m, g):", list(v))rank: 3
exponents (P, l, m, g): [2, -1, 0, 1]
The only dimensionless combination is . If physics is to make sense in every unit system, this number must be a constant , so
Without solving any differential equation, we learned that the period grows with the square root of the length and does not depend on the mass (its exponent is 0). The full physics says for small swings.
The Buckingham theorem
The example generalises. If a problem involves quantities and their dimension matrix has rank , then the null space has dimension , so there are independent dimensionless groups , and every physical law relating the quantities can be rewritten as a relation between those groups alone. This is the Buckingham theorem, and its linear-algebra core is the count "".
Example: drag on a sphere
The drag force on a ball moving through a fluid depends on the fluid's density and viscosity , the speed and the diameter . Five quantities, three dimensions:
from sympy import Matrix
# columns: the "repeating" variables rho, v, d first, then F and mu
names = ["rho", "v", "d", "F", "mu"]
D = Matrix([[ 1, 0, 0, 1, 1], # M
[-3, 1, 1, 1, -1], # L
[ 0, -1, 0, -2, -1]]) # T
print("rank:", D.rank(), " groups:", D.cols - D.rank())
def show(v):
return " * ".join(f"{n}^{e}" for n, e in zip(names, v) if e != 0)
for v in D.nullspace():
print(show(v))rank: 3 groups: 2
rho^-1 * v^-2 * d^-2 * F^1
rho^-1 * v^-1 * d^-1 * mu^1
The first group is a drag coefficient . The second, , is the reciprocal of the Reynolds number , which says whether a flow is smooth or turbulent. We put , and first on purpose: they become the pivot columns, so each group contains exactly one of the "interesting" quantities and . The theorem says drag must obey a law of the form for some function , which is why wind-tunnel tests on a small model at the same Reynolds number predict the drag on the full-size object.
Note: The null space has many bases. SymPy's choice comes from the RREF and therefore from the column order (with first you get square roots like ); you could combine the groups (, or the product of both) and still have a valid basis. Engineers pick the combinations with a physical meaning.
In software
- Simulation code is often written in dimensionless form: a fluid solver works with instead of , , and separately, which reduces the number of parameters and improves floating-point behaviour (values near 1 rather than and ).
- Game physics tuning: scaling a scene by 10× while keeping the same feel means keeping dimensionless ratios (like ) fixed, which tells you how gravity and speeds must change.
- Unit-checking libraries (Pint in Python, F# units of measure) store exactly these exponent vectors and add them when you multiply.
Exercises
Exercise 1: Check a dimension
Show that the kinetic energy has the same dimension as force times distance.
Answer
Both are , vector .
Solution
Exercise 2: Falling distance
A dropped object falls a distance in time under gravity . Find the dimensionless group and the form of the law.
Answer
is constant, so (in fact ).
Solution
Exercise 3: Spring period (code)
A mass on a spring with stiffness (dimension ) oscillates with period . Use SymPy to find the dimensionless group. Does depend on the amplitude (a length)?
Answer
The only group is , so . The amplitude's exponent is 0, so does not depend on .
Solution
is the only quantity with a length dimension, so its exponent must be 0 in every group.
from sympy import Matrix
# P m k A
D = Matrix([[0, 1, 1, 0], # M
[0, 0, 0, 1], # L
[1, 0, -2, 0]]) # T
print([list(v) for v in D.nullspace()])[[2, -1, 1, 0]]
Exercise 4: Count the groups
Flow through a pipe: pressure drop per length (), diameter , speed , density , viscosity , wall roughness (a length). How many independent dimensionless groups are there?
Answer
Solution
Six quantities; the dimension matrix has rank 3 (density, speed and diameter alone already give independent M, L, T columns). groups, for example , the relative roughness and the friction factor .
Test yourself
Seven quantities have a dimension matrix of rank 3. How many independent dimensionless groups exist?
- 3
- 4
- 7
- 10
What does the null space of the dimension matrix contain?
- Exponent vectors of dimensionless products
- The units of each quantity
- The numerical values of the quantities
- Only the zero vector
Dimensional analysis of the pendulum showed that the period…
- is proportional to the mass
- depends only on
- is proportional to and independent of the mass
- is proportional to