Reading the Wikipedia article about morphisms (under split monomorphism) I stumbled upon this equation describing idempotenty:
$$(f . g)^2 = g . (f . g) . f = f . g$$
How can this definition be expanded two $(f . g . h)^2$
Reading the Wikipedia article about morphisms (under split monomorphism) I stumbled upon this equation describing idempotenty:
$$(f . g)^2 = g . (f . g) . f = f . g$$
How can this definition be expanded two $(f . g . h)^2$
The definition of idempotent is that a morphism $h$ is idempotent if and only if $h = h \cdot h$.
Note this can only happen when $h$ is an endomorphism: that is, its domain and codomain are the same.
For endomorphisms, we write $h^2$ as shorthand for $h \cdot h$, so the definition can be written with the equation $h^2 = h$ instead.
The formula you wrote down has a typo: the middle term should be $f \cdot (g \cdot f) \cdot g$.
Note that $(f \cdot g)^2 = f \cdot (g \cdot f) \cdot g$ has nothing to do with idempotents; this is just the associative law.
The point of the chain of equations you reference is not trying to define anything; it is proving:
Theorem: If $g \cdot f$ is an identity morphism, then $f \cdot g$ is idempotent