When iron is exposed to air, it accumulates a brown colour substance on its surface. This compound is chemically known as hydrates of iron oxide with general formula Fe2O3.nH2O. It is called rust.
The chemical formula for rust is Fe2O3.xH2O where x is variable.
The chemical equation for rusting of iron:
4Fe + 3O2 + 2xH2O → 2 Fe2O3 .xH2O
(i) Oiling, greasing, or painting: By applying oil, grease, or paint, the surface becomes water proof and the moisture and oxygen present in the air cannot come into direct contact with iron. Hence, rusting is prevented.
(ii) Galvanisation: An iron article is coated with a layer of zinc metal, which prevents the iron to come in contact with oxygen and moisture. Hence, rusting is prevented.