Algebra - 2

In this entry, we will look at categories whose objects are certain diagrams in a category, and whose morphisms are identified with morphisms from the original category, such that some collection of diagrams commute.

0 - Categories from Commuting Diagrams

As an example, let C\mathsf{C} be a category, and let α,β\alpha, \beta be fixed morphisms from ACA \to C, BCB \to C, respectively.

We can make a new category Cα,β\mathsf{C^{\alpha,\beta}} whose objects are triples (P,x,y)(P,x,y), where PP is an object of C\mathsf{C} and x,yx,y are morphisms from PP to AA and PP to BB, respectively, such that the induced diagram commutes:

Commutative diagram

i.e. αx=βy\alpha \circ x = \beta \circ y.

Now, what should morphisms in this category be?

Let (P,x,y),(Q,u,v)obj(Cα,β)(P,x,y), (Q,u,v) \in \operatorname{obj}(\mathsf{C}^{\alpha,\beta}).

Commutative diagram

The most natural choice, of course, is to identify it with a morphism σ\sigma from PP to QQ in the original category, such that the two triangles commute, i.e. x=uσx = u \circ \sigma, y=vσy = v \circ \sigma.

We claim that composition here is well-defined.

Commutative diagram

We want the morphism in Cα,β\mathsf{C}^{\alpha,\beta} that is the composite of the one identified with σ\sigma followed by the one identified with θ\theta. Whatever this composite is, call it kk. If kk is identified by some morphism kk' in the original category C\mathsf{C}, it better be that x=mkx = m \circ k' and y=nky = n \circ k', but of course, k=θσk' = \theta \circ \sigma is a good candidate for that!

That is, the composition of a morphism identified with σ\sigma and one identified with θ\theta is the morphism identified with θσ\theta \circ \sigma.

Now, what is the identity morphism on (P,x,y)(P,x,y)? Well, it’s the one identified with idP\mathrm{id}_P in the original category, of course. (I will let the reader check that the identity axioms hold.)

Now, the above discussion, though it makes sense, feels a bit washy. If only we had ways to make categories out of diagrams in a rigorous way…

Enter functors:

1 - Functors and Natural Transformations

Functors

Let C,D\mathsf{C}, \mathsf{D} be categories. Then a functor FF from C\mathsf{C} to D\mathsf{D} is defined by:

  • For each object AA in C\mathsf{C}, an object F(A)F(A) in D\mathsf{D}.
  • For each morphism fHomC(A,B)f \in \operatorname{Hom}_{\mathsf{C}}(A,B), a morphism F(f)HomD(F(A),F(B))F(f) \in \operatorname{Hom}_{\mathsf{D}}(F(A),F(B)) (that is, a function from HomC(A,B)\operatorname{Hom}_{\mathsf{C}}(A,B) to HomD(F(A),F(B))\operatorname{Hom}_{\mathsf{D}}(F(A),F(B)), for any objects A,BA,B of C\mathsf{C}).

Such that the following axioms hold:

  • For any object AA in C\mathsf{C}, F(1A)=1F(A)F(1_A) = 1_{F(A)}; that is, the function from EndC(A)\operatorname{End}_C(A) to EndD(F(A))\operatorname{End}_D(F(A)) induced by the functor FF takes the identity morphism to the identity morphism.
  • For any two morphisms AfBgCA\overset{f}{\longrightarrow}B \overset{g}{\longrightarrow}C in C\mathsf{C}, F(gf)=F(g)F(f)F(g \circ f) = F(g) \circ F(f) (note that on the left it’s, of course, the composition in the domain category, and on the right, the composition in the target category).

Natural Transformations

Now, imagine you had two functors F,GF,G, both from C\mathsf{C} to D\mathsf{D}. We want to find some transformation between these two functors. A transformation FαGF \overset{\alpha}{\longrightarrow} G might want to encode the following:

For any object XX in C\mathsf{C}, we have two images F(X)F(X), G(X)G(X), and there better be a morphism between them, αXHomD(F(X),G(X))\alpha_X \in \operatorname{Hom}_D(F(X),G(X)). Indeed, αX\alpha_X is known as the ”XX component” of this transformation.

