Group automorphism (source code)

= Group automorphism
{title2=$\alpha:G\xrightarrow{\sim}G$}

A <group automorphism> is a <bijective> <group homomorphism> $\alpha:G\to G$. It preserves the <group operation>, the <identity element>, and <inverse elements>; its inverse is another <group homomorphism>. Thus it is a <group isomorphism> with identical source and target. These maps form the <automorphism group> $\operatorname{Aut}(G)$ under <function composition>.<Group Theory (v4.01) by James S. Milne>[Chapter 3, Automorphisms of groups]{ref}

For the additive <finite cyclic group> $C_6$, take $f_5(k)=5k\pmod6$. Its output list on $0,1,2,3,4,5$ is $0,5,4,3,2,1$, a <permutation> of all six elements. It preserves <addition> because $5(a+b)=5a+5b\pmod6$, and applying it twice gives $25k=k\pmod6$. Hence it is a <group automorphism> and its own <inverse function>. Compare the collapsing $f_2$ in the figure under <endomorphism>. The general criterion under <endomorphism of a finite cyclic group> says exactly when such a map is reversible: its multiplier must be <coprime> to the size of the <finite cyclic group>.

A <permutation> need not be a <group automorphism>, even if it fixes the <identity element>. Let $\pi$ exchange $1$ and $2$ in $C_6$ and fix $0,3,4,5$. It is a <bijection>, and $\pi(0)=0$, but
$$
\pi(1+1)=\pi(2)=1,\qquad \pi(1)+\pi(1)=2+2=4\pmod6.
$$
Thus it fails to preserve <addition> and is not even a <group homomorphism>. Reversibility alone does not preserve the <group operation>.

\Image[/addition-preserving-versus-arbitrary-relabeling.png]
{title=Addition before or after relabeling: agreement and disagreement modulo six}
{description=Each panel follows the same input pair $(1,1)$ along two routes: add then relabel, or relabel each entry then add. All <addition> is modulo six. The routes agree for the <group automorphism> $f_5$; for the <permutation> exchanging $1$ and $2$, this single disagreement disproves preservation of <addition>.}
{source=addition-preserving-versus-arbitrary-relabeling.py}

A <group automorphism> carries each <cyclic subgroup> onto the <cyclic subgroup> generated by the image of its defining element, preserving the <order of a group element>. In particular, it carries a <generator of a group> to another <generator of a group>. For $C_6$, the existing calculation of <generators of a finite cyclic group> leaves only the images $1$ and $5$ for $1$, so its <automorphism group> consists exactly of the <identity function> and $f_5$. This turns the problem of compatible relabeling into a much smaller choice than enumerating arbitrary <permutations>.