The dissolving and wearing away of metal caused by a chemical reaction such as between water and the pipes that the water contacts, chemicals touching a metal surface, or contact between two metals.