# Why do we order the variables in certain physics questions the way we do?

I'm writing a script involving physics equations, and someone complained that my script outputs $F = m a$ as $F = a m$, as well as outputting $E_p = m g h$ as $E_p = g h m$; another example would be $E = m c^2$ vs $E = c^2 m$. I've obviously opted for displaying the variables in the equations in alphabetical order, and it looks wrong because it's against convention - but why are the variables ordered in the way they conventionally are in the first place?

From what I can see of all the examples I've just given, the out-of-place variable is mass, so perhaps the convention is to put mass first? I don't see any reason why that would be the case though.

-
Perhaps the constant of proportionality is written first. Say $A \propto B \implies A=C \ B$. But its not a convention it is just customary. – user Jan 8 '14 at 10:51
That's a pretty good observation, actually. But it doesn't always hold - $E = mc^2$ has $c^2$ as the constant of proportionality. If I was trying to develop a general rule, though, it'd be a great place to start. – Matthew Jan 8 '14 at 11:49
$E=mc^2$ is not derived that way. e.g when we say $F \propto a$ we consider different object subjected to same force and what we observe is that objects with more mass suffer less acc. and vice-verca and objects with same mass experience same acc. mathematically this impies $F=m \times a$ where m is the constant of propotionality(The inertial mass). Its just a habbitual practice like a continuation of a song to put the constant first. Ther can be found many similar equations like : $\vec J= \sigma \vec E, \tau = I \alpha , T_0 = 2\pi\sqrt{\frac{\ell}{g}}$ – user Jan 8 '14 at 12:05
Actully in case of $E=mc^2$ we starts from $p=\gamma m_0 v$. Throughout the analysis of equations $m_0$ is written first and finally we reach $E_k=m_0 c^2$ where $E_k$ is K.E at rest. As i said perhaps; it is not always true for an equation to written that way the constant of propotionality is to written first. We just do mathematics that way. – user Jan 8 '14 at 12:12
In the case $E=mc^2$ it should be noted as $E=c^2m$ because $c^2$ is a fundamental constant. But previously we noted $E=\frac12mv^2$ because in point mechanics $\frac12m$ is the constant and the notation $E=mc^2$ is inherited from this one. – Tom-Tom Jan 10 '14 at 15:35

Mass isn't always first. For example we write Newton's law for the force between two objects as:

$$F = \frac{Gm_1m_2}{r^2}$$

I don't think there are hard and fast rules. I suspect conventions have arisen over the years and we have all got used to what we learned at school, which was taught by teachers who are used to what they learned at school and so on.

We tend to put constants first, as in the case above where Newton's constant $G$ is first, and in many cases the mass is a constant. For example when we write:

$$F = ma$$

In the vast majority of cases $m$ is constant and that's probably why we put it first.

-

I would add to John's answer that $a$ is not always constant. It represents the second derivative of motion, and thus is potentially a function of time. So, the overall conventional ordering in equations (in Mathematics as well as Physics) is,

$$\mathrm{Constant \times Parameter \times Variable}$$ where I'm distinguishing between, say, $G$ which is universal, and mass, which one plugs in a relevant value for. Besides, we all know, that $F=ma$ is not true.

$F= \dot{p}$ is!

-
I'd go with the terms constant, parameter, variable instead – Christoph Jan 10 '14 at 15:41
@Christoph sounds good. I'll edit to match. – Carl Witthoft Jan 10 '14 at 15:42