The interaction between a material and its environment that results in a degradation of the physical, mechanical, or even esthetic properties of that material is called corrosion. More specifically, corrosion is usually associated with a change in the oxidation state of a metal, oxide, or semiconductor.
Electrolytic corrosion consists of two partial processes: an anodic (oxidation) and cathodic (reduction) reaction (see illustration). In the absence of any external voltages, the rates of the anodic and cathodic reactions are equal, and there is no external flow of current. The loss of metal, as the result of the anodic reaction can be represented by equation .
This reaction represents the oxidation of a metal (M) from the elemental (zero valence) state to an oxidation state of Mn+ with the generation of n moles of electrons (e−). The anodic reaction may occur uniformly over a metal surface or may be localized to a specific area. If the dissolved metal ion can react with the solution to form an insoluble compound, then a buildup of corrosion products may accumulate at the anodic site which in turn can hinder the corrosion process in some cases.
In the absence of any applied voltage, the electrons generated by the anodic reaction  are consumed by the cathodic reaction. For most practical situations, the cathodic reaction is either the hydrogen-evolution reaction or the oxygen-reduction reaction. The hydrogen-evolution reaction can be summarized as reaction .
In this case, protons (H+) combine with electrons to form molecules of hydrogen (H2). This reaction is often the dominant cathodic reaction in systems at low pH. The hydrogen-evolution reaction can itself cause corrosion-related problems, since atomic hydrogen (H) may enter the metal, causing embitterment, a phenomenon that results in an attenuation of the mechanical properties and can cause catastrophic failure.
The second important cathodic reaction is the oxygen-reduction, given by reactions  and .
Diagram of a corrosion cell showing the anodic and cathodic partial processes.
Reactions 4 and 5 take place in acidic and alkaline solutions, respectively. This cathodic reaction is usually dominant in solutions of neutral and alkaline pH. In order for this reaction to proceed, a supply of dissolved oxygen is necessary; hence the rate of this reaction is usually limited by the transport of oxygen to the metal surface.
Reactions (2)–(4) represent the overall reactions which, in practice, may occur by a sequence of reaction steps. In addition, the reaction sequence may be dependent upon the metal surface, resulting in significantly different rates of the overall reaction. The cathodic reactions are important to corrosion processes since many methods of corrosion control depend on altering the cathodic process. Although the cathodic reactions may be related to corrosion processes which are usually unwanted, they are essential for many applications such as energy storage and generation.
Corrosion rates are usually expressed in terms of loss of thickness per unit time. General corrosion rates may vary from on the order of centimeters per year to micrometers per year. Relatively large corrosion rates may be tolerated for some large structures, whereas for other structures small amounts of corrosion may result in catastrophic failure. For example, with the advent of technology for making extremely small devices, future generations of integrated circuits will contain components that are on the order of nanometers (10−9 m) in size, and even small amounts of corrosion could cause a device failure.
In some situations, corrosion may occur only at localized regions on a metal surface. This type of corrosion is characterized by regions of locally severe corrosion, although the general loss of thickness may be relatively small. Pitting corrosion is usually associated with passive metals, although this is not always the case. Pit initiation is usually related to the local breakdown of a passive film and can often be related to the presence of halide ions in solution.
An example of pitting corrosion
Crevice corrosion occurs in restricted or occluded regions, such as at a bolted joint, and is often associated with solutions that contain halide ions. Crevice corrosion is initiated by a depletion of the dissolved oxygen in the restricted region. As the supply of oxygen within the crevice is depleted, because of cathodic oxygen reduction, the metal surface within the crevice becomes activated, and the anodic current is balanced by cathodic oxygen reduction from the region adjacent to the crevice. The ensuing reactions within the crevice are the same as those described for pitting corrosion: halide ions migrate to the crevice, where they are then hydrolyzed to form metal hydroxides and hydrochloric acid.
Corrosion of carbon steel in acidic environment
Corrosion can also be accelerated in situations where two dissimilar metals are in contact in the same solution. This form of corrosion is known as galvanic corrosion. The metal with the more negative potential becomes the anode, while the metal with the more positive potential sustains the cathodic reaction. In many cases the table of equilibrium potential can be used to predict which metal of galvanic couple will corrode. For example, aluminum-graphite composites generally exhibit poor corrosion resistance since graphite has a positive potential and aluminum exhibits a highly negative potential. As a result, in corrosive environments the aluminum will tend to corrode while the graphite remains unaffected.
Stress corrosion cracking and hydrogen embrittlement are corrosion-related phenomena associated with the presence of a tensile stress. Stress corrosion cracking results from a combination of stress and specific environmental conditions so that localized corrosion initiates cracks that propagate in the presence of stress. Mild steels are susceptible to stress corrosion cracking in environments containing hydroxyl ions (OH−; often called caustic cracking) or nitrate ions (NO3−). Austenitic stainless steels are susceptible in the presence of chloride ions (Cl−) and hydroxyl ions (OH−). Other alloys that are susceptible under specific conditions include certain brasses, aluminum and titanium alloys. Hydrogen embrittlement is caused by the entry of hydrogen atoms into a metal or alloy, resulting in a loss of ductility or cracking if the stress level is sufficiently high. The source of the hydrogen is usually from corrosion (that is, cathodic hydrogen evolution) or from cathodic polarization. In these cases the presence of certain substances in the metal or electrolyte can enhance the amount of hydrogen entry into the alloy by poisoning the formation of molecular hydrogen.
A reduction in the rate of corrosion is usually achieved through consideration of the materials or the environment. Materials selection is usually determined by economic constraints. The corrosion resistance of a specific metal or alloy may be limited to a certain range of pH, potential, or anion concentration. As a result, replacement metal or alloy systems are usually selected on the basis of cost for an estimated service lifetime. Also employing of proper corrosion inhibitors can reduce the corrosion rate substantially.