Fiveable

🔢Category Theory Unit 2 Review

QR code for Category Theory practice questions

2.3 Composition and identity morphisms

2.3 Composition and identity morphisms

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

Composition and identity morphisms are the building blocks of category theory. They allow us to connect objects and study their relationships, forming the foundation for more complex structures.

These concepts are essential for understanding how categories work. Composition lets us chain morphisms together, while identity morphisms act as neutral elements, ensuring consistent behavior within the category.

Composition and Identity Morphisms in Category Theory

Role of composition in categories

  • Composition fundamental operation combines morphisms to create new morphisms between objects
  • Given morphisms f:ABf: A \to B and g:BCg: B \to C, composition yields morphism gf:ACg \circ f: A \to C (function composition, group homomorphisms)
  • Composition allows chaining together morphisms to study relationships between objects in a category (paths in a directed graph)
  • Composition binary operation on set of morphisms takes two morphisms as input and produces single morphism as output
  • Existence of composition one of defining properties of a category enables study of how objects relate through morphisms
Role of composition in categories, Category:Group homomorphisms - Wikimedia Commons

Associativity and identity laws

  • Associativity of composition: (hg)f=h(gf)(h \circ g) \circ f = h \circ (g \circ f) order of composition does not affect result (matrix multiplication)
  • Left identity law: idBf=fid_B \circ f = f for any morphism f:ABf: A \to B composing with identity on codomain yields original morphism
  • Right identity law: fidA=ff \circ id_A = f for any morphism f:ABf: A \to B composing with identity on domain yields original morphism
  • Identity laws ensure composition behaves consistently and predictably in a category (neutral element in arithmetic)
Role of composition in categories, Bartosz Milewski's Programming Cafe | Category Theory, Haskell, Concurrency, C++

Importance of identity morphisms

  • Identity morphisms special morphisms exist for every object in a category (identity function, identity matrix)
  • For each object AA, unique morphism idA:AAid_A: A \to A called identity morphism on AA
  • Identity morphisms act as neutral elements with respect to composition (multiplicative identity in rings)
  • Composing any morphism with appropriate identity morphism yields original morphism
  • Existence of identity morphisms another defining property of a category ensures composition behaves correctly
  • Identity morphisms allow objects to be mapped to themselves (self-loops in a graph)
  • Identity morphisms crucial for formulating identity laws essential for category structure

Examples of composition and identities

  • In category of sets (Set):
    • Morphisms are functions between sets
    • Composition is usual function composition: (gf)(x)=g(f(x))(g \circ f)(x) = g(f(x))
    • Identity morphism on set AA is identity function idA(x)=xid_A(x) = x for all xAx \in A
  • In category of groups (Grp):
    • Morphisms are group homomorphisms
    • Composition is composition of group homomorphisms
    • Identity morphism on group GG is identity homomorphism idG:GGid_G: G \to G defined by idG(g)=gid_G(g) = g for all gGg \in G
  • In category of topological spaces (Top):
    • Morphisms are continuous functions
    • Composition is composition of continuous functions
    • Identity morphism on topological space XX is identity function idX:XXid_X: X \to X defined by idX(x)=xid_X(x) = x for all xXx \in X
  • In category of vector spaces (Vect):
    • Morphisms are linear transformations
    • Composition is composition of linear transformations
    • Identity morphism on vector space VV is identity transformation idV:VVid_V: V \to V defined by idV(v)=vid_V(v) = v for all vVv \in V