Commutative diagram

Now, any morphism in C\mathsf{C} induces the above diagram, and if the outer square commutes—that is, αYF(f)=G(f)αX\alpha_Y \circ F(f) = G(f) \circ \alpha_X for any morphism f:XYf: X \to Y—we call α\alpha a natural transformation from FF to GG.

Fix categories C\mathsf{C}, D\mathsf{D}, and consider the collection of all functors from C\mathsf{C} to D\mathsf{D}. We claim that these are the objects of a category, whose morphisms are natural transformations, usually denoted Fun(C,D)\operatorname{Fun}(\mathsf{C}, \mathsf{D}) or DC\mathsf{D}^{\mathsf{C}}.

Of course, taking the identity morphism 1F(X)1_{F(X)} on each object F(X)F(X) as the component defines the identity natural transformation 1F:FF1_F: F \to F on any functor FF: naturality is trivial here, since the square 1F(Y)F(f)=F(f)=F(f)1F(X)1_{F(Y)} \circ F(f) = F(f) = F(f) \circ 1_{F(X)} commutes for any f:XYf: X \to Y.

For this to be a category, we also need a sensible notion of composing two natural transformations. Given α:FG\alpha: F \to G and β:GH\beta: G \to H, wouldn’t it be very nice if simply composing their components, (βα)X:=βXαX(\beta \circ \alpha)_X := \beta_X \circ \alpha_X, gave us another natural transformation βα:FH\beta \circ \alpha: F \to H? Indeed it does!

To see this, just imagine stacking a second square beneath the first: on top, α\alpha‘s naturality square for f:XYf: X \to Y commutes (αYF(f)=G(f)αX\alpha_Y \circ F(f) = G(f) \circ \alpha_X), and directly below it, β\beta‘s naturality square commutes too (βYG(f)=H(f)βX\beta_Y \circ G(f) = H(f) \circ \beta_X). Pasting the two squares together, the whole outer rectangle commutes:

(βYαY)F(f)=βY(αYF(f))=βY(G(f)αX)=(βYG(f))αX(\beta_Y \circ \alpha_Y) \circ F(f) = \beta_Y \circ (\alpha_Y \circ F(f)) = \beta_Y \circ (G(f) \circ \alpha_X) = (\beta_Y \circ G(f)) \circ \alpha_X =(H(f)βX)αX=H(f)(βXαX)= (H(f) \circ \beta_X) \circ \alpha_X = H(f) \circ (\beta_X \circ \alpha_X)

which is exactly the naturality square for βα\beta \circ \alpha. So βα\beta \circ \alpha is itself a natural transformation FHF \to H, and this composition is associative and unital (by the identity transformations above) simply because composition in D\mathsf{D} is. This makes Fun(C,D)\operatorname{Fun}(\mathsf{C}, \mathsf{D}) a genuine category.

The general intuition behind naturality is this: a natural transformation α:FG\alpha: F \to G gives you two routes from F(X)F(X) to G(Y)G(Y) for any f:XYf: X \to Y, first apply FF then jump via αY\alpha_Y, or first jump via αX\alpha_X then apply GG, and naturality demands these two routes always agree.

Endomorphisms and Automorphisms

An endomorphism of an object AA in a category C\mathsf{C} is just a morphism f:AAf: A \to A, i.e. an element of HomC(A,A)=:End(A)\operatorname{Hom}_\mathsf{C}(A,A) =: \operatorname{End}(A). Since source and target agree, endomorphisms of AA can always be composed with each other, and End(A)\operatorname{End}(A) is closed under composition, with 1A1_A acting as a two-sided identity. So End(A)\operatorname{End}(A) is a monoid under composition.

An automorphism of AA is an endomorphism f:AAf: A \to A that is invertible, i.e. there exists g:AAg: A \to A with fg=gf=1Af \circ g = g \circ f = 1_A. Write Aut(A)\operatorname{Aut}(A) for the collection of automorphisms of AA.

