In mathematics, the commutator gives an indication of the extent to which a certain binary operation fails to be commutative. There are different definitions used in group theory and ring theory. e A B e − A = B + [ A , B ] + 1 2 ! [ A , [ A , B ] ] + 1 3 ! [ A , [ A , [ A , B ] ] ] + ⋯ = e ad A ( B ) . {displaystyle e^{A}Be^{-A} = B++{frac {1}{2!}}]+{frac {1}{3!}}]]+cdots = e^{operatorname {ad} _{A}}(B).} e A e B e − A e − B = exp ( [ A , B ] + 1 2 ! [ A + B , [ A , B ] ] + 1 3 ! ( 1 2 [ A , [ B , [ B , A ] ] ] + [ A + B , [ A + B , [ A , B ] ] ] ) + ⋯ ) . {displaystyle e^{A}e^{B}e^{-A}e^{-B} = exp !left(+{frac {1}{2!}}]+{frac {1}{3!}}left({frac {1}{2}}]]+]] ight)+cdots ight).} ad x 2 ( z ) = ad x ( ad x ( z ) ) = [ x , [ x , z ] ] . {displaystyle operatorname {ad} _{x}^{2}!(z) = operatorname {ad} _{x}!(operatorname {ad} _{x}!(z)) = ,].} In mathematics, the commutator gives an indication of the extent to which a certain binary operation fails to be commutative. There are different definitions used in group theory and ring theory. The commutator of two elements, g and h, of a group G, is the element and is equal to the group's identity if and only if g and h commute (that is, if and only if gh = hg). The set of all commutators of a group is not in general closed under the group operation, but the subgroup of G generated by all commutators is closed and is called the derived group or the commutator subgroup of G. Commutators are used to define nilpotent and solvable groups and the largest abelian quotient group.