Dimensional Analysis Using Toric Ideals: Primitive Invariants

Classical dimensional analysis in its original form starts by expressing the units for derived quantities, such as force, in terms of power products of basic units etc. This suggests the use of toric ideal theory from algebraic geometry. Within this the Graver basis provides a unique primitive basis in a well-defined sense, which typically has more terms than the standard Buckingham approach. Some textbook examples are revisited and the full set of primitive invariants found. First, a worked example based on convection is introduced to recall the Buckingham method, but using computer algebra to obtain an integer matrix from the initial integer matrix holding the exponents for the derived quantities. The matrix defines the dimensionless variables. But, rather than this integer linear algebra approach it is shown how, by staying with the power product representation, the full set of invariants (dimensionless groups) is obtained directly from the toric ideal defined by . One candidate for the set of invariants is a simple basis of the toric ideal. This, although larger than the rank of , is typically not unique. However, the alternative Graver basis is unique and defines a maximal set of invariants, which are primitive in a simple sense. In addition to the running example four examples are taken from: a windmill, convection, electrodynamics and the hydrogen atom. The method reveals some named invariants. A selection of computer algebra packages is used to show the considerable ease with which both a simple basis and a Graver basis can be found.


Introduction
Dimensional analysis has a long history. It was discussed by Newton and provided useful intuition to Maxwell, see [12], chapter 3. A recent paper giving popular overview is [21]. The first rigorous and most well-known treatment is by Buckingham [4][5][6], whose name is attached to the main theorem. Dimensional analysis is still considered a fundamental part of physics and is usually taught at an early stage. It is sometimes studied under a heading of qualitative physics [3] [26]. In engineering it gives a useful additional tool for the analysis of systems [15]. It is used in engineering design and in experimental design for engineering experiments [14] [16] [26] and a recent paper with discussion [1] [13]. It has also been used in economics [2]. For an interesting recent application to turbulence and criticality see [7] [8].
We give an algebraic development of dimensional analysis based on the theory of toric ideals and toric varieties. Although this is essentially a reformulation, the algebraic theory itself is by no means elementary and the theory of toric ideals is a live branch of algebraic geometry. We have used [25] and the recent comprehensive volume [11]. We shall see that the methods give all primitive invariants for a particular problem, in a well-defined sense, which are typically more than given by the Buckingham method.
Within mathematical physics dimensional analysis can also be seen as an elementary application of the theory of Lie groups and invariants, when the group is the scale group defined by multiplication. We shall draw on [23] in Section 5.

Basic dimensional analysis
The basic idea of dimensional analysis is that physical systems use fundamental quantities, or units, of mass (M), length (L) and time (T). To this list may be added various others such as temperature (K) and current (A), depending on the domain. The extent to which derived quantities can be expressed in terms of M, L, T goes to the heart of physics but we shall not delve deeply. Mathematical models for physical systems use so-called derived quantities such as: force, energy, momentum, capacity etc. Dimensional analysis tells us that each one of these quantities has units which have a power product representation. Below are a few examples from mechanics.
We note that the formulae for the expression of derived units have integer powers. This is critical for our development: it makes them algebraic in the sense of polynomial algebra.
In a physical system we may be interested in a special collection of derived quantities. The task of dimensional analysis is to derive dimensionless variables with a view to finding, by additional theory or experiment, or both, the relationship between these dimensionless variables. As mentioned, the key theorem in the area is due to Buckingham. In this section we explain it with an example.
Rather than use the M, L, T . . . notation we assume that there are some basic quantities of interest which we label z 1 ,z 2 , . . .. Each such quantity is assumed to have the scaling property, namely if the fundamental units, which we now call t 1 ,t 2 , . . . are scaled up or down this induces a transformation on the z i . Whether this means simply a change in units or actual physical scaling of the system is sometimes unclear in the literature, but we shall prefer the latter interpretation. Thus the area z~ab of a rectangle with sides of length a and b, and which would have units L 2 , would be transformed into z'~abt 2 2~z t 2 2 . under a physical scaling, t 2 , of the length. Although the same scaling would occur with a change of units.
As a another example if z 1 is force and the fundamental units are mass (t 1 ), length (t 2 ) and time (t 3 ), then the scaling transformation is We use the arrow to indicate that scaling of the fundamental quantities t 1 ,t 2 ,t 3 implies a scaling of the derived quantity. With a collection of derived quantities we have one such transformation for each z j . Dimensionless quantities are rational functions of derived quantities for which there is no scaling: ? is the identity.
Here is a well known example which we shall use as our running example. It concerns a body in an incompressible fluid and the derived quantities of interest are fluid density (z 1 ), fluid velocity (z 2 ), object diameter (z 3 ), fluid dynamic viscosity (z 4 ) and fluid resistance (z 5 ) (drag force). Taking the units into account the transformation is: After a little algebra, or formal use of Buckingham's theorem, we can derive dimensionaless quantities and it is straightforward to check that in each case the t j cancel so there is no scaling. The first quantity is Reynolds number and the second is sometimes referred to as the dimensional drag.
To repeat, the term dimensionless is interpreted by saying that replacing each z j by the y j in the transformation ? in (1), leaves the y j unchanged: they are rational invariants of the transformation.
The dimensionless principal, for our example, embodied in the Buckingham theorem is that any function F of x 1 , . . . ,x 5 which is invariant under ? is a function of y 1 and y 2 which we write: F(y 1 ,y 2 ).
We now sketch the traditional method. The transformation in (1) can be coded up by capturing the exponents in the power products. This gives This matrix has rank 3 and we can find a full rank 2|5 integer kernel matrix, namely an integer matrix K which has rank 2 and such that A T K~0. This is readily computed using existing functions in computer algebra, as oppose to a numerical package which may, for example, give a non-integer orthonormal kernel basis. The nullspace or kernel commands in Maple can be used. For the above A we obtained using these commands and with a sign change in the first row we obtain The key point is that the rows of K give the exponents of z 1 , . . . ,z 5 in y 1 and y 2 , above.
However, because K is not unique, because we can choose different bases for the kernel, we could use This gives an alternative to y 2 , above, namely y 3~t The approach of this paper clarifies, among other issues, the problem of the choice of K which this example exposes.

