"Both the initial and final substances are composed of atoms because all matter<span> is composed of atoms. According to the law of conservation of </span>matter<span>, </span>matter<span> is neither created nor destroyed, so we must have the same number and type of atoms after the </span>chemical<span> change as were present before the </span>chemical<span> change." therefore, that is how matter is conserved </span>
This means for every number of Carbon (C) atoms, there are twice as many Hydrogen (H) atoms with an additional two added onto that.
Therefore, if there is one Carbon Atom, and we multiply that by two, and then add an additional two, we get 4 Hydrogen atoms, so CH4, which is our first Formulae
Secondly, if we have eight Carbon Atoms, and we multiple that by two (16), and then add an additional two, we get 18 Hydrogen atoms, so C8H18, which is our second Formulae
The other Formulas do not follow this 'General Formula'