The principles of corrosion, based on electrochemistry, can be illustrated by an electrochemical cell, as shown in Figure 44. There are four necessary elements in order for corrosion to occur:
Since corrosion requires all four of the elements listed above, it is readily obvious that corrosion prevention or control necessitates the elimination of just one of these elements and not necessarily all four.


where
M – represents a metallic element
e – represents an electron
For the electrons to be transferred between the anode and cathode there must be an electrically conductive path, since the electrons are simultaneously consumed at the cathodic site where the reduction reaction takes place. An example of this cathodic reaction (reduction) is the evolution of a hydrogen gas from the reduction of hydrogen ions as shown in Equation 14. An example of the oxidation-reduction process is illustrated in Figure 45.


An electrolyte is also necessary to sustain the electrochemical reactions, given by Equation 13 and Equation 14, because it contains the ions that aid in driving the reactions. The reactions shown in Equation 13 and Equation 14 are only partial reactions, and thus, together they occur simultaneously and at the same rate.
Of course, it is not necessary to always have two distinct and separate electrodes for corrosion to occur. In fact, the most common form of corrosion occurs in the presence of one metal. It is still necessary, however to have the two electrodes (i.e. the anode and the cathode). In this case, localized cells or electrodes exist on the surface of the metal, where there is a relatively small difference in electrical potential ). This is usually the case where there is compositional dissimilarities on the metal surface, for example, different metal phases, different crystal orientations, crystal imperfections, grain boundaries, etc. An example of this is given in the following section. Furthermore, it is not necessary that the electrolyte be in the form of a liquid. Instead, it may exist as ions in some vaporous media.