Commutative property

In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of the property that says or , the property can also be used in more advanced settings. The name is needed because there are operations, such as division and subtraction, that do not have it (for example, ); such operations are "not" commutative, and so are referred to as "noncommutative operations". The idea that simple operations, such as the multiplication and addition of numbers, are commutative was for many years implicitly assumed. Thus, this property was not named until the 19th century, when mathematics started to become formalized. A corresponding property exists for binary relations; a binary relation is said to be symmetric if the relation applies regardless of the order of its operands; for example, equality is symmetric as two equal mathematical objects are equal regardless of their order.
Common uses.
The "commutative property" (or "commutative law") is a property generally associated with binary operations and functions. If the commutative property holds for a pair of elements under a certain binary operation then the two elements are said to "commute" under that operation.
Mathematical definitions.
The term "commutative" is used in several related senses.
Examples.
Commutative operations in mathematics.
Two well-known examples of commutative binary operations:
Noncommutative operations in mathematics.
Some noncommutative binary operations: 
Division and subtraction.
Division is noncommutative, since formula_9.
Subtraction is noncommutative, since formula_10. However it is classified more precisely as anti-commutative, since formula_11.
Truth functions.
Some truth functions are noncommutative, since the truth tables for the functions are different when one changes the order of the operands. For example, the truth tables for and are
Function composition of linear functions.
Function composition of linear functions from the real numbers to the real numbers is almost always noncommutative. For example, let formula_12 and formula_13. Then
and
This also applies more generally for linear and affine transformations from a vector space to itself (see below for the Matrix representation).
Matrix multiplication.
Matrix multiplication of square matrices is almost always noncommutative, for example:
Vector product.
The vector product (or cross product) of two vectors in three dimensions is anti-commutative; i.e., "b" × "a" = −("a" × "b").
History and etymology.
Records of the implicit use of the commutative property go back to ancient times. The Egyptians used the commutative property of multiplication to simplify computing products. Euclid is known to have assumed the commutative property of multiplication in his book "Elements". Formal uses of the commutative property arose in the late 18th and early 19th centuries, when mathematicians began to work on a theory of functions. Today the commutative property is a well-known and basic property used in most branches of mathematics.
The first recorded use of the term "commutative" was in a memoir by François Servois in 1814, which used the word "commutatives" when describing functions that have what is now called the commutative property. The word is a combination of the French word "commuter" meaning "to substitute or switch" and the suffix "-ative" meaning "tending to" so the word literally means "tending to substitute or switch". The term then appeared in English in 1838 in Duncan Farquharson Gregory's article entitled "On the real nature of symbolical algebra" published in 1840 in the Transactions of the Royal Society of Edinburgh.
Propositional logic.
Rule of replacement.
In truth-functional propositional logic, "commutation", or "commutativity" refer to two valid rules of replacement. The rules allow one to transpose propositional variables within logical expressions in logical proofs. The rules are:
and 
where "formula_19" is a metalogical symbol representing "can be replaced in a proof with".
Truth functional connectives.
"Commutativity" is a property of some logical connectives of truth functional propositional logic. The following logical equivalences demonstrate that commutativity is a property of particular connectives. The following are truth-functional tautologies.
Set theory.
In group and set theory, many algebraic structures are called commutative when certain operands satisfy the commutative property. In higher branches of mathematics, such as analysis and linear algebra the commutativity of well-known operations (such as addition and multiplication on real and complex numbers) is often used (or implicitly assumed) in proofs.
Related properties.
Associativity.
The associative property is closely related to the commutative property. The associative property of an expression containing two or more occurrences of the same operator states that the order operations are performed in does not affect the final result, as long as the order of terms does not change. In contrast, the commutative property states that the order of the terms does not affect the final result.
Most commutative operations encountered in practice are also associative. However, commutativity does not imply associativity. A counterexample is the function
which is clearly commutative (interchanging "x" and "y" does not affect the result), but it is not associative (since, for example, formula_25 but formula_26). More such examples may be found in commutative non-associative magmas.
Symmetry.
Some forms of symmetry can be directly linked to commutativity. When a commutative operator is written as a binary function then the resulting function is symmetric across the line formula_27. As an example, if we let a function "f" represent addition (a commutative operation) so that formula_28 then formula_29 is a symmetric function, which can be seen in the adjacent image.
For relations, a symmetric relation is analogous to a commutative operation, in that if a relation "R" is symmetric, then formula_30.
Non-commuting operators in quantum mechanics.
In quantum mechanics as formulated by Schrödinger, physical variables are represented by linear operators such as formula_31 (meaning multiply by formula_31), and formula_33. These two operators do not commute as may be seen by considering the effect of their compositions formula_34 and formula_35 (also called products of operators) on a one-dimensional wave function formula_36:
According to the uncertainty principle of Heisenberg, if the two operators representing a pair of variables do not commute, then that pair of variables are mutually complementary, which means they cannot be simultaneously measured or known precisely. For example, the position and the linear momentum in the formula_31-direction of a particle are represented by the operators formula_31 and formula_40, respectively (where formula_41 is the reduced Planck constant). This is the same example except for the constant formula_42, so again the operators do not commute and the physical meaning is that the position and linear momentum in a given direction are complementary.