# Mapping to Square is Endomorphism iff Abelian

## Theorem

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

Let $\phi: G \to G$ be defined as:

$\forall g \in G: \map \phi g = g \circ g$

Then $\struct {G, \circ}$ is abelian if and only if $\phi$ is a (group) endomorphism.

## Proof

### Necessary Condition

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

Let $a, b \in G$ be arbitrary.

Then:

 $\displaystyle \map \phi {a \circ b}$ $=$ $\displaystyle \paren {a \circ b} \circ \paren {a \circ b}$ Definition of $\phi$ $\displaystyle$ $=$ $\displaystyle a \circ \paren {b \circ a} \circ b$ Group Axiom $\text G 1$: Associativity $\displaystyle$ $=$ $\displaystyle a \circ \paren {a \circ b} \circ b$ Definition of Abelian Group: Commutativity $\displaystyle$ $=$ $\displaystyle \paren {a \circ a} \circ \paren {b \circ b}$ Group Axiom $\text G 1$: Associativity $\displaystyle$ $=$ $\displaystyle \map \phi a \circ \map \phi b$ Definition of $\phi$

As $a$ and $b$ are arbitrary, the above holds for all $a, b \in G$.

Thus $\phi$ is a group homomorphism from $G$ to $G$.

So by definition, $\phi$ is a group endomorphism.

$\Box$

### Sufficient Condition

Let $\phi: G \to G$ as defined above be a group endomorphism.

Then:

 $\, \displaystyle \forall a, b \in G: \,$ $\displaystyle \map \phi {a \circ b}$ $=$ $\displaystyle \map \phi a \circ \map \phi b$ Definition of Group Endomorphism $\displaystyle \leadsto \ \$ $\, \displaystyle \forall a, b \in G: \,$ $\displaystyle \paren {a \circ b} \circ \paren {a \circ b}$ $=$ $\displaystyle \paren {a \circ a} \circ \paren {b \circ b}$ Definition of $\phi$ $\displaystyle \leadsto \ \$ $\, \displaystyle \forall a, b \in G: \,$ $\displaystyle a \circ \paren {b \circ a} \circ b$ $=$ $\displaystyle a \circ \paren {a \circ b} \circ b$ Group Axiom $\text G 1$: Associativity $\displaystyle \leadsto \ \$ $\, \displaystyle \forall a, b \in G: \,$ $\displaystyle b \circ a$ $=$ $\displaystyle a \circ b$ Cancellation Laws

Thus, by definition, $G$ is an abelian group.

$\blacksquare$