Mathematically speaking, what does it mean to say that a physical quantity is some numerical value with a “dimension” associated with it? When we say that the velocity of light is some constant, c meters per second, at first thought, it seems that we are talking about a ratio of differentials, $v=dx/dt$. But what about the "dimension" of angular momentum, ${mass} \times {length}^2/{time}$? I've never seen a differential of mass in a total derivative... $L=dmdx^2/dt$ ! Or what about the "dimension" of electrical resistance, ${time}/{length}/{permittivity}$? I've never seen a differential of permittivity, either. So, the idea that a "dimension" might be just a total derivative just doesn't seem to make sense, because the number of differentials in the numerator and denominator is not always equal.
So, what is the mathematical nature of this beast we call a "dimension"?