Endomorphism (source code)

= Endomorphism
{title2=$\operatorname{End}_{\mathcal C}(X)$}
{wiki}

An <endomorphism> is a <morphism> $f:X\to X$: its source and target are the same object, with the same specified structure. For a <group> it is an operation-preserving <group homomorphism> back into that <group>; for a <vector space> it is a <linear endomorphism>; for a <ring> it is a <ring endomorphism>. A self-map must satisfy the chosen compatibility conditions to qualify. The notation $\operatorname{End}_{\mathcal C}(X)$ records the <category> $\mathcal C$ in which these conditions are imposed. See https://emilyriehl.github.io/files/context.pdf[Riehl, Category Theory in Context, Definition 1.1.10 and the following paragraph].

An <endomorphism> can lose information or miss part of its target. On the additive <integers>, $d(k)=2k$ preserves <addition> and is <injective>, but is not <surjective>: no <integer> maps to $1$. On the <vector space> $\mathbb R^2$ over the <real numbers>, the <linear endomorphism> $P(x,y)=(x,0)$ loses the second coordinate, so it is neither <injective> nor <surjective>. Neither is an <automorphism>. The same doubling rule becomes a <group isomorphism> when its target is the additive <even integers>, as explained under <isomorphism>.

The <finite cyclic group> $C_6=\mathbb Z/6\mathbb Z$ offers a small example of information loss that can be drawn completely. With <addition> in <modular arithmetic>, the <endomorphism> $f_2(k)=2k\pmod6$ sends the inputs $0,1,2,3,4,5$ to $0,2,4,0,2,4$. Its <image of a group homomorphism> is $\{0,2,4\}$ and its <kernel of a group homomorphism> is $\{0,3\}$. Each reached output has two inputs; the other three outputs are missed.

\Image[/cyclic-group-endomorphism-maps.png]
{title=Two endomorphisms of the additive cyclic group modulo six}
{description=Every arrow maps an input to its output, rather than taking one step of repeated <addition>. The <endomorphism> $f_2(k)=2k\pmod6$ collapses pairs; the <group automorphism> $f_5(k)=5k\pmod6$ is a <bijection>. Orange marks the <kernel of a group homomorphism> in each panel.}
{source=cyclic-group-endomorphism-maps.py}

For an <endomorphism> of a <group> or <ring> with a finite underlying <set>, <injectivity> is equivalent to <surjectivity> by counting; either condition makes it an <automorphism>. The additive <integers> example shows why the finiteness assumption matters. A <linear endomorphism> of a finite-dimensional <vector space> also has equivalent <injectivity> and <surjectivity>, this time by the <rank-nullity theorem> even when its underlying <set> is infinite.

Self-maps can be iterated without changing the object: $f^2=f\circ f$, $f^3=f\circ f\circ f$, and so on. <Composition in a category> and the <identity morphism> make the <endomorphisms> of a fixed object in a <locally small category> into a <monoid>. This packages repeated compatible operations, including irreversible ones, into a single structure.

The general language has a documented historical milestone in the 1945 paper of <Samuel Eilenberg> and <Saunders Mac Lane>. They defined <categories> of objects and compatible maps, and distinguished maps admitting inverses within that <category>. Their examples included <groups>, <vector spaces>, and <topological spaces>. This gave a common framework for compatible self-maps and their invertible cases. See https://people.math.osu.edu/cogdell.1/6112-Eilenberg%26MacLane-www.pdf[Eilenberg and Mac Lane, General Theory of Natural Equivalences, pp. 234 and 237–239].