For example, magnesium oxide is made up of two elements, magnesium and oxygen. Its formula is MgO. This shows that it has one atom of magnesium for every one atom of oxygen.