What are oxidation numbers?
In the above example, when Na and Cl react to form NaCl, Na is oxidized to Na+ and Cl is reduced to Cl-. As Na and Cl are both in their original forms as elements, they both begin with a charge of zero. The amount of electrons in Na relative to the normal charge of sodium then changes from 0 to +1, while the amount of electrons in Cl relative to the normal charge of chlorine changes from 0 to -1.
This amount of electrons relative to an atom's ordinary state is called an oxidation number. All elemental forms, or individual atoms and naturally occurring diatomic forms such as O2, H2, and N2, have an oxidation number of 0.
Since a change in oxidation number means a change in the amount of electrons, redox reactions can also be defined as any reaction in which at least one participating atom's oxidation number increases, and at least one's decreases.
Atoms do not need to become ions for their oxidation number to change. When a covalent bond is formed, the more electronegative atom's oxidation number is decreased by 1, while the other atom's oxidation number is increased by 1. Oxygen is the exception to this rule, and has an oxidation number of 2 in any covalent bond. Any neutrally charged molecule's overall oxidation charges will add to 0.
For example, the oxidation number on C in pure C is 0, as it is in its elemental form, but the oxidation number on C in CH4, or carbon with four hydrogens bonded around it, is +4, while the oxidation number of each H is -1. In CO2, the oxidation number on each O is -2, meaning the oxidation number on C is again +4.
Therefore, the reaction 2H2 + C → CH4 is also a redox reaction, where C is oxidized (as its oxidation number changes from 0 to +4) and H is reduced (as its oxidation number changes from 0 to -1.)