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. The commutativity of simple operations, such as multiplication and addition of numbers, was for many years implicitly assumed and the property was not named until the 19th century when mathematics started to become formalized. By contrast, division and subtraction are not commutative.
Common uses
The commutative property (or commutative law) is a property associated with binary operations and functions. Similarly, if the commutative property holds for a pair of elements under a certain binary operation then it is said that the two elements commute under that operation.
Propositional logic
Rule of replacement
In standard truthfunctional propositional logic, commutation,^{[1]}^{[2]} or commutivity^{[3]} are two valid rules of replacement. The rules allow one to transpose propositional variables within logical expressions in logical proofs. The rules are:
 (P \or Q) \Leftrightarrow (Q \or P)
and
 (P \and Q) \Leftrightarrow (Q \and P)
where "\Leftrightarrow" is a metalogical symbol representing "can be replaced in a proof with."
Truth functional connectives
Commutativity is a property of some logical connectives of truthfunctional propositional logic. The following logical equivalences demonstrate that commutativity is a property of particular connectives. The following are truthfunctional tautologies.
Commutativity of conjunction
 (P \and Q) \leftrightarrow (Q \and P)
Commutativity of disjunction
 (P \or Q) \leftrightarrow (Q \or P)
Commutativity of implication (also called the Law of permutation)
 (P \to (Q \to R)) \to (Q \to (P \to R))
Commutativity of equivalence (also called the Complete commutative law of equivalence)
 (P \leftrightarrow Q) \leftrightarrow (Q \leftrightarrow P)
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.^{[4]}^{[5]}^{[6]}
Mathematical definitions
The term "commutative" is used in several related senses.^{[7]}^{[8]}
1. A binary operation * on a set S is called commutative if:
 x * y = y * x\qquad\mbox{for all }x,y\in S
An operation that does not satisfy the above property is called noncommutative.
2. One says that x commutes with y under * if:
 x * y = y * x \,
3. A binary function f \colon A \times A \to B is called commutative if:
 f(x, y) = f(y, x)\qquad\mbox{for all }x,y\in A
History and etymology
The first known use of the term was in a French Journal published in 1814
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.^{[9]}^{[10]} Euclid is known to have assumed the commutative property of multiplication in his book Elements.^{[11]} 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,^{[12]}^{[13]} 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 Philosophical Transactions of the Royal Society in 1844.^{[12]}
Related properties
Graph showing the symmetry of the addition function
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 doesn't change. In contrast, the commutative property states that the order of the terms does not affect the final result
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 y = x. As an example, if we let a function f represent addition (a commutative operation) so that f(x,y) = x + y then f is a symmetric function, which can be seen in the image on the right.
For relations, a symmetric relation is analogous to a commutative operation, in that if a relation R is symmetric, then a R b \Leftrightarrow b R a.
Examples
Commutative operations in everyday life
 Putting on socks resembles a commutative operation, since which sock is put on first is unimportant. Either way, the result (having both socks on), is the same.
 The commutativity of addition is observed when paying for an item with cash. Regardless of the order the bills are handed over in, they always give the same total.
Commutative operations in mathematics
Two wellknown examples of commutative binary operations are:^{[7]}
 The addition of real numbers, which is commutative since

 y + z = z + y \qquad\mbox{for all }y,z\in \mathbb{R}
 For example 4 + 5 = 5 + 4, since both expressions equal 9.

 y z = z y \qquad\mbox{for all }y,z\in \mathbb{R}
 For example, 3 5 = 5 3, since both expressions equal 15.
 Further examples of commutative binary operations include addition and multiplication of complex numbers, addition and scalar multiplication of vectors, and intersection and union of sets.
Noncommutative operations in everyday life
 Concatenation, the act of joining character strings together, is a noncommutative operation. For example
 EA + T = EAT \neq TEA = T + EA
 Washing and drying clothes resembles a noncommutative operation; washing and then drying produces a markedly different result to drying and then washing.
 Rotating a book 90 around a vertical axis then 90 around a horizontal axis produces a different orientation than when the rotations are performed in the opposite order.
 The twists of the Rubik's Cube are noncommutative. This can be studied using group theory.
