Practical definition
An equation of the form z = p + q + r + … is dimensionally homogeneous if, and only if, all the terms have the same dimension.
❶Why is the above practical definition unsatisfactory from a mathematical viewpoint?
Although most think of dimensional homogeneity as the one described in the practical definition mathematicians find the definition unsatisfactory. This is because the concept of terms does not enter the definition of a function.

In other words, the function y can be defined by a graph.
This is not necessarily the case for the concept of terms. For the terms, p, q, r, and z the definition does not state the relationship between them. This means that the value for a term cannot be determined from the remaining terms. Therefore, there is not enough information in the definition to state that the terms may be defined with a graph.
❷Mathematical definition

We denote this consideration as
Furthermore, if the original units are subject to change, the variables x1, x2, …, xn, and y will be transformed into x̄1, x̄2, …, x̄n, and ȳ.
The change is expressed as
x̄1 = x1 ⋅ Aa1 ⋅ Bb1 ⋅ Cc1 ⋅ Dd1 ⋅ Ee1 ⋅ Ff1 ⋅ Gg1 = x1 ⋅ K1
x̄2 = x2 ⋅ Aa2 ⋅ Bb2 ⋅ Cc2 ⋅ Dd2 ⋅ Ee2 ⋅ Ff2 ⋅ Gg2 = x2 ⋅ K2
⋮
x̄n = xn ⋅ Aan ⋅ Bbn ⋅ Ccn ⋅ Ddn ⋅ Een ⋅ Ffn ⋅ Ggn = xn ⋅ Kn
Ki = Aai ⋅ Bbi ⋅ Cci ⋅ Ddi ⋅ Eei ⋅ Ffi ⋅ Ggi for all i = 1, 2, …, n
What was just described was dimensional homogeneity of equation which can be summarized as
ȳ = ƒ (x̄1, x̄2, …, x̄n)
Mathematical definition with more rigor
The dimensions of the variables (independent x̄1, x̄2, …, x̄n, and dependent ȳ) can be designated as the dimensional matrix
y | x1 | x2 | … | xn | |
---|---|---|---|---|---|
M | a | a1 | a2 | … | an |
L | b | b1 | b2 | … | bn |
T | c | c1 | c2 | … | cn |
A | d | d1 | d2 | … | dn |
K | e | e1 | e2 | … | en |
cd | f | f1 | f2 | … | fn |
mol | g | g1 | g2 | … | gn |
= | y ⋅ K | x1 ⋅ K1 | x2 ⋅ K2 | … | xn ⋅ Kn |
= | ȳ | x̄1 | x̄2 | … | x̄n |
Substituting
ȳ = ƒ (x̄1, x̄2, …, x̄n)
Dimensional homogeneity from view of a graph

Comparing the two parabolic curves we notice that the graphs/parabolic curve is valid, irrespective of the unit of lengths.
Since, we know that the graph is a representation of function A and the unchanged curve implies an invariant function. Therefore, the relationship A = ℓ2 is dimensionally homogeneous.
❺A graph may not always be valid when the unit is changed.
Consider the case of stress-strain curve with the original unit of stress measured in pounds per square inch (psi). The curve indicates a relation between strain and stress but is stress as the independent variable sufficient to explain the dependent variable strain? In other words, is the function represented by the graph dimensionally homogeneous?
To answer this question, let us transform the orginial unit (of psi) to Pascal (pa) and compute the coordinate of magnitude for the transformed unit.
