Chemistry - Why do we write NH3?
Solution 1:
According to current nomenclature rules, $\ce{H3N}$ would be correct and acceptable. However some chemical formulas, like $\ce{NH3}$ for ammonia, that were in use long before the rules came out, are still accepted today.
Solution 2:
The atomic symbols in a formula may be ordered in various ways. For example, the electronegativity criterion is most often used in binary species (for intermetallic compounds, however, older recommendations prescribed alphabetical ordering rather than by electronegativity).
Section IR-4.4.2.1 of Nomenclature of Inorganic Chemistry – IUPAC Recommendations 2005 (Red Book) explains what is meant by the ordering principles ‘electronegativity’:
IR-4.4.2.1 Electronegativity
If electronegativity is taken as the ordering principle in a formula or a part of a formula, the atomic symbols are cited according to relative electronegativities, the least electronegative element being cited first. For this purpose, Table VI is used as a guide. By convention, the later an element occurs when the table is traversed following the arrows, the more electropositive is the element.
This table is also included in the IUPAC Technical Report Brief guide to the nomenclature of inorganic chemistry. Pure Appl. Chem. 2015, 87(9–10), 1039–1049 as well as in the corresponding four-sided lift-out document, which is available as supplementary material.
Note that hydrogen is placed between the elements of group 16 and the elements of group 15.
Therefore, all the following examples are consistent with the above convention:
$\ce{HF}$
$\ce{HCl}$
$\ce{HBr}$
$\ce{HI}$
$\ce{H2O}$
$\ce{H2S}$
$\ce{NH3}$
$\ce{CH4}$
Note that, according to this convention, the formula for the hydroxide ion should be $\ce{HO-}$ (not $\ce{OH-}$).
Solution 3:
The answer of this question lies in the nomenclature of the late 1700’s when chemical knowledge was primitive. At the time, most chemists agreed on a class of acrid substances, for example vinegar, called “acids”. Another class of substances reacted with acids to form the “base” of compounds.
When systematizing these compounds, Lavoisier came up with the word oxygen by combining roots which translated meant “to generate acid” because he thought oxygen was used to form acid. Acid was also thought to be formed by hydrogen as well. Most of the early chemical formulas for compounds specified both hydrogen and oxygen as the acid forming component.
It was not discovered until 1832 hydrogen, unlike all of the other known elemental gases, shared a property with metal: it was electro-positive. So in the late 1800’s the nomenclature debate surfaced. Some of the old nomenclature was kept so the opposite nature of acids and bases was reflected in the nomenclature. This nomenclature was said to facilitate understanding of molecules combining and breaking apart.
As an example, notice how the nomenclature in the following reaction suggests two molecules with opposite properties are sticking together.
$$\ce{ NH3 + HCl -> NH4Cl }$$
The short answer would be early chemist developing nomenclature did not have modern understanding of hydrogen, so hydrogen often was placed in the same location of formulations as oxygen in similar compounds.
Sources:
Williamson. Remarks on Chemical Nomenclature and Notation. J. Chem. Soc. 1864, 17, 421–432.
Robert Kane, John William Draper, Elements of chemistry, page 152.