# Definition:Commutator

## Definition

The commutator of an algebraic structure can be considered a measure of how commutative the structure is.

### Groups

Let $\struct {G, \circ}$ be a group.

Let $g, h \in G$.

The commutator of $g$ and $h$ is the operation:

$\sqbrk {g, h} := g^{-1} \circ h^{-1} \circ g \circ h$

### Rings

Let $\struct {R, +, \circ}$ be a ring.

Let $a, b \in R$.

The commutator of $a$ and $b$ is the operation:

$\sqbrk {a, b} := a \circ b + \paren {-b \circ a}$

or more compactly:

$\sqbrk {a, b} := a \circ b - b \circ a$

### Algebras

Let $\struct {A_R, \oplus}$ be an algebra over a ring.

Consider the bilinear mapping $\sqbrk {\, \cdot, \cdot \,}: A_R^2 \to A_R$ defined as:

$\forall a, b \in A_R: \sqbrk {a, b} := a \oplus b - b \oplus a$

Then $\sqbrk {\, \cdot, \cdot \,}$ is known as the commutator of $\struct {A_R, \oplus}$.

Note that trivially if $\struct {A_R, \oplus}$ is a commutative algebra, then:

$\forall a, b \in A_R: \sqbrk {a, b} = \mathbf 0_R$