In a chemical substance , the elements are always present in definite proportions by mass
Imagine if we have water , water is made up of 2 hydrogen atoms and one oxygen atom , this chemical formula is similar even if the water is from lake , sea , dam , pipe water , sewer water and even drinking water , all the chemical formula of water is same H20
Example
Imagine if we have h20 , Hydrogen + Hydrogen + ( Oxygen ) = H20 , now if we want to calculate the amu of them to make a ratio , here is how it is done :
Hydrogen + Hydrogen ( AMU - Atomic mass unit ) - 2 , Hydrogen only have one proton thus 2 hydrogen provide a amu of 2
Oxygen ( AMU - Atomic ma unit ) - 16 , Oxygen have 8 protons and 8 neutrons which gives an atomic mass of 16
The ratio of h20 will be 16 : 2 , if we simplify this we will get 8 : 1 , this would be the ratio of any mass of a substance in any different form