The Stacks project

4.2 Definitions

We recall the definitions, partly to fix notation.

Definition 4.2.1. A category $\mathcal{C}$ consists of the following data:

  1. A set of objects $\mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$.

  2. For each pair $x, y \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$ a set of morphisms $\mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(x, y)$.

  3. For each triple $x, y, z\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$ a composition map $ \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(y, z) \times \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(x, y) \to \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(x, z) $, denoted $(\phi , \psi ) \mapsto \phi \circ \psi $.

These data are to satisfy the following rules:

  1. For every element $x\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$ there exists a morphism $\text{id}_ x\in \mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(x, x)$ such that $\text{id}_ x \circ \phi = \phi $ and $\psi \circ \text{id}_ x = \psi $ whenever these compositions make sense.

  2. Composition is associative, i.e., $(\phi \circ \psi ) \circ \chi = \phi \circ ( \psi \circ \chi )$ whenever these compositions make sense.

It is customary to require all the morphism sets $\mathop{\mathrm{Mor}}\nolimits _\mathcal {C}(x, y)$ to be disjoint. In this way a morphism $\phi : x \to y$ has a unique source $x$ and a unique target $y$. This is not strictly necessary, although care has to be taken in formulating condition (2) above if it is not the case. It is convenient and we will often assume this is the case. In this case we say that $\phi $ and $\psi $ are composable if the source of $\phi $ is equal to the target of $\psi $, in which case $\phi \circ \psi $ is defined. An equivalent definition would be to define a category as a quintuple $(\text{Ob}, \text{Arrows}, s, t, \circ )$ consisting of a set of objects, a set of morphisms (arrows), source, target and composition subject to a long list of axioms. We will occasionally use this point of view.

Remark 4.2.2. Big categories. In some texts a category is allowed to have a proper class of objects. We will allow this as well in these notes but only in the following list of cases (to be updated as we go along). In particular, when we say: “Let $\mathcal{C}$ be a category” then it is understood that $\mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$ is a set.

  1. The category $\textit{Sets}$ of sets.

  2. The category $\textit{Ab}$ of abelian groups.

  3. The category $\textit{Groups}$ of groups.

  4. Given a group $G$ the category $G\textit{-Sets}$ of sets with a left $G$-action.

  5. Given a ring $R$ the category $\text{Mod}_ R$ of $R$-modules.

  6. Given a field $k$ the category of vector spaces over $k$.

  7. The category of rings.

  8. The category of divided power rings, see Divided Power Algebra, Section 23.3.

  9. The category of schemes.

  10. The category $\textit{Top}$ of topological spaces.

  11. Given a topological space $X$ the category $\textit{PSh}(X)$ of presheaves of sets over $X$.

  12. Given a topological space $X$ the category $\mathop{\mathit{Sh}}\nolimits (X)$ of sheaves of sets over $X$.

  13. Given a topological space $X$ the category $\textit{PAb}(X)$ of presheaves of abelian groups over $X$.

  14. Given a topological space $X$ the category $\textit{Ab}(X)$ of sheaves of abelian groups over $X$.

  15. Given a small category $\mathcal{C}$ the category of functors from $\mathcal{C}$ to $\textit{Sets}$.

  16. Given a category $\mathcal{C}$ the category of presheaves of sets over $\mathcal{C}$.

  17. Given a site $\mathcal{C}$ the category of sheaves of sets over $\mathcal{C}$.

One of the reason to enumerate these here is to try and avoid working with something like the “collection” of “big” categories which would be like working with the collection of all classes which I think definitively is a meta-mathematical object.

Remark 4.2.3. It follows directly from the definition that any two identity morphisms of an object $x$ of $\mathcal{A}$ are the same. Thus we may and will speak of the identity morphism $\text{id}_ x$ of $x$.

Definition 4.2.4. A morphism $\phi : x \to y$ is an isomorphism of the category $\mathcal{C}$ if there exists a morphism $\psi : y \to x$ such that $\phi \circ \psi = \text{id}_ y$ and $\psi \circ \phi = \text{id}_ x$.

An isomorphism $\phi $ is also sometimes called an invertible morphism, and the morphism $\psi $ of the definition is called the inverse and denoted $\phi ^{-1}$. It is unique if it exists. Note that given an object $x$ of a category $\mathcal{A}$ the set of invertible elements $\text{Aut}_\mathcal {A}(x)$ of $\mathop{\mathrm{Mor}}\nolimits _\mathcal {A}(x, x)$ forms a group under composition. This group is called the automorphism group of $x$ in $\mathcal{A}$.

Example 4.2.6. A group $G$ gives rise to a groupoid with a single object $x$ and morphisms $\mathop{\mathrm{Mor}}\nolimits (x, x) = G$, with the composition rule given by the group law in $G$. Every groupoid with a single object is of this form.

