Fiveable

🔢Category Theory Unit 5 Review

QR code for Category Theory practice questions

5.2 Vertical and horizontal composition of natural transformations

5.2 Vertical and horizontal composition of natural transformations

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🔢Category Theory
Unit & Topic Study Guides

Natural transformations are like bridges between functors. Vertical composition stacks these bridges, creating a direct path from one functor to another. It's a way to simplify multiple transformations into one.

Horizontal composition, on the other hand, chains functors and transformations together. It's like connecting different bridges to create a longer path. This allows us to combine transformations across different categories.

Vertical Composition of Natural Transformations

Vertical composition of transformations

  • Combines two natural transformations α:FG\alpha: F \Rightarrow G and β:GH\beta: G \Rightarrow H between functors F,G,H:CDF, G, H: \mathcal{C} \rightarrow \mathcal{D} into a single natural transformation βα:FH\beta \circ \alpha: F \Rightarrow H
  • Defined componentwise for each object XX in C\mathcal{C}, where (βα)X=βXαX(\beta \circ \alpha)_X = \beta_X \circ \alpha_X
    • αX:F(X)G(X)\alpha_X: F(X) \rightarrow G(X) and βX:G(X)H(X)\beta_X: G(X) \rightarrow H(X) are the component morphisms of α\alpha and β\beta at XX respectively
  • Vertical composition essentially "stacks" the natural transformations on top of each other, connecting the component morphisms in a chain

Associativity in vertical composition

  • Vertical composition of natural transformations is associative
  • Given natural transformations α:FG\alpha: F \Rightarrow G, β:GH\beta: G \Rightarrow H, and γ:HK\gamma: H \Rightarrow K, we have (γβ)α=γ(βα)(\gamma \circ \beta) \circ \alpha = \gamma \circ (\beta \circ \alpha)
  • Associativity follows from the associativity of composition of morphisms in the codomain category D\mathcal{D}
    • The order in which we compose the component morphisms does not matter, as long as the overall sequence is maintained
Vertical composition of transformations, Adjoint functors - Wikipedia

Examples of transformation compositions

  • In the category of sets Set\mathbf{Set}, natural transformations between functors F,G,H:SetSetF, G, H: \mathbf{Set} \rightarrow \mathbf{Set} can be vertically composed
    • The component functions of the resulting natural transformation are the compositions of the component functions of the original natural transformations (e.g., (βα)X(x)=βX(αX(x))(\beta \circ \alpha)_X(x) = \beta_X(\alpha_X(x)) for each set XX and element xF(X)x \in F(X))
  • In the category of groups Grp\mathbf{Grp}, natural transformations between functors F,G,H:GrpGrpF, G, H: \mathbf{Grp} \rightarrow \mathbf{Grp} can be vertically composed
    • The component group homomorphisms of the resulting natural transformation are the compositions of the component group homomorphisms of the original natural transformations (e.g., (βα)G(g)=βG(αG(g))(\beta \circ \alpha)_G(g) = \beta_G(\alpha_G(g)) for each group GG and element gF(G)g \in F(G))

Horizontal Composition of Natural Transformations

Vertical composition of transformations, Bartosz Milewski's Programming Cafe | Category Theory, Haskell, Concurrency, C++

Horizontal composition of transformations

  • Combines natural transformations α:FG\alpha: F \Rightarrow G and β:FG\beta: F' \Rightarrow G' between functors F,G:CDF, G: \mathcal{C} \rightarrow \mathcal{D} and F,G:DEF', G': \mathcal{D} \rightarrow \mathcal{E} into a single natural transformation βα:FFGG\beta * \alpha: F' \circ F \Rightarrow G' \circ G
  • Defined componentwise for each object XX in C\mathcal{C}, where (βα)X=βG(X)F(αX)=G(αX)βF(X)(\beta * \alpha)_X = \beta_{G(X)} \circ F'(\alpha_X) = G'(\alpha_X) \circ \beta_{F(X)}
    • αX:F(X)G(X)\alpha_X: F(X) \rightarrow G(X) is the component morphism of α\alpha at XX
    • βF(X):F(F(X))G(F(X))\beta_{F(X)}: F'(F(X)) \rightarrow G'(F(X)) and βG(X):F(G(X))G(G(X))\beta_{G(X)}: F'(G(X)) \rightarrow G'(G(X)) are the component morphisms of β\beta at F(X)F(X) and G(X)G(X) respectively
  • Horizontal composition "chains" the functors and natural transformations together, applying the second natural transformation to the result of the first

Interchange law for compositions

  • The interchange law relates vertical and horizontal composition of natural transformations
  • Given natural transformations α:FG\alpha: F \Rightarrow G, β:GH\beta: G \Rightarrow H, γ:FG\gamma: F' \Rightarrow G', and δ:GH\delta: G' \Rightarrow H', the interchange law states that (δβ)(γα)=(δγ)(βα)(\delta * \beta) \circ (\gamma * \alpha) = (\delta \circ \gamma) * (\beta \circ \alpha)
  • The order in which we apply vertical and horizontal composition does not matter, as long as the overall structure is maintained
  • Proof involves showing that for each object XX in C\mathcal{C}, the component morphisms of both sides of the equation are equal by using the associativity of composition in E\mathcal{E} and the functoriality of GG'

Examples of transformation compositions

  • In the category of sets Set\mathbf{Set}, given functors F,G:SetSetF, G: \mathbf{Set} \rightarrow \mathbf{Set} and F,G:SetSetF', G': \mathbf{Set} \rightarrow \mathbf{Set}, and natural transformations α:FG\alpha: F \Rightarrow G and β:FG\beta: F' \Rightarrow G'
    • The horizontal composition βα:FFGG\beta * \alpha: F' \circ F \Rightarrow G' \circ G has component functions that are the compositions of the component functions of β\beta and FF' applied to the component functions of α\alpha (e.g., (βα)X(x)=βG(X)(F(αX)(x))(\beta * \alpha)_X(x) = \beta_{G(X)}(F'(\alpha_X)(x)) for each set XX and element xF(F(X))x \in F'(F(X)))
  • In the category of groups Grp\mathbf{Grp}, given functors F,G:GrpGrpF, G: \mathbf{Grp} \rightarrow \mathbf{Grp} and F,G:GrpGrpF', G': \mathbf{Grp} \rightarrow \mathbf{Grp}, and natural transformations α:FG\alpha: F \Rightarrow G and β:FG\beta: F' \Rightarrow G'
    • The horizontal composition βα:FFGG\beta * \alpha: F' \circ F \Rightarrow G' \circ G has component group homomorphisms that are the compositions of the component group homomorphisms of β\beta and FF' applied to the component group homomorphisms of α\alpha (e.g., (βα)G(g)=βG(G)(F(αG)(g))(\beta * \alpha)_G(g) = \beta_{G(G)}(F'(\alpha_G)(g)) for each group GG and element gF(F(G))g \in F'(F(G)))