The chemistry is simple to understand. Coal is comprised of roughly one carbon atom for every hydrogen atom. Petroleum is comprised of one carbon atom for every two hydrogen atoms. And natural gas, or rather, its main component, methane, has four hydrogen atoms to one carbon atom, hence its molecular expression as CH4.