Aut(A)\operatorname{Aut}(A) is a group. It’s a submonoid of End(A)\operatorname{End}(A) consisting of the invertible elements:

  • Closure: if f,gAut(A)f, g \in \operatorname{Aut}(A), then gfg \circ f has inverse f1g1f^{-1} \circ g^{-1}, so gfAut(A)g\circ f \in \operatorname{Aut}(A).
  • Identity: 1AAut(A)1_A \in \operatorname{Aut}(A), being its own inverse.
  • Associativity: inherited from composition in C\mathsf{C}.
  • Inverses: every fAut(A)f \in \operatorname{Aut}(A) has f1Aut(A)f^{-1} \in \operatorname{Aut}(A) by definition, and f1f^{-1} is itself invertible (with inverse ff), so it’s an automorphism too.

So (Aut(A),)(\operatorname{Aut}(A), \circ) is a group.

In general, a category in which all morphisms are isomorphisms is called a groupoid. In particular, a group is a groupoid with exactly one object :)

Subcategories

Let C\mathsf{C} be a category. A subcategory D\mathsf{D} of C\mathsf{C} consists of a subcollection of objects of C\mathsf{C}, together with, for each pair of objects A,BA, B in D\mathsf{D}, a subcollection HomD(A,B)HomC(A,B)\operatorname{Hom}_\mathsf{D}(A,B) \subseteq \operatorname{Hom}_\mathsf{C}(A,B), such that:

  • 1AHomD(A,A)1_A \in \operatorname{Hom}_\mathsf{D}(A,A) for every object AA in D\mathsf{D},
  • HomD\operatorname{Hom}_\mathsf{D} is closed under composition, that is, fHomD(A,B)f \in \operatorname{Hom}_\mathsf{D}(A,B) and gHomD(B,C)g \in \operatorname{Hom}_\mathsf{D}(B,C) implies gfHomD(A,C)g \circ f \in \operatorname{Hom}_\mathsf{D}(A,C).

These two conditions are exactly what’s needed for D\mathsf{D} to be a category in its own right, with composition and identities inherited from C\mathsf{C}.

D\mathsf{D} is called a full subcategory if, for every pair of objects A,BA, B in D\mathsf{D}, we have HomD(A,B)=HomC(A,B)\operatorname{Hom}_\mathsf{D}(A,B) = \operatorname{Hom}_\mathsf{C}(A,B); that is, D\mathsf{D} doesn’t throw away any morphisms between the objects it keeps. It’s determined entirely by which objects you chose to keep.

There is a natural functor ι:DC\iota: \mathsf{D} \to \mathsf{C}, sending each object and morphism of D\mathsf{D} to itself in C\mathsf{C}, called the inclusion functor. Functoriality is immediate: ι(1A)=1A\iota(1_A) = 1_A and ι(gf)=gf=ι(g)ι(f)\iota(g\circ f) = g \circ f = \iota(g) \circ \iota(f), since composition in D\mathsf{D} is just composition in C\mathsf{C} restricted to HomD\operatorname{Hom}_\mathsf{D}.

2 - The Comma Category

Given two functors F:ACF: \mathsf{A} \to \mathsf{C} and G:BCG: \mathsf{B} \to \mathsf{C}, there exists a canonical category known as the comma category. In some sense, this construction is motivated by the following: when you have two functors from the same source to the same target, you get the functor category, whose morphisms are natural transformations. What happens when two functors instead fan into the same target, emerging from different sources?

Let us motivate it with a few examples.

Consider a category C\mathsf{C}, and construct a new category C\mathsf{C}' out of it by fixing an object ACA \in \mathsf{C}. The objects of the new category will be morphisms into AA. What’s a natural way to define morphisms in C\mathsf{C}'? Well, we know objects are (identified with) pairs (C,f:CA)(C, f: C\to A). Consider two such objects, (C,f:CA)(C, f: C\to A) and (D,g:DA)(D, g: D\to A). Instinct tells us a morphism should be identified with σ:CD\sigma: C \to D such that gσ=fg \circ \sigma = f.

Commutative diagram

This is again of the flavor “objects are diagrams” and “morphisms fill the diagram in such a way that things commute.”