Noncommutative operations in mathematics
Some noncommutative binary operations are:^{[14]}

Subtraction is not commutative since 01\neq 10
 Division is noncommutative since 1/2\neq 2/1
 Matrix multiplication is noncommutative since
 \begin{bmatrix} 0 & 2 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} 0 & 1 \\ 0 & 1 \end{bmatrix} \neq \begin{bmatrix} 0 & 1 \\ 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 0 & 1 \end{bmatrix}
 The vector product (or cross product) of two vectors in three dimensions is anticommutative, i.e., b × a = (a × b).
Mathematical structures and commutativity
 A commutative semigroup is a set endowed with a total, associative and commutative operation.
 If the operation additionally has an identity element, we have a commutative monoid
 An abelian group, or commutative group is a group whose group operation is commutative.^{[5]}
 A commutative ring is a ring whose multiplication is commutative. (Addition in a ring is always commutative.)^{[15]}
 In a field both addition and multiplication are commutative.^{[16]}
Noncommuting operators in quantum mechanics
In quantum mechanics as formulated by Schr dinger, physical variables are represented by linear operators such as x (meaning multiply by x), and d/dx. These two operators do not commute as may be seen by considering the effect of their products x(d/dx) and (d/dx)x on a onedimensional wave function (x):

 x{d\over dx}\psi = x\psi' \neq {d\over dx}x\psi = \psi + x\psi'
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 of a particle are represented respectively (in the xdirection) by the operators x and ( /i)d/dx (where is the reduced Planck constant). This is the same example except for the constant ( /i), so again the operators do not commute and the physical meaning is that the position and linear momentum in a given direction are complementary.
See also
 Anticommutativity
 Binary operation
 Commutant
 Commutative diagram
 Commutative (neurophysiology)
 Commutator
 Distributivity
 Particle statistics (for commutativity in physics)
Notes
References
Books
 Abstract algebra theory. Covers commutativity in that context. Uses property throughout book.
 Abstract algebra theory. Uses commutativity property throughout book.
 Linear algebra theory. Explains commutativity in chapter 1, uses it throughout.
Articles
 Article describing the mathematical ability of ancient civilizations.
 Robins, R. Gay, and Charles C. D. Shute. 1987. The Rhind Mathematical Papyrus: An Ancient Egyptian Text. London: British Museum Publications Limited. ISBN 0714109444
 Translation and interpretation of the Rhind Mathematical Papyrus.
Online resources
 Krowne, Aaron, , Accessed 8 August 2007.
 Definition of commutativity and examples of commutative operations
 , Accessed 8 August 2007.
 Explanation of the term commute

Yark. , Accessed 8 August 2007
 Examples proving some noncommutative operations
 Article giving the history of the real numbers
 Page covering the earliest uses of mathematical terms
 Biography of Francois Servois, who first used the term
af:Kommutatiewe bewerking ar: bg: bs:Komutativnost ca:Propietat commutativa cs:Komutativita da:Kommutativitet de:Kommutativgesetz et:Kommutatiivsus el: es:Conmutatividad eo:Komuteco fa: fr:Loi commutative gd:Coiomlaideachd gl:Conmutatividade ko: hi: hr:Komutativnost is:V xlregla it:Commutativit he: kk: lv:Komutativit te lt:Komutatyvumas hu:Kommutativit s ms:Kalis tukar tertib nl:Commutativiteit ja: no:Den kommutative lov nn:Kommutativitet pl:Przemienno pt:Comutatividade ro:Comutativitate ru: simple:Commutative property sk:Komutat vnos sl:Komutativnost sr: sh:Komutativnost fi:Vaihdannaisuus sv:Kommutativitet ta: th: tr:De i me zelli i uk: ur:Commutativity vi:Giao ho n zh:
