[Math] the difference between the identity functor and the identity morphism

category-theoryfunctorsmorphism

The only difference that I can think of is that – because the identity functor is also an endofunctor – its only extra ability is being able to map morphisms to themselves and not just category objects. ("The identity functor maps an object to itself and a morphism to itself.", from en.wikipedia.org/wiki/Functor and morphisms are confined to a category, if I understood it correctly.)

There have been sources where it seems that the two terms have been used interchangeably (e.g., here and here) because the definition provided for the identity functor is the same with definition of the identity morphism at en.wikipedia.org/wiki/Morphism#Definition:

For every object X, there exists a morphism $id_X : X → X$ called the
identity morphism on X, such that for every morphism $f : A → B$ we have
$id_B ∘ f = f = f ∘ id_A$.

I assume that usually identity functor is used because it is a broader term.

Best Answer

If $X$ is an object in a category $\mathcal C$, the identity morphism $id_X:X\to X$ is a morphism in the category $\mathcal C$.

On the other hand, the identity functor is not a morphism in $\mathcal C$; it is a functor $\mathcal C\to\mathcal C$. A functor takes has two inputs, (i) objects, and (ii) morphisms. So the identity functor $Id_{\mathcal C}$ has, for every object $X$ in $\mathcal C$ and morphism $f:X\to Y$, the values $Id_{\mathcal C}(X)=X$ and $Id_{\mathcal C}(f)=f$.

I think it will be easier to see what's going on if you look at a specific category. So let's say $\mathcal C$ is the category of Sets. Then an object in $\mathcal C$ is just a set $X$, and a morphism $f:X\to Y$ is just a set function.

In this case, the identity morphism of a fixed set $X$ is just the identity map on $X$ that you're surely familiar with. It just has the value $id_X(x)=x$ for all $x\in X$.

On the other hand, a functor $F:\mathcal C\to\mathcal C$ assigns to every set $X$ a new set $F(X)$ and to every morphism $f:X\to Y$ a new morphism $F(f):F(X)\to F(Y)$. In the case of the identity functor, it just takes $X\mapsto X$ and $f\mapsto f$.

Related Question