What is the chemical formula of rust, which is formed on the surface of iron…