Example 4.2.7. A set $C$ gives rise to a groupoid $\mathcal{C}$ defined as follows: As objects we take $\mathop{\mathrm{Ob}}\nolimits (\mathcal{C}) := C$ and for morphisms we take $\mathop{\mathrm{Mor}}\nolimits (x, y)$ empty if $x\neq y$ and equal to $\{ \text{id}_ x\} $ if $x = y$.

Definition 4.2.8. A functor $F : \mathcal{A} \to \mathcal{B}$ between two categories $\mathcal{A}, \mathcal{B}$ is given by the following data:

  1. A map $F : \mathop{\mathrm{Ob}}\nolimits (\mathcal{A}) \to \mathop{\mathrm{Ob}}\nolimits (\mathcal{B})$.

  2. For every $x, y \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})$ a map $F : \mathop{\mathrm{Mor}}\nolimits _\mathcal {A}(x, y) \to \mathop{\mathrm{Mor}}\nolimits _\mathcal {B}(F(x), F(y))$, denoted $\phi \mapsto F(\phi )$.

These data should be compatible with composition and identity morphisms in the following manner: $F(\phi \circ \psi ) = F(\phi ) \circ F(\psi )$ for a composable pair $(\phi , \psi )$ of morphisms of $\mathcal{A}$ and $F(\text{id}_ x) = \text{id}_{F(x)}$.

Note that every category $\mathcal{A}$ has an identity functor $\text{id}_\mathcal {A}$. In addition, given a functor $G : \mathcal{B} \to \mathcal{C}$ and a functor $F : \mathcal{A} \to \mathcal{B}$ there is a composition functor $G \circ F : \mathcal{A} \to \mathcal{C}$ defined in an obvious manner.

Definition 4.2.9. Let $F : \mathcal{A} \to \mathcal{B}$ be a functor.

  1. We say $F$ is faithful if for any objects $x, y \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})$ the map

    \[ F : \mathop{\mathrm{Mor}}\nolimits _\mathcal {A}(x, y) \to \mathop{\mathrm{Mor}}\nolimits _\mathcal {B}(F(x), F(y)) \]

    is injective.

  2. If these maps are all bijective then $F$ is called fully faithful.

  3. The functor $F$ is called essentially surjective if for any object $y \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{B})$ there exists an object $x \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})$ such that $F(x)$ is isomorphic to $y$ in $\mathcal{B}$.

Definition 4.2.10. A subcategory of a category $\mathcal{B}$ is a category $\mathcal{A}$ whose objects and arrows form subsets of the objects and arrows of $\mathcal{B}$ and such that source, target and composition in $\mathcal{A}$ agree with those of $\mathcal{B}$ and such that the identity morphism of an object of $\mathcal{A}$ matches the one in $\mathcal{B}$. We say $\mathcal{A}$ is a full subcategory of $\mathcal{B}$ if $\mathop{\mathrm{Mor}}\nolimits _\mathcal {A}(x, y) = \mathop{\mathrm{Mor}}\nolimits _\mathcal {B}(x, y)$ for all $x, y \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})$. We say $\mathcal{A}$ is a strictly full subcategory of $\mathcal{B}$ if it is a full subcategory and given $x \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})$ any object of $\mathcal{B}$ which is isomorphic to $x$ is also in $\mathcal{A}$.

If $\mathcal{A} \subset \mathcal{B}$ is a subcategory then the identity map is a functor from $\mathcal{A}$ to $\mathcal{B}$. Furthermore a subcategory $\mathcal{A} \subset \mathcal{B}$ is full if and only if the inclusion functor is fully faithful. Note that given a category $\mathcal{B}$ the set of full subcategories of $\mathcal{B}$ is the same as the set of subsets of $\mathop{\mathrm{Ob}}\nolimits (\mathcal{B})$.

Remark 4.2.11. Suppose that $\mathcal{A}$ is a category. A functor $F$ from $\mathcal{A}$ to $\textit{Sets}$ is a mathematical object (i.e., it is a set not a class or a formula of set theory, see Sets, Section 3.2) even though the category of sets is “big”. Namely, the range of $F$ on objects will be a set $F(\mathop{\mathrm{Ob}}\nolimits (\mathcal{A}))$ and then we may think of $F$ as a functor between $\mathcal{A}$ and the full subcategory of the category of sets whose objects are elements of $F(\mathop{\mathrm{Ob}}\nolimits (\mathcal{A}))$.

Example 4.2.12. A homomorphism $p : G\to H$ of groups gives rise to a functor between the associated groupoids in Example 4.2.6. It is faithful (resp. fully faithful) if and only if $p$ is injective (resp. an isomorphism).

