TExcelTAD
Home › Linear Algebra & Matrix Theory › Application: Dimensionless Variables

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 Ma Lb Tc\mathrm{M}^a\,\mathrm{L}^b\,\mathrm{T}^c (mass, length, time). Record it as the exponent vector (a,b,c)(a, b, c):

Quantity Dimension Vector (M, L, T)
length ℓ\ell L\mathrm{L} (0,1,0)(0, 1, 0)
mass mm M\mathrm{M} (1,0,0)(1, 0, 0)
time tt T\mathrm{T} (0,0,1)(0, 0, 1)
velocity vv L T−1\mathrm{L}\,\mathrm{T}^{-1} (0,1,−1)(0, 1, -1)
acceleration gg L T−2\mathrm{L}\,\mathrm{T}^{-2} (0,1,−2)(0, 1, -2)
force FF M L T−2\mathrm{M}\,\mathrm{L}\,\mathrm{T}^{-2} (1,1,−2)(1, 1, -2)
density ρ\rho M L−3\mathrm{M}\,\mathrm{L}^{-3} (1,−3,0)(1, -3, 0)
viscosity μ\mu M L−1 T−1\mathrm{M}\,\mathrm{L}^{-1}\,\mathrm{T}^{-1} (1,−1,−1)(1, -1, -1)

Multiplying quantities adds their exponent vectors, and raising to a power scales them. So the product q1x1⋅q2x2⋅…⋅qnxnq_1^{x_1} \cdot q_2^{x_2} \cdot \ldots \cdot q_n^{x_n} is dimensionless exactly when

x1⋅(vector of q1)+x2⋅(vector of q2)+⋯+xn⋅(vector of qn)=(0,0,0)x_1 \cdot (\text{vector of } q_1) + x_2 \cdot (\text{vector of } q_2) + \cdots + x_n \cdot (\text{vector of } q_n) = (0, 0, 0)

That is a homogeneous system Dx=0D\mathbf{x} = \mathbf{0}, where the columns of the dimension matrix DD are the exponent vectors.

Example: the pendulum

What can the period PP of a pendulum depend on? Perhaps its length ℓ\ell, the mass mm of the bob and gravity gg.

PℓmgM0010L0101T100−2\begin{array}{c|rrrr} & P & \ell & m & g \\ \hline \mathrm{M} & 0 & 0 & 1 & 0 \\ \mathrm{L} & 0 & 1 & 0 & 1 \\ \mathrm{T} & 1 & 0 & 0 & -2 \end{array}
python · try it yourself
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 P2⋅ℓ−1⋅g=P2gℓP^2 \cdot \ell^{-1} \cdot g = \frac{P^2 g}{\ell}. If physics is to make sense in every unit system, this number must be a constant CC, so

P=C⋅ℓ/gP = \sqrt{C} \cdot \sqrt{\ell / g}

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 C=2π\sqrt{C} = 2\pi for small swings.

The Buckingham π\pi theorem

The example generalises. If a problem involves nn quantities and their dimension matrix has rank rr, then the null space has dimension n−rn - r, so there are n−rn - r independent dimensionless groups π1,…,πn−r\pi_1, \ldots, \pi_{n-r}, and every physical law relating the quantities can be rewritten as a relation between those groups alone. This is the Buckingham π\pi theorem, and its linear-algebra core is the count "number of free variables=columns−pivots\text{number of free variables} = \text{columns} - \text{pivots}".

Example: drag on a sphere

The drag force FF on a ball moving through a fluid depends on the fluid's density ρ\rho and viscosity μ\mu, the speed vv and the diameter dd. Five quantities, three dimensions:

