Let GG be a and let g,h∈Gg,h\in G. The commutator of gg and hh is

[g,h]=g−1h−1gh.[g,h]=g^{-1}h^{-1}gh.
Convention

Some authors instead define [g,h]=ghg−1h−1[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[g,h]=e if and only if gh=hggh=hg. In particular, if gg lies in the of GG, then [g,h]=e[g,h]=e for all h∈Gh\in G. The subgroup generated by all commutators is the ; a group is if and only if all commutators are trivial.

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