It is not hard to see that the above construction is a category, and thus I will leave justifying it out for brevity (composition of σ:CD\sigma: C\to D and τ:DE\tau: D\to E is identified with the composite τσ:CE\tau\circ\sigma: C \to E in C\mathsf{C}, and one checks this again satisfies the required commuting-triangle condition).

Consider two such triples (X,,f)(X, *, f) and (Y,,g)(Y, *, g).

Commutative diagram

Since X,YX, Y are objects of C\mathsf{C} and * is an object of 1\mathsf{1}, it makes sense that a morphism in C\mathsf{C}' would be identified with a pair (p,id)(p, \mathrm{id}_*), with p:XYp: X \to Y in C\mathsf{C}, such that the induced square commutes. (We smell a natural transformation here, and indeed we will encounter one.)

Of course, in the case at hand, this all simplifies: since 1\mathsf{1} has only the identity morphism, the pair collapses to just pp such that gp=fg \circ p = f.

This inspires us to then define the comma category (FG)(F \downarrow G), for functors F:ACF: \mathsf{A} \to \mathsf{C} and G:BCG: \mathsf{B} \to \mathsf{C}.

Objects. Triples (A,B,f:F(A)G(B))(A, B, f: F(A) \to G(B)), where AA is an object of A\mathsf{A}, BB is an object of B\mathsf{B}, and ff is a morphism in C\mathsf{C}.

Morphisms. A morphism from (A,B,f)(A, B, f) to (A,B,g)(A', B', g) is a pair (σ:AA, τ:BB)(\sigma: A \to A',\ \tau: B \to B'), with σ\sigma a morphism in A\mathsf{A} and τ\tau a morphism in B\mathsf{B}, such that the induced square commutes:

Commutative diagram

that is, G(τ)f=gF(σ)G(\tau) \circ f = g \circ F(\sigma).

Composition. Given (σ,τ):(A,B,f)(A,B,g)(\sigma, \tau): (A,B,f) \to (A',B',g) and (σ,τ):(A,B,g)(A,B,h)(\sigma', \tau'): (A',B',g) \to (A'',B'',h), their composite is (σσ, ττ)(\sigma'\circ\sigma,\ \tau'\circ\tau), computed componentwise in A\mathsf{A} and B\mathsf{B}. One checks this is again a valid morphism (A,B,f)(A,B,h)(A,B,f) \to (A'',B'',h), since pasting the two commuting squares together yields a commuting square with the composite maps. The identity on (A,B,f)(A,B,f) is the pair (1A,1B)(1_A, 1_B).

There are some cool things about the comma category (the promised natural transformation will also be uncovered),

but before that, there was this category Cα,β\mathsf{C}^{\alpha, \beta} we saw as the first example. The question is: how can this be constructed as a comma category?

3 - Diagram Categories

Let C\mathsf{C} be a category, and let J\mathsf{J} be a category describing a diagram, often known as an index category. We define a diagram of shape J\mathsf{J} in C\mathsf{C} to simply be a functor D:JCD: \mathsf{J} \to \mathsf{C}.

In particular, the whole idea of a diagram “commuting” in C\mathsf{C} can be induced by placing that property on J\mathsf{J} itself: if all paths of morphisms between any two objects of J\mathsf{J} agree, then any functor D:JCD: \mathsf{J}\to\mathsf{C} automatically gives a commutative diagram in C\mathsf{C}, by functoriality.

As an example, we may take J\mathsf{J} to be the triangle category 0120 \to 1 \to 2, with the only morphism from 00 to 22 being the mandatory composite of the other two.

Commutative diagram

Any functor D:JCD: \mathsf{J} \to \mathsf{C} picking out objects D(0),D(1),D(2)D(0), D(1), D(2) and morphisms D(01),D(12)D(0\to1), D(1\to2) then forces D(02)=D(12)D(01)D(0\to 2) = D(1\to2)\circ D(0\to1), automatically, since 020\to 2 in J\mathsf{J} is the composite 121\to2 after 010\to1, and functors respect composition.

For reasons now unknown to me, perhaps a mild (heavy) lack of sleep, I was holding onto the notion that the image under DD of each object in J\mathsf{J} must be distinct in C\mathsf{C}. Of course, this need not be true.

