# Commutative law

A link is commutative if it always holds. This figure uses the idea of ​​an operation as a machine that turns two inputs into one result. If the link is commutative, then it doesn't matter in which order the inputs and occur - the result is the same as .${\ displaystyle \ circ}$ ${\ displaystyle x \ circ y = y \ circ x}$${\ displaystyle x}$${\ displaystyle y}$${\ displaystyle x \ circ y}$${\ displaystyle y \ circ x}$

The commutative law ( Latin commutare "to swap"), in German law of exchange, is a rule from mathematics . If it holds, the arguments of an operation can be swapped without changing the result. Mathematical operations that are subject to the commutative law are called commutative.

The commutative law forms the basic rules of algebra with the associative law and the distributive law .

## Formal definition

Let there be and quantities. A binary connection is called commutative if the equality applies to all . ${\ displaystyle A}$${\ displaystyle X}$ ${\ displaystyle * \ colon A \ times A \ to X, \; (a, b) \ mapsto a * b}$${\ displaystyle a, b \ in A}$${\ displaystyle a * b = b * a}$

## Examples and counterexamples

The vector addition is commutative because is.${\ displaystyle {\ vec {a}} + {\ vec {b}} = {\ vec {b}} + {\ vec {a}}}$

### Real numbers

The addition of natural numbers is commutative.

For real numbers it always holds ${\ displaystyle a, b \ in \ mathbb {R}}$

${\ displaystyle a + b = b + a}$

and

${\ displaystyle a \ cdot b = b \ cdot a}$,

the operations of addition and multiplication are commutative. The first formula is also called the commutative law of addition, the second commutative law of multiplication . The subtraction and division of real numbers, on the other hand, are not commutative operations. The exponentiation is also not commutative ( is a counterexample). ${\ displaystyle 2 ^ {3} \ neq 3 ^ {2}}$

The oldest known form of the commutative law of addition is the Sumerian fable of the clever wolf and the nine stupid wolves .

### Scalar products

• The scalar product in a real vector space is commutative, so it always holds .${\ displaystyle \ langle a, b \ rangle = \ langle b, a \ rangle}$
• The scalar product in a complex vector space, on the other hand, is not commutative, rather it applies , with the overline denoting the complex conjugation .${\ displaystyle \ langle a, b \ rangle = {\ overline {\ langle b, a \ rangle}}}$

### Set operation

In set theory , union and intersection are commutative operations; for sets the following always applies: ${\ displaystyle A, B}$

${\ displaystyle A \ cup B = B \ cup A}$ (Union)
${\ displaystyle A \ cap B = B \ cap A}$ (Cut)

In contrast, the difference is not commutative. and so are sometimes different amounts, e.g. B. for and , because then would be and . ${\ displaystyle A \ setminus B}$${\ displaystyle B \ setminus A}$${\ displaystyle A = \ {1,2 \}}$${\ displaystyle B = \ {2 \}}$${\ displaystyle A \ setminus B = \ {1 \}}$${\ displaystyle B \ setminus A = \ emptyset}$

### Matrix calculation

The addition of matrices over a ring or body is commutative. The matrix multiplication is not commutative, however: Although the factors are sometimes, but not always interchangeable.

The multiplication of matrices by scalars and the matrix multiplication in the sub-ring of the diagonal matrices are also commutative .

### Group theory

In general, a group in which the connection of group elements is commutative is called Abelian .

### Propositional logic

In propositional logic applies to the connectives :

• ${\ displaystyle \ vee}$ ("Or") is commutative.
• ${\ displaystyle \ land}$ (“And”) is commutative.
• ${\ displaystyle \ leftrightarrow}$(" Logical equivalence ") is commutative.
• ${\ displaystyle \ rightarrow}$("If ..., then ..."; see implication ) is not commutative.

### Further examples

Further examples of non-commutative operations are the cross product in vector spaces or the multiplication of quaternions .

Commutativity is also an important basic property in quantum mechanics , the commutation of two observables physically means that they can be measured precisely at the same time. Not all observables commute.

## Anti-commutativity

In some structures with two operations, for example the cross product in vector spaces, the commutative law does not apply, but instead a kind of opposite of it: ${\ displaystyle \ times}$

${\ displaystyle a \ times b = - (b \ times a)}$.

More generally, the product on a Lie algebra written as satisfies anti-commutativity. ${\ displaystyle [a, b]}$

## Remarks

Symmetrical relation

The commutativity, which allows the exchange of arguments in an operation , is similar to the symmetry property of relations, which allows the exchange of the compared elements with regard to the relation : if and only if . ${\ displaystyle xRy}$${\ displaystyle yRx}$

Flexibility Act

The Flexibility Act offers an alternative possibility of "bracketing" for a link : ${\ displaystyle *}$

${\ displaystyle a * \ left (b * a \ right) = \ left (a * b \ right) * a}$