Oxidation numbers are assigned to elements in compounds or ions to track electron transfer in redox reactions. The increase in oxidation number indicates oxidation, and the decrease indicates reduction.