In mathematics, commutativity applies to operations such as addition and multiplication of whole numbers, integers, and rational numbers but does not hold for subtraction and division. This section explores the commutative property across different number sets with examples.