Class two implies commutator map is endomorphism

Statement with left-action convention
Suppose $$G$$ is a nilpotent group whose nilpotency class is two. Then, for any element $$x \in G$$, the maps:

$$\! y \mapsto [x,y]$$

and:

$$\! y \mapsto [y,x]$$

are endomorphisms of $$G$$. Here:

$$\! [x,y] = xyx^{-1}y^{-1}$$

These endomorphisms map to inverse elements, so their images coincide.

The image of these endomorphism lie in the derived subgroup of $$G$$, hence in the center of $$G$$, so it is abelian. The kernel of this endomorphism contains the center of the group, more specifically, it is the centralizer of $$x$$ in $$G$$.

Statement with right-action convention
Suppose $$G$$ is a nilpotent group whose nilpotency class is two. Then, for any element $$x \in G$$, the maps:

$$\! y \mapsto [x,y]$$

and:

$$\! y \mapsto [y,x]$$

are endomorphisms of $$G$$. Here:

$$\! [x,y] = x^{-1}y^{-1}xy$$

These endomorphisms map to inverse elements, so their images coincide.

The image of these endomorphism lie in the derived subgroup of $$G$$, hence in the center of $$G$$, so it is abelian. The kernel of this endomorphism contains the center of the group, more specifically, it is the centralizer of $$x$$ in $$G$$.

Statement in terms of cocycles

 * Skew of 2-cocycle for trivial group action of abelian group is alternating bihomomorphism

Converse

 * Commutator map is endomorphism for every element implies class two
 * Commutator map for an element is an endomorphism iff the element is in the second center

Other related facts

 * Formula for commutator of element and product of two elements
 * Subgroup normalizes its commutator with any subset

Analogues in other algebraic structures

 * Inner derivation implies endomorphism for class two Lie ring

Applications

 * Frattini-in-center p-group implies commutator subgroup is elementary abelian
 * Equivalence of definitions of special group
 * Frattini-in-center odd-order p-group implies p-power map is endomorphism

Proof with the left-action convention
Given: A group $$G$$ of nilpotency class two, an element $$x \in G$$

To prove: The map $$y \mapsto [x,y]$$ is an endomorphism of $$G$$

Proof: It suffices to show that if $$y_1,y_2 \in G$$, then:

$$[x,y_1y_2] = [x,y_1][x,y_2]$$

The crucial fact we use is that since $$G$$ has nilpotency class two, the commutator $$[x,y_2]$$ is in the center, and hence it commutes with $$y_1$$.

Thus:

$$[x,y_2] = y_1[x,y_2]y_1^{-1} = y_1xy_2x^{-1}y_2^{-1}y_1^{-1}$$

Plugging this in, we get:

$$[x,y_1y_2] = xy_1x^{-1}y_1^{-1}y_1xy_2x^{-1}y_2^{-1}y_1^{-1} = xy_1y_2x^{-1}y_2^{-1}y_1^{-1} = [x,y_1y_2]$$

(an analogous proof works with the other convention for commutators).