A comma category is a construction in mathematical category theory introduced by FW Lawvere in 1963 . The name results from the notation originally used by Lawvere .

For the most general construction of the comma category, consider two functors . Typically, one of the two is defined on the terminal category: many category-theoretical representations only consider this case.

Be , and categories, and functors
. The comma category is defined as follows:
${\ displaystyle {\ mathcal {A}}}$${\ displaystyle {\ mathcal {B}}}$${\ displaystyle {\ mathcal {C}}}$${\ displaystyle T}$${\ displaystyle S}$${\ displaystyle {\ mathcal {A}} {\ xrightarrow {\; \; T \; \;}} {\ mathcal {C}} {\ xleftarrow {\; \; S \; \;}} {\ mathcal {B}}}$${\ displaystyle (T \ downarrow S)}$

The objects are triples , where object is in , object in and arrow is in.${\ displaystyle (\ alpha, \ beta, f)}$${\ displaystyle \ alpha}$${\ displaystyle {\ mathcal {A}}}$${\ displaystyle \ beta}$${\ displaystyle {\ mathcal {B}}}$${\ displaystyle f: T (\ alpha) \ rightarrow S (\ beta)}$${\ displaystyle {\ mathcal {C}}}$

The arrows from to are pairs , where and are respectively arrows in and so that the following diagram commutes:${\ displaystyle (\ alpha, \ beta, f)}$${\ displaystyle (\ alpha ', \ beta', f ')}$${\ displaystyle (g, h)}$${\ displaystyle g \ colon \ alpha \ rightarrow \ alpha '}$${\ displaystyle h \ colon \ beta \ rightarrow \ beta '}$${\ displaystyle {\ mathcal {A}}}$${\ displaystyle {\ mathcal {B}}}$

${\ displaystyle {\ begin {matrix} T (\ alpha) & {\ xrightarrow {T (g)}} & T (\ alpha ') \\ f {\ Bigg \ downarrow} && {\ Bigg \ downarrow} f' \ \ S (\ beta) & {\ xrightarrow [{S (h)}] {}} & S (\ beta ') \ end {matrix}}}$

The concatenation of arrows is defined by.${\ displaystyle (g, h) \ circ (g ', h'): = (g \ circ g ', h \ circ h')}$

Special cases

Category of objects under A

The first special case occurs when terminal (i.e. there is exactly one object and its identity is the only morphism) and is an identical functor (i.e. ). Then in the above definition for a fixed object in . The relevant comma category is called the category of objects under , written . The objects can be briefly noted, since the specification of makes the specification of superfluous; we write briefly as - is also often mentioned , especially when it comes to injections. Similarly, we can reduce the representation of an arrow to , since we always choose as . The following diagram commutes:
${\ displaystyle {\ mathcal {A}} = {\ boldsymbol {1}}}$${\ displaystyle S}$${\ displaystyle {\ mathcal {B}} = {\ mathcal {C}}}$${\ displaystyle T (\ alpha) = A}$${\ displaystyle A}$${\ displaystyle {\ mathcal {C}}}$${\ displaystyle A}$${\ displaystyle (A \ downarrow {\ mathcal {C}})}$${\ displaystyle (\ alpha, \ beta, f)}$${\ displaystyle (\ beta, f)}$${\ displaystyle A}$${\ displaystyle \ alpha}$${\ displaystyle f: T (\ alpha) \ rightarrow S (\ beta)}$${\ displaystyle f: A \ rightarrow \ beta}$${\ displaystyle f}$${\ displaystyle i _ {\ beta}}$${\ displaystyle (g, h) :( B, i_ {B}) \ rightarrow (B ', i_ {B'})}$${\ displaystyle h: B \ rightarrow B '}$${\ displaystyle g}$${\ displaystyle id_ {A}}$

${\ displaystyle (A, id_ {A})}$is an initial object of . If there is already an initial object of , then is isomorphic to .
${\ displaystyle (A \ downarrow {\ mathcal {C}})}$${\ displaystyle A}$${\ displaystyle {\ mathcal {C}}}$${\ displaystyle (A \ downarrow {\ mathcal {C}})}$${\ displaystyle {\ mathcal {C}}}$

Examples:

The category of the dotted topological spaces is isomorphic to the category of the topological spaces under a fixed selected one-point space.

The category of commutative, unitary - algebras for a body is isomorphic to the category of commutative, unitary rings under .${\ displaystyle k}$${\ displaystyle k}$${\ displaystyle k}$

Category of objects above A

Similarly, we can choose identical and terminal. We then get the category of objects over (where the object selected by is from). We note this comma category as ; in algebraic geometry the term is common. It is the dual concept to objects below . The objects are pairs with ; stands for projection . An arrow in the comma category with source and destination is given by a figure that makes the following diagram commutate:
${\ displaystyle T}$${\ displaystyle {\ mathcal {B}}}$${\ displaystyle A}$${\ displaystyle A}$${\ displaystyle S}$${\ displaystyle {\ mathcal {C}}}$${\ displaystyle ({\ mathcal {C}} \ downarrow A)}$${\ displaystyle {\ mathcal {C}} / A}$${\ displaystyle A}$${\ displaystyle (\ beta, \ pi _ {\ beta})}$${\ displaystyle \ pi _ {\ beta}: \ beta \ rightarrow A}$${\ displaystyle \ pi}$${\ displaystyle A}$${\ displaystyle (B, \ pi _ {B})}$${\ displaystyle (B ', \ pi _ {B'})}$${\ displaystyle g: B \ rightarrow B '}$

${\ displaystyle A}$is an end object of . If there is already an end object of , then is isomorphic to .
${\ displaystyle ({\ mathcal {C}} \ downarrow A)}$${\ displaystyle A}$${\ displaystyle {\ mathcal {C}}}$${\ displaystyle ({\ mathcal {C}} \ downarrow A)}$${\ displaystyle {\ mathcal {C}}}$