What I actually want here is subdiagrams. Given D:JCD: \mathsf{J} \to \mathsf{C}, a subdiagram of shape JJ\mathsf{J}' \subseteq \mathsf{J} (a subcategory of J\mathsf{J}) is just the restriction DJ:JCD|_{\mathsf{J}'}: \mathsf{J}' \to \mathsf{C}. In particular, DJD|_{\mathsf{J}'} can be defined as the unique functor making the triangle below commute, that is, DJ=DιD|_{\mathsf{J}'} = D \circ \iota, where ι:JJ\iota: \mathsf{J}' \hookrightarrow \mathsf{J} is the inclusion functor.

Commutative diagram

For instance, take J\mathsf{J} to be the triangle 0120\to1\to2, and J=(01)\mathsf{J}' = (0\to1), the sub-shape omitting the object 22 and the morphisms touching it. Then DJD|_{\mathsf{J}'} just forgets D(2)D(2) and D(12)D(1\to2), keeping only D(0),D(1),D(01)D(0), D(1), D(0\to1), a diagram of the smaller shape J\mathsf{J}' in C\mathsf{C}.

Now, it’s clear that the collection of all diagrams of shape J\mathsf{J} in C\mathsf{C} forms a category, namely the functor category Fun(J,C)\operatorname{Fun}(\mathsf{J}, \mathsf{C}), whose morphisms are natural transformations.

There are probably some cool ways to formalize “subdiagrams” within this category, but for now we are only interested in one particular kind of diagram: the constant diagrams, namely those that send every object of J\mathsf{J} to the same object of C\mathsf{C}, and every morphism of J\mathsf{J} to the identity on that object.

For an object PCP \in \mathsf{C}, we denote the constant diagram at PP by P:JC\underline{P}: \mathsf{J} \to \mathsf{C}, that is, P(j)=P\underline{P}(j) = P for every object jJj \in \mathsf{J}, and P(f)=1P\underline{P}(f) = 1_P for every morphism ff of J\mathsf{J}.

Natural Transformations Between Diagrams

We are almost ready to reconstruct Cα,β\mathsf{C}^{\alpha,\beta} using comma categories, but it’s worth pausing to see what a natural transformation between two diagrams actually looks like, concretely, using the triangle shape J=(012)\mathsf{J} = (0\to1\to2) from before.

Let D,D:JCD, D': \mathsf{J} \to \mathsf{C} be two diagrams of this shape. A natural transformation γ:DD\gamma: D \Rightarrow D' consists of three components, γ0,γ1,γ2\gamma_0, \gamma_1, \gamma_2, one for each object of J\mathsf{J}, such that the whole diagram below commutes.

Commutative diagram

4 - Cones

Now imagine DD is the constant diagram P\underline{P} at some object PCP \in \mathsf{C}, and DD' is a fixed diagram of shape J=(012)\mathsf{J} = (0\to1\to2), picking out objects X0,X1,X2CX_0, X_1, X_2 \in \mathsf{C} and morphisms f:X0X1f: X_0\to X_1, g:X1X2g: X_1\to X_2 (with D(02)=gfD'(0\to2) = g\circ f, forced by functoriality).

A natural transformation γ:PD\gamma: \underline{P} \Rightarrow D' then has components γ0:PX0\gamma_0: P \to X_0, γ1:PX1\gamma_1: P \to X_1, γ2:PX2\gamma_2: P \to X_2, one morphism out of PP for each object of the diagram.

Commutative diagram

Naturality of the two squares reads γ11P=fγ0\gamma_1 \circ 1_P = f \circ \gamma_0 and γ21P=gγ1\gamma_2 \circ 1_P = g \circ \gamma_1, i.e. simply γ1=fγ0,γ2=gγ1=gfγ0.\gamma_1 = f\circ \gamma_0, \qquad \gamma_2 = g \circ \gamma_1 = g\circ f\circ\gamma_0.

