# Why is methane's molecular formula conventionally “CH₄”, while water is “H₂O” (among others)?

While revisiting some of my old notes about the Miller-Urey experiment, I stumbled across the "equation"...

Electricity + $\ce{CH4~/~ NH3~/~H2O~/~CO}$ = Amino Acids

This got me thinking.

Conventionally, why are molecules like $\ce{CH4}$ and $\ce{NH3}$'s molecular formula written differently (in H placement) than others like $\ce{H2O}$ and $\ce{HF}$? Is there a particular reason, or did it just happen to be?

NOTE: I realize the $\ce{H4C}$ or $\ce{H3N}$ make perfect sense, especially when drawing out molecules. It's just that these are rarely used in literature.

By convention, if a binary hydride is more acidic than water, then they are written in the form $\ce{H}_{\text{n}}\ce{X}$. If a binary hydride is less acidic than water, they are written as $\ce{YH}_{\text{n}}$. It so happens that this changeover neatly divides the periodic table. Binary hydrides from groups 16 and 17 (VIA and VIIA) are written with the hydrogen atoms first: $\ce{H2O,~H2S,~H2Se,~H2Te,~HF,~HCl,~HBr,~HI}$.
Binary hydrides from groups 1 (IA) through 15 (VIA) are all written with the hydrogen atoms last, regardless of whether the hydride is ionic $(\ce{LiH,~NaH,~KH,~CaH2})$ or molecular $(\ce{BH3,~CH4,~SiH4,~NH3,~PH3})$.
This notation is in keeping with that for more complex compounds. If the compound is an acid, the acidic hydrogen atoms are put at the from of the formula, while nonacidic hydrogen atoms are placed in the main part of the formula. For example, the hydrogen atoms in phosphoric acid $(\ce{H3PO4})$ are considered acidic and the hydrogen atoms in octane $(\ce{C8H18})$ are not. Acetic acid $(\ce{HC2H3O2})$ has one hydrogen atom that is considered acidic and three that are not, this the formula $\ce{HC2H3O2}$ is considered more helpful than $\ce{C2H4O2}$, although both are "correct" by different sets of rules.
• Note, as an exception, organic acids are often written with acidic hydrogens last, as a convention of indicating carboxyl groups, e.g. $\ce{CH3COOH}$ instead of $\ce{HC2H3O2}$ – khaverim Feb 12 '17 at 4:48
• @khaverim - true. Mind you, I most often write $\ce{HOAc}$. – Ben Norris Feb 12 '17 at 12:28