Power Products and Toric Ideals
Algebraic geometry is concerned with ideals and their counterpart algebraic varieties. We give a very short description here. (Note that we shall use x for variables in an abstract algebraic setting reserving z for ''real'' problems.) A standard reference is [10] and in this and the next paragraph we present a very short summary of the first two chapters. We start with the ring of all polynomials in n variables x~(x 1 , . . . ,x n ) over a field k: k½x 1 , . . . ,x n . A set I of polynomials in k½x 1 , . . . ,x n , is an ideal if (i) zero is in I, (ii) I is preserved under addition and (iii) f (x)[I implies s(x)f (x) is in I for any s(x) in k½x 1 , . . . ,x n . By a theorem of Hilbert all ideals are finitely generated. That is we can find a set of basis polynomials f 1 (x), . . . f m (x) such that any f (x) I can be written . ,x n . An ideal I gives a variety as the set of x such that f (x)~0 for all f (x)[I. It will also be enough to work within the field Q of rationals.
Modern computational algebra has benefitted hugely from the theory of Gröbner bases and the algorithms that grew out of the theory, notably the Buchburger algorithm. We will need one more concept, that of a monomial term ordering, or term ordering for short. Monomials x a~x a 1 1 :::x a n n , where a~a 1 , . . . ,a n §0 ie a i §0, i~1, . . . ,n, drive the theory. A monomial term ordering, written x a [x b is (i) a total (linear) ordering with 0 as the unique minimal element and the additional condition Since such an ordering is linear every polynomial f has a leading term with respect to the ordering: LT [ (f ). If we fix the monomial ordering, [, the Gröbner basis G [~f g 1 (x), . . . ,g m (x)g of an ideal I with respect to [ is a basis such that the ideal generated by all leading terms in the ideal is the same as that generated by the set of m leading terms of the basis G [ . Given I and [ the Buchburger algorithm delivers G [ . We will be concerned with the set of all Gröbner bases as [ ranges over all monomial term orderings. This is called the fan and is finite, although it can be very large.
One of the main definitions of a toric ideal fits perfectly with the power product transformations of dimensional analysis. It is this observation which motivates this paper. We shall emphasize the connection by using the same notation: ft,y,Ag, with x or z according to emphasis, in both the algebraic and physical theories.
The following development can be taken from a number of books, but [25] is our main source. The main steps in the definition are.
1. The polynomial ring over n variables k½x~k½x 1 , . . . ,x n . 2. A d|n matrix A with columns labeled a 1 , . . . ,a d . 3. Variables t 1 , . . . ,t d and the Laurent ring generated by the t i and the inverses t {1 i . We write this as

4.
A power product mapping from k½x to k½t,t {1 defined by A: x i~t a i : The kernel of the mapping in item 4 above is the toric ideal. It can be considered as the ideal obtained by formally eliminating the t j from the ideal: By formal elimination we mean in the algebraic sense as explained in [10], Chapter 3, that is obtaining the so-called elimination ideal: the intersection of the original ideal with the subring of polynomial excluding the t j .
The generators of the toric ideal are related to the kernel of A in the follow way. The generators are all so-called binomials where u and v are non-negative integer vectors with the property that Au~Av: The last equation can be written A(u{v)~0, which is equivalent to u{v being in the kernel of A.
The connection with dimensional analysis now becomes clear. Let us put dimensional analysis on a similar notational footing, only using z instead of x. Start with a d|n matrix A with columns fa i g. The general form of the mapping ? in (1), in the introduction, becomes We can write this in matrix terms as Now, suppose we have a possible invariant y j . We first express y j in terms of the z i . We use u,v to denote integer vectors with non-negative entries to distinguish the positive from the negative exponents. Thus, we write y j~z u j z -v j We are now in a position to test invariance. The necessary and sufficient condition for y j to be an invariant is that substituting each z j by y j in the right hand side of (3) for z leaves y j unchanged. But the condition for this is, replacing Cancelling the z i from both sides, this is equivalent to exactly the toric condition. We have proved our main result: A brief summary is that the set of all dimensionless variables y associated with a set of quantities defined by an integer matrix A are exactly those given by the toric ideal I A .
We can give a minimal set of generators for the toric ideal of our running example. We use the Toric function on the computer algebra package CoCoA, [9], which takes the matrix A as input. Simply to ease the notation in the use of computer algebra we use a, . . . ,e, for z 1 , . . . ,z 5 . The script with output is.
The second two terms give the dimensional variables from the alternative kernel matrix K 0 , above. A key point is that the toric ideal may have more generators than the rank of the kernel in Buckingham's theorem. The next section amplifies this point.

Saturation and Gro¨bner bases
To summarise, the toric version of dimensional analysis says that we can generate dimensionless quantities from the toric ideal which is the elimination ideal of the original power product representation, being careful to use elimination in the proper algebraic sense.
A lattice ideal associated with an integer defining matrix A is the ideal based on a full rank kernel matrix. That is if A is d|n with rank d then we find an integer n|(d{n) matrix K, with rank n{d with rows k 1 , . . . ,k n{d with A T K~0.
The corresponding lattice ideal is generated by ft k j g. For our first K in subsection (1) lattice ideal has two generators: But, as we have seen, this is one fewer generators than the toric ideal. However, given any such lattice ideal we can obtain the toric ideal using a process called saturation. The process has two steps. Fix the defining matrix A compute a kernel K and let I K be a lattice ideal associated with K.
1. Select a dummy variable s and adjoin to the lattice ideal the generator s P n j~1 x j z1. That is form the sum of the ideals: x j z1i: 2. Eliminate s from I Ã K to give the toric ideal for fx 1 , . . . ,x n g. That is, the toric ideal is obtained as the elimination ideal for fx 1 , . . . ,x n g.
The process of elimination in this saturation process is a formal procedure and leads to a reduced Gröbner basis of the toric ideal which depends in general on the monomial ordering used in the elimination algorithm. Reduced means all coefficients of the leading terms are 1 and removing basis terms gives a ring which cannot contained the remove term; essentially there is no redundancy.
Saturation gives an explanation for the fact that the toric ideal contains, but is not necessarily equal to the lattice ideal: the addition condition s P n j~1 x j z1~0 giving the variety defined by I Ã A forces all the x j to be nonzero. Translated into the original z j the toric ideal description of the dimensionless quantities has the physical interpretation that it gives the full set of rational polynomial invariants when none of the defining variables z j is allowed to be zero. This removal of zeros is intimately connected with the more abstract definitions of toric varieties but we do not develop this here, see [11].

The Grö bner Fan, Primitive Invariants and the Graver Basis
A natural question, given the ease of computing invariants using toric methods, is whether the invariants obtained in this way are in some sense minimal. This turns out to be the case. We can illustrate this with our example. A little inspection of the basis h{d 2 zae,abc{d,bcd{ei shows that we cannot get simpler invariants from this basis by multiplication (or division): if The following is straightforward alternative definition.

Definition 2 A dimensionless invariant z u z {v is primitive if and only if it cannot be written as the product of two other such invariants which do not have common variables.
In the above example y 1 and y 2 have e in common. In linear programming notation the condition is that there are no fu 0 ,v 0 g=fu,vg such that u 0 ƒu and v 0 ƒv, recalling that ''ƒ'' means entrywise.
Lemma 4.6 of [25] is Lemma 3.1 Every invariant obtained from a reduced Gröbner basis of I A is primitive.
Note that in what follows we are a little lazy in not to distinguish an invariant from its inverse.
As mentioned, as we range over all monomial term orderings defining the individual Gröbner basis we obtain the complete Gröbner fan and by the Lemma 3.1 and our definition all resulting invariants are primitive. This union of bases is called the universal Gröbner basis and the computer programme Gfan is recommended to compute the fan [20].
We return to our running example. If we put the G-basis element h{d 2 zae,abc{d,bcd{ei into Gfan we obtain the full fan as hbcd{e,ae{d 2 ,abc{di, he{bcd,abc{di, hd 2 {ae,bcd{d,abc{di hd{abc,ab 2 c 2 {ei, he{ab 2 c 2 ,d{abci, the first of which is the input basis. The universal Gröbner basis of distinct basis terms (ignoring the sign change) is: bcd{e,ae{d 2 ,abc{d,ab 2 c 2 {e and we have a new primitive invariant, namely our y 2 in the introduction. Definition 3 The set of all primitive basis elements (which may be larger than the universal Gröbner basis), is called the Graver basis.
Algorithm 7.2 of [25] can be used to compute the Graver basis. The method starts by constructing from A an extended matrix called the Lawrence lifting: where the zero is a d|n zero matrix and I is a d|d identity matrix. Then introducing n more derived variables to make a set z 1 , . . . ,z n ,z nz1 , . . . z 2n a toric ideal is constructed usingÃ. Finally, set z nz1~Á Á Á~z 2n~1 . The method is conveniently set out in the help screen of ''ToricIdealBasis'' on Maple. After inputting This yields In this case the set is the same as given by the fan. That is, the universal Gröbner basis and the Graver basis are the same.

Further Examples
For each of the examples below we give the derived quantities using the classical notation, (i) the A matrix (ii) a single toric ideal basis given by the default function on CoCoA and (iii) a full set of primitive basis elements, that is the Graver basis, given by the maple ToricIdealBasis command and the Lawrence lifting. From this a full set of primitive invariants is immediate. It turns out that for all except one of our examples (windmill) the Graver basis is also the universal Gröbner basis. We mention when we find well-known invariants.

Windmill
This standard problem is taken from [15] The A-matrix is In the a,b . . . notation we obtain, from CoCoA, a basis with 4 terms: hbd{c,b 2 c 3 e{a,c 5 e{ad 2 ,bc 4 e{adi The first entry give a dimensionless quantities discussed in the book: The universal Gröbner basis obtained from the Gfan gives five terms The last of these is also discussed in the book; it gives the invariant P rn 3 d 5 : A full set of 7 primitive invariants, the Graver basis, is hbd{c,{b 2 c 3 eza,a{b 3 c 2 de,a{b 4 cd 2 e,{b 5 d 3 eza,ad{bc 4 e,ad 2 {c 5 ei, Since rank (A)~3 there are only two algebraically independent invariants. The standard argument may suggest testing the relationship between any two independent invariants, for example in a wind tunnel. An important question, which should be the subject of further research, is say which two or, more generally, whether the dimensional analysis is sufficiently trusted to test only one pair and infer other relationships from the algebra.

Forced convection
The interest is in the following derived quantities: the forced convection coefficient h, the velocity, u, the characteristic length of the heat transfer surface L, the conductivity of the fluid k, the dynamic viscosity, m, the fluid specific heat With columns in the order of the listed the rows in the units order the A-matrix is Resorting to the a,b, . . . notation we have from, CoCoA, the ideal hac{d,ef {d,bcg{e,bfg{a,ae{bdgi, giving invariants: The first three of these are well-known invariants: Nusselt number ,N~h L k ð5Þ Prandtl number ,P~m c k ð6Þ In preparing this paper it was pleasing to obtain these directly from the computer on the first run. The full set of 7 primitive basis elements is ; ; hac{d,ef {d,bcg{e,bfg{a,ae{bdg,bcfg{d,ac{ef i The simplest of the ''new'' primitive invariants is from ac{ef : which is the Reynolds number divided by the Nusselt number.

Electrodynamics
As an exercise we take six basic quantities for electro-dynamics and use the literature to give some expression in terms of mass (M), length (L), time (T) and current (A). We do not have any particular electromagnetic device in mind, but simply try to find some dimensionless quantities. The following is one version: CoCoA gives hbc{a,{ce 2 zd,{ae 2 zbdi: Note that A only has rank 3. It turns out that this is a complete list of primitive basis elements.

Hydrogen atom
Toric ideals are embedded in advanced models in physics but one can get some way with simple dimensional analysis. This example is given in some form by a number of authors. We found [24], section 1.3.1, useful. The hydrogen atom consists of a proton and a neutron and the Bohr radius is the distance between them. We have used slightly non-standard notation. In a somewhat cavalier manner we have introduced the speed of light as a derived quantity. We cannot resist stating that the sixth basis element, af 2 {c gives E~constant |m e c 2 : The Graver basis gives a set of 10 primitive invariants for the hydrogen atom: It is not known whether this list has been given explicitly before. The Wider Picture: Group Invariance Dimensional analysis should be considered as a special case of the theory of group invariance and in an attempt to suggest a natural generalisation we very briefly sketch the theory of invariants.
We start with the action of a Lie group G acting on a manifold M in R d . The manifold will be our model and the group something to do with our physical understanding. The orbit of O(x) for a point x in M be the set of all g(x) for all g in G. If M is invariant under G then O(x)5M. This sets up an equivalence relation with members of M in which the same orbit are equivalent. The collection of equivalence classes is denoted by the quotient M=G and the projection p : M?M=G maps every member of of M into its correct equivalence class. Under suitable conditions M=G is a manifold in its own right and we say that G acts regularly on M. Also, the mapping p can be used to set up a coordinate system on M=G and note that p itself is an invariant. This discussion leads naturally to the following.
Proposition 5.1 Let a group G act regularly on a manifold M. A manifold defined by a smooth function F is a set S F~f xjF(x)~0. It is G-invariant if and only if there is a function F Ã defining a smooth sub-manifold S F Ã~fyjF Ã (y)~0g on M=G such that where p is the projection from M to M=G. A one parameter Lie group G shifts a point x along an integral curve Y(E,x) by a flow. If we expand Y(E,x) in a Taylor expansion in E we obtain: The term j(x)~(j 1 (x), . . . ,j d (x)) defines a vector field and we can write v in classical local coordinates: This is a first order partial differential equation which can be solved by first writing down namely by the methods of characteristics. The solutions take the form: where the y j are the invariants. In our notation E becomes t and using our generating matrix A the mapping ? in (3) is Performing matrix partial differentiation with respect to t, and setting all t i~1 gives the infinitesmal generators: v~A L Lz : An interpretation of the toric variety is as characterising the orbits of the scale group of transformation, as discussed above. We have not formally proved the Buckingham theorem, but drawing on the above discussion it is given as Theorem 2.22 in [23].

Limitations of the Study, Open Questions and Future Work
We have seen that the toric ideal method, via the Graver basis, is a fast way to compute all primitive invariants in dimensional analysis. There are some areas of further study which this suggests.
The first area arises from the possibility that different physical systems may yield different types of toric ideal or variety. The most important general class is normal toric varieties. Briefly, such varieties are related to polyhedral cones and polyhedra with integer or rational generators. The standard approach is to take the a suitable cone s and compute its Hilbert basis, which is a set of integer generators of the dual cone giving all integer grid points in that cone. From this there is a natural toric ideal. But an open problem, it seems to the authors, is whether this rich theory of normal varieties and polyhedra has a role in classical physics and engineering.
A second area is a natural development from the previous section. A discussion missing from this paper is the way in which differentials are converted to derived quantities. For example velocity, which is Ly Lt , for some length variable y and time t is allocated the units LT {1 . One way to keep the advantages of awarding derived quantities to differential terms, but retain differentials is to use combinations of differential and polynomial operators. The algebraic environment which allows this is differential algebra and in particular Weyl algebras. Much of the existing work uses the methods to study identifiability (see [22]) but the challenge, here, is to find differential-algebraic invariants in the same spirit as the invariants in this paper. A noteworthy development is [17][18][19], especially in the context of dynamical systems. Finally, the authors are aware of the value of standard dimensional analysis when the exponents are rational but not necessarily integer. This arises in the work on turbulence mentioned [7,8]. This can be studied by changing the base lattice to have fractional levels and the authors are considering research in this area.

Conclusions
Toric ideals are the appropriate framework for dimensional analysis with describe the rational invariants under the multivariate scale group. The key contribution is that the Graver basis, which can be the thought of as a unique ''envelope'' of bases for the toric ideal and consists of all primitive elements then gives rise to a notion of primitive invariants. These comprise the invariants which cannot be split into the product of two other invariants using disjoint sets of units. The suggestion is that this solves a classical but sometimes unspoken conundrum in dimensional analysis: namely that invariants produced by the celebrated Buckingham method are not unique. In addition the Graver basis is easily computed using computer algebra. In some examples we are able to find some named invariants, all, satisfyingly, primitive. But also, because the Graver basis is larger than a minimal basis for the toric ideal the methods throws up new primitive invariants which may attract scientific interest.