Example 4.2.13. Given a category $\mathcal{C}$ and an object $X\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$ we define the category of objects over $X$, denoted $\mathcal{C}/X$ as follows. The objects of $\mathcal{C}/X$ are morphisms $Y\to X$ for some $Y\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$. Morphisms between objects $Y\to X$ and $Y'\to X$ are morphisms $Y\to Y'$ in $\mathcal{C}$ that make the obvious diagram commute. Note that there is a functor $p_ X : \mathcal{C}/X\to \mathcal{C}$ which simply forgets the morphism. Moreover given a morphism $f : X'\to X$ in $\mathcal{C}$ there is an induced functor $F : \mathcal{C}/X' \to \mathcal{C}/X$ obtained by composition with $f$, and $p_ X\circ F = p_{X'}$.

Example 4.2.14. Given a category $\mathcal{C}$ and an object $X\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$ we define the category of objects under $X$, denoted $X/\mathcal{C}$ as follows. The objects of $X/\mathcal{C}$ are morphisms $X\to Y$ for some $Y\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{C})$. Morphisms between objects $X\to Y$ and $X\to Y'$ are morphisms $Y\to Y'$ in $\mathcal{C}$ that make the obvious diagram commute. Note that there is a functor $p_ X : X/\mathcal{C}\to \mathcal{C}$ which simply forgets the morphism. Moreover given a morphism $f : X'\to X$ in $\mathcal{C}$ there is an induced functor $F : X/\mathcal{C} \to X'/\mathcal{C}$ obtained by composition with $f$, and $p_{X'}\circ F = p_ X$.

Definition 4.2.15. Let $F, G : \mathcal{A} \to \mathcal{B}$ be functors. A natural transformation, or a morphism of functors $t : F \to G$, is a collection $\{ t_ x\} _{x\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})}$ such that

  1. $t_ x : F(x) \to G(x)$ is a morphism in the category $\mathcal{B}$, and

  2. for every morphism $\phi : x \to y$ of $\mathcal{A}$ the following diagram is commutative

    \[ \xymatrix{ F(x) \ar[r]^{t_ x} \ar[d]_{F(\phi )} & G(x) \ar[d]^{G(\phi )} \\ F(y) \ar[r]^{t_ y} & G(y) } \]

Sometimes we use the diagram

\[ \xymatrix{ \mathcal{A} \rtwocell ^ F_ G{t} & \mathcal{B} } \]

to indicate that $t$ is a morphism from $F$ to $G$.

Note that every functor $F$ comes with the identity transformation $\text{id}_ F : F \to F$. In addition, given a morphism of functors $t : F \to G$ and a morphism of functors $s : E \to F$ then the composition $t \circ s$ is defined by the rule

\[ (t \circ s)_ x = t_ x \circ s_ x : E(x) \to G(x) \]

for $x \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})$. It is easy to verify that this is indeed a morphism of functors from $E$ to $G$. In this way, given categories $\mathcal{A}$ and $\mathcal{B}$ we obtain a new category, namely the category of functors between $\mathcal{A}$ and $\mathcal{B}$.

Remark 4.2.16. This is one instance where the same thing does not hold if $\mathcal{A}$ is a “big” category. For example consider functors $\textit{Sets} \to \textit{Sets}$. As we have currently defined it such a functor is a class and not a set. In other words, it is given by a formula in set theory (with some variables equal to specified sets)! It is not a good idea to try to consider all possible formulae of set theory as part of the definition of a mathematical object. The same problem presents itself when considering sheaves on the category of schemes for example. We will come back to this point later.

Definition 4.2.17. An equivalence of categories $F : \mathcal{A} \to \mathcal{B}$ is a functor such that there exists a functor $G : \mathcal{B} \to \mathcal{A}$ such that the compositions $F \circ G$ and $G \circ F$ are isomorphic to the identity functors $\text{id}_\mathcal {B}$, respectively $\text{id}_\mathcal {A}$. In this case we say that $G$ is a quasi-inverse to $F$.

Lemma 4.2.18. Let $F : \mathcal{A} \to \mathcal{B}$ be a fully faithful functor. Suppose for every $X \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{B})$ we are given an object $j(X)$ of $\mathcal{A}$ and an isomorphism $i_ X : X \to F(j(X))$. Then there is a unique functor $j : \mathcal{B} \to \mathcal{A}$ such that $j$ extends the rule on objects, and the isomorphisms $i_ X$ define an isomorphism of functors $\text{id}_\mathcal {B} \to F \circ j$. Moreover, $j$ and $F$ are quasi-inverse equivalences of categories.

