Given two Functions f:X→Yf: X \to Yf:X→Y and g:Y→Zg: Y \to Zg:Y→Z, we define their composition:
g∘f:X→Zg \circ f: X \to Zg∘f:X→Z
as (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x))(g∘f)(x)=g(f(x))
Function composition satisfies Associativity so that h∘(g∘f)=(h∘g)∘f:=h∘g∘fh \circ (g \circ f) = (h \circ g) \circ f := h \circ g \circ fh∘(g∘f)=(h∘g)∘f:=h∘g∘f
More generally, we define the same thing for Morphisms/Arrows in a Category