So the whole natural transformation collapses to a single choice: γ0:PX0\gamma_0: P \to X_0 determines everything else, since γ1,γ2\gamma_1, \gamma_2 are forced by composing forward along DD'. This is exactly a cone over DD' with apex PP.

Phew. It’s worth taking a step back and being a little pedantic here.

A cone over a diagram F:JCF: \mathsf{J} \to \mathsf{C} with apex AA is the pair (A,u)(\underline{A},\, u), where A\underline{A} is the constant diagram at AA, and u:AFu: \underline{A} \Rightarrow F is a natural transformation.

Hmm… now our balls (I do not intend to be sexist, I am just goofy) start to tingle again, as they have many times.

With wishful thinking and notational abuse, I could also write that cone as a triple (A,F,u)(\underline{A}, F, u), after all, uu is a morphism in the diagram category, and A,F\underline{A}, F are objects of the diagram category. This is starting to look a little like the object of a comma category. But things are not sitting quite right, we still don’t have the canonical comma-category form.

For ease, call the category of diagrams over C\mathsf{C} of shape J\mathsf{J}, Diag(J,C)\operatorname{Diag}(\mathsf{J},\mathsf{C}). To get A\underline{A}, one thing we could do is send objects AA of C\mathsf{C} to the constant diagram A\underline{A}. We should carefully verify that this is indeed a functor.

It should send a morphism AfBA \xrightarrow{f} B to the natural transformation AB\underline{A} \Rightarrow \underline{B} whose components are all ff.

Commutative diagram

Indeed, this is well-defined as a natural transformation: each square commutes trivially, since f1A=f=1Bff \circ 1_A = f = 1_B \circ f.

Composition is well-defined, since the morphism we assign to gfg\circ f is the natural transformation with every component gfg\circ f, exactly the vertical composite of the transformation we assigned to ff followed by the one we assigned to gg. And identity morphisms on an object go to identity natural transformations on their constant diagram, since every component of 1A1_A‘s image is 1A1_A itself.

This functor CDiag(J,C)\mathsf{C} \to \operatorname{Diag}(\mathsf{J},\mathsf{C}), AAA \mapsto \underline{A}, is exactly the diagonal functor Δ\Delta.

So we’ve figured out a way to get A\underline{A}; now to figure out a way to get FF, a fixed diagram. Well, just make a functor F:1Diag(J,C)*_F: \mathsf{1} \to \operatorname{Diag}(\mathsf{J},\mathsf{C}) that takes the lone object * of the trivial category 1\mathsf{1} to the diagram FF.

With Δ:CDiag(J,C)\Delta: \mathsf{C} \to \operatorname{Diag}(\mathsf{J},\mathsf{C}) and F:1Diag(J,C)*_F: \mathsf{1} \to \operatorname{Diag}(\mathsf{J},\mathsf{C}) both landing in Diag(J,C)\operatorname{Diag}(\mathsf{J},\mathsf{C}), we are now sitting in comma category shape: the category of cones over FF is exactly (ΔF)(\Delta \downarrow {*}_F). Objects are triples (A,,u:Δ(A)F())(A, *, u: \Delta(A) \to {*}_F(*)), that is, (A,u:AF)(A, u: \underline{A} \Rightarrow F), matching precisely the pair we started with.

The picture associated with the category of cones is rather beautiful. If you have two cones with apexes PP and QQ over the same diagram, a morphism between them is exactly what your gut expects: a morphism σ:PQ\sigma: P \to Q in the ambient category C\mathsf{C} between the apexes, such that every triangle in sight commutes.

Commutative diagram

5 - What’s Next

In the next set of notes, we’ll verify that our comma category definition of cones behaves as claimed. We’ll also construct the promised natural transformation induced by the comma category, discuss universal properties, and return to our old goal of categorifying the first isomorphism theorem for groups, whatever that turns out to mean. (Wink wink: any universal property is a “terminal” object in some suitably engineered category.)

One of the reasons I keep stacking promises is simply due to the fact that I want to ship a writeup the same day that I do any math, owing to the fact that I’ve struggled with putting stuff out there before. In addition, I keep going down rabbit holes.

As to how this relates to the original text, I don’t know. I just wanted to build the categorical muscle.