Proof. To construct $j : \mathcal{B} \to \mathcal{A}$, there are two steps. Firstly, we define the map $j : \mathop{\mathrm{Ob}}\nolimits (\mathcal{B}) \to \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})$ that associates $j(X)$ to $X \in \mathcal{B}$. Secondly, if $X,Y \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{B})$ and $\phi : X \to Y$, we consider $\phi ' := i_ Y \circ \phi \circ i_ X^{-1}$. There is an unique $\varphi $ verifying $F(\varphi ) = \phi '$, using that $F$ is fully faithful. We define $j(\phi ) = \varphi $. We omit the verification that $j$ is a functor. By construction the diagram

\[ \xymatrix{ X \ar[r]_-{i_ X} \ar[d]_{\phi } & F(j(X)) \ar[d]^{F\circ j(\phi )} \\ Y \ar[r]^-{i_ Y} & F(j(Y)) } \]

commutes. Hence, as each $i_ X$ is an isomorphism, $\{ i_ X\} _ X$ is an isomorphism of functors $\text{id}_\mathcal {B} \to F\circ j$. To conclude, we have to also prove that $j \circ F$ is isomorphic to $\text{id}_\mathcal {A}$. However, since $F$ is fully faithful, in order to do this it suffices to prove this after post-composing with $F$, i.e., it suffices to show that $F \circ j \circ F$ is isomorphic to $F \circ \text{id}_\mathcal {A}$ (small detail omitted). Since $F \circ j \cong \text{id}_\mathcal {B}$ this is clear. $\square$

Lemma 4.2.19. A functor is an equivalence of categories if and only if it is both fully faithful and essentially surjective.

Proof. Let $F : \mathcal{A} \to \mathcal{B}$ be essentially surjective and fully faithful. As by convention all categories are small and as $F$ is essentially surjective we can, using the axiom of choice, choose for every $X \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{B})$ an object $j(X)$ of $\mathcal{A}$ and an isomorphism $i_ X : X \to F(j(X))$. Then we apply Lemma 4.2.18 using that $F$ is fully faithful. $\square$

Definition 4.2.20. Let $\mathcal{A}$, $\mathcal{B}$ be categories. We define the product category $\mathcal{A} \times \mathcal{B}$ to be the category with objects $\mathop{\mathrm{Ob}}\nolimits (\mathcal{A} \times \mathcal{B}) = \mathop{\mathrm{Ob}}\nolimits (\mathcal{A}) \times \mathop{\mathrm{Ob}}\nolimits (\mathcal{B})$ and

\[ \mathop{\mathrm{Mor}}\nolimits _{\mathcal{A} \times \mathcal{B}}((x, y), (x', y')) := \mathop{\mathrm{Mor}}\nolimits _\mathcal {A}(x, x')\times \mathop{\mathrm{Mor}}\nolimits _\mathcal {B}(y, y'). \]

Composition is defined componentwise.

Comments (7)

Comment #4917 by Xinyu Zhou on

Is it better to point out explicitly that the category with Ob(C) as a "set" is called small as in many texts. I feel that might be clearer.

Comment #5187 by on

@#4917: What exactly do you mean? I tried to avoid using "big" and "small" here and just say explicitly that categories have sets of objects and sets of morphisms unless specifically mentioned or listed in Remark 4.2.2. The reason for this is that I wanted to avoid conflict with the discussion of small and big sites of schemes we have later (and people do get confused about this it turns out).

Comment #7462 by on

@#5187 In basically all literature I've seen, Ob(C) and Mor(C) are not sets, they are classes. The need for the distinction isn't necesarily "size," as brought up by @#4917, but rather the set-theoretic properties of classes vs sets which prevent certain paradoxes from occurring.

Comment #7613 by on

For the Stacks project our default kind of category has a set of objects and for every two objects a set of morphisms. But we also study some categories, such as the category of sets, where this is not the case; ideally these should all be listed in Remark 4.2.2. In particular, we make the meta-mathematical claim that the categories we use in the Stacks project whose objects and/or morphisms do not form a set can be listed. We appreciate help with this. Thanks!

Comment #7762 by Patrick Rabau on

In the definition of subcategory (001D) it is normally also required that for each object in the subcategory the identity morphism in the subcategory matches the one in the containing category. (see wikipedia or many category books)

Comment #7863 by Luis on

What is the point of the "proof" of Lemma 05SG? It is excessively pedantic. Why not just omit the proof altogether?

Post a comment

Your email address will not be published. Required fields are marked.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).

Unfortunately JavaScript is disabled in your browser, so the comment preview function will not work.

All contributions are licensed under the GNU Free Documentation License.

In order to prevent bots from posting comments, we would like you to prove that you are human. You can do this by filling in the name of the current tag in the following input field. As a reminder, this is tag 0013. Beware of the difference between the letter 'O' and the digit '0'.