python · try it yourself
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 Fρv2d2\frac{F}{\rho v^2 d^2}. The second, μρvd\frac{\mu}{\rho v d}, is the reciprocal of the Reynolds number Re=ρvdμ\mathrm{Re} = \frac{\rho v d}{\mu}, which says whether a flow is smooth or turbulent. We put ρ\rho, vv and dd first on purpose: they become the pivot columns, so each group contains exactly one of the "interesting" quantities FF and μ\mu. The π\pi theorem says drag must obey a law of the form Fρv2d2=f(Re)\frac{F}{\rho v^2 d^2} = f(\mathrm{Re}) for some function ff, 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 FF first you get square roots like F−1/2F^{-1/2}); you could combine the groups (Re2\mathrm{Re}^2, 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 Re\mathrm{Re} instead of ρ\rho, μ\mu, vv and dd separately, which reduces the number of parameters and improves floating-point behaviour (values near 1 rather than 10−510^{-5} and 10610^6).
  • Game physics tuning: scaling a scene by 10× while keeping the same feel means keeping dimensionless ratios (like v2g⋅ℓ\frac{v^2}{g \cdot \ell}) 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 12mv2\frac{1}{2}mv^2 has the same dimension as force times distance.

Answer

Both are M L2 T−2\mathrm{M}\,\mathrm{L}^2\,\mathrm{T}^{-2}, vector (1,2,−2)(1, 2, -2).

Solution
mv2:(1,0,0)+2⋅(0,1,−1)=(1,2,−2)F⋅ℓ:(1,1,−2)+(0,1,0)=(1,2,−2)(12 is a pure number)\begin{aligned} m v^2\text{:} \quad (1, 0, 0) + 2 \cdot (0, 1, -1) &= (1, 2, -2) \\ F \cdot \ell\text{:} \quad (1, 1, -2) + (0, 1, 0) &= (1, 2, -2) && (\tfrac{1}{2} \text{ is a pure number}) \end{aligned}

Exercise 2: Falling distance

A dropped object falls a distance hh in time tt under gravity gg. Find the dimensionless group and the form of the law.

Answer

hgt2\frac{h}{g t^2} is constant, so h=C⋅g⋅t2h = C \cdot g \cdot t^2 (in fact C=12C = \frac{1}{2}).

Solution
ha⋅gb⋅tc dimensionless:L: a+b=0T: −2b+c=0b=1→a=−1, c=2→gt2h, equivalently hgt2\begin{aligned} &h^a \cdot g^b \cdot t^c \text{ dimensionless:} \\ &\mathrm{L}\text{: } a + b = 0 \\ &\mathrm{T}\text{: } -2b + c = 0 \\ &b = 1 \to a = -1,\ c = 2 \to \frac{g t^2}{h}, \text{ equivalently } \frac{h}{g t^2} \end{aligned}

Exercise 3: Spring period (code)

A mass mm on a spring with stiffness kk (dimension M T−2\mathrm{M}\,\mathrm{T}^{-2}) oscillates with period PP. Use SymPy to find the dimensionless group. Does PP depend on the amplitude AA (a length)?

Answer

The only group is P2km\frac{P^2 k}{m}, so P=C⋅m/kP = C \cdot \sqrt{m/k}. The amplitude's exponent is 0, so PP does not depend on AA.

Solution

AA is the only quantity with a length dimension, so its exponent must be 0 in every group.

python · try it yourself
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 Δp/L\Delta p/L (M L−2 T−2\mathrm{M}\,\mathrm{L}^{-2}\,\mathrm{T}^{-2}), diameter dd, speed vv, density ρ\rho, viscosity μ\mu, wall roughness ε\varepsilon (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). 6−3=36 - 3 = 3 groups, for example Re=ρvdμ\mathrm{Re} = \frac{\rho v d}{\mu}, the relative roughness ε/d\varepsilon/d and the friction factor (Δp/L)⋅dρv2\frac{(\Delta p/L) \cdot d}{\rho v^2}.

Test yourself

Seven quantities have a dimension matrix of rank 3. How many independent dimensionless groups exist?

  1. 3
  2. 4
  3. 7
  4. 10

What does the null space of the dimension matrix contain?

  1. Exponent vectors of dimensionless products
  2. The units of each quantity
  3. The numerical values of the quantities
  4. Only the zero vector

Dimensional analysis of the pendulum showed that the period…

  1. is proportional to the mass
  2. depends only on gg
  3. is proportional to ℓ/g\sqrt{\ell/g} and independent of the mass
  4. is proportional to ℓ2\ell^2