Canonical: https://knowlpedia.com/algebra-groups/commutator/

# Commutator

The element g⁻¹h⁻¹gh, which is trivial exactly when g and h commute.

Let \(G\) be a [group](https://knowlpedia.com/algebra-groups/group/) and let \(g,h\in G\). The **commutator** of \(g\) and \(h\) is
\[
[g,h]=g^{-1}h^{-1}gh.
\]

## Convention

Some authors instead define \([g,h]=ghg^{-1}h^{-1}\). Statements involving explicit commutator formulas must therefore be checked against the convention in use.

## Remarks

The commutator satisfies \([g,h]=e\) if and only if \(gh=hg\). In particular, if \(g\) lies in the [center](https://knowlpedia.com/algebra-groups/center-of-group/) of \(G\), then \([g,h]=e\) for all \(h\in G\). The subgroup generated by all commutators is the [commutator subgroup](https://knowlpedia.com/algebra-groups/commutator-subgroup/); a group is [abelian](https://knowlpedia.com/algebra-groups/abelian-group/) if and only if all commutators are trivial.

## Examples

- In any abelian group, \([g,h]=e\) for all \(g,h\).
- In \(S_3\) (with \([g,h]=g^{-1}h^{-1}gh\)), if \(g=(12)\) and \(h=(23)\), then \([g,h]=(132)\neq e\), so \(g\) and \(h\) do not commute.
- If \(g=h\), then \([g,g]=e\) in every group.
