A constant morphism in a category is a morphism with the property that if are morphisms in then . In other words, for every object , at most one morphism from to factors through .
Thus, is a constant morphism if the function given by composition with is a constant function for every object .
Another definition that is sometimes used is the following.
A morphism in a category is constant if, for every object , exactly one morphism from to factors through . Assuming that has a terminal object, is constant iff it factors through this terminal object.
This second definition implies the first, but they are not equivalent in general. In the category of sets, the first implies the second if the set is inhabited. More generally, if is a morphism in a category , then the two definitions are equivalent if is inhabited for every . If has a terminal object , then this is equivalent to the existence of a global section .