# Proving that a slice category is still a category

I recently came across the concept of a category, and I'm trying to make order of some stuff in my mind.

Given an object $c$ of a category $\mathbf C$, we define the slice category $c/\mathbf C$ to be the category where the objects are morphisms $c\to x$ of $\mathbf C$ and where arrows from $f\colon c\to x$ to $g\colon c\to y$ are morphisms $h\colon x\to y$ such that $g=hf$. Now, I have no idea how to show that the "thing" we built up this way is still a category. What does it mean to prove that the composition is unitary and associative in this case?

• Firstly, the category you want to define is called a coslice category (or under category). Sep 6, 2018 at 16:37
• Secondly, besides defining the sets (classes) of its objects and morphisms, you should define the composition in this category. Sep 6, 2018 at 16:42

Remember that a category is comprised of data submitted to some axioms. The data are:

• a set/class of objects
• a set of morphisms for each given couple of objects
• a composition operation on morphisms
• a choice of identity morphisms

The axioms are the associativity law and the left and right unit laws.

Before proving any kind of law, you need the data! Here you have defined objects and morphisms, but not the composition and the identities. Once you have done that, you can move on to proving the associativity and unit laws (which you will see are basically trivial here).

Edit. As an analogous situation, imagine someone saying the following: given two groups $G$ and $G'$, I can for the set of pairs $(x,x')$ for $x\in G$ and $x'$ in $G'$, but I have no idea how to prove that this new object is a group! Well a group, say $H$, is supposed to have a operation $m:H\times H\to H$ and a constant $e\in H$ and none of that have been given for now for this "new object", so it surely can't be a group as such.

• Thank you, the example on groups was quite useful! My problem arose because I kept confusing who the domain and the codomain of the morphisms in $c/\mathbf C$ actually was: if $f:c\to x$, $g:c\to y$ then $h:f\to g = (\mbox{a morphism of }\mathbf C) :x\to y$, but $\mathrm{dom}_{c/\mathbf{C}}(h) = f$, not $x$, and the same for $\mathrm{cod}_{c/\mathbf{C}}(h)$.
– user457568
Sep 6, 2018 at 21:36