# To what extent are morphisms required to be functions?

Just beginning category theory, and I am looking for clarification on the precise nature of morphisms. The most familiar categories, e.g. $\mathbf{Top}$, have morphisms that are functions in the traditional sense, i.e. subsets of $A \times B$ such that for $(a_1,b_1)$ and $(a_2,b_2)$, $b_1 \not= b_2 \implies a_1 \not= a_2$.

But considering a category such as $\mathbf{Rel}$ where the morphisms are only relations, this seems not to be constant. It would seem a priori that the minimal structure required to be a morphism is having a well defined source and target and notion of composition; how is this formalized?

Apologies for the somewhat vague nature of this question. What I am asking is can we regard a morphism as an ordered pair (domain and codomain) which may or may not have additional structure?

-
In the definition of a category?! – Martin Brandenburg Jul 4 '13 at 10:28
No, they needn't be functions. After all, the data defining a category is mainly contained in the $\circ$ operation, which tells you the result of composing two morphisms. What those morphisms actually 'are' is irrelevant. – goblin Jul 4 '13 at 11:55
Cameron, I think you should go back and think about groups. e.g. Its true that the permutations of a set $X$ (in other words, the bijections $X \rightarrow X$) form a group with respect to function composition. Its also true that every group is isomorphic to a group whose law of composition is function composition, and whose underlying set consists of bijections $X \rightarrow X$ for some fixed set $X$. But, its not true that every element of a group is a function! That's the point of abstraction - it's not about what the elements of a group are, its about how they relate. – goblin Jul 4 '13 at 11:59
Think about monoids as a category. E.g. Think of ℕ as a monoid. You can create the category that has a single object, *, and all morphism f: * → * represent a natural number. Composition is the usual + between natural numbers. It's quite easy to show that this is a category, but the morphisms are plain numbers. – Bakuriu Jul 4 '13 at 18:06

".... how how is this formalizes?"

answer: It's formalized by the definition of category. In a category, the morphisms don't have to have any structure on their own. All that is required is that you know what the domain and docomain of each morphism are, and that you know how to compose morphisms (and, of course, that the category axioms are satisfied).

-
So can we essentially identify a morphism as an ordered pair of objects which may or may not have some additional structure? – Cameron Jul 4 '13 at 10:40
no, since you can have different morphisms with the exact same domain and codomain. – Ittay Weiss Jul 4 '13 at 10:53
But is the ability to distinguish between two morphisms with identical domain and codomain baked into the definition, or is that merely a feature of the specific category under consideration? Taking the category induced by a directed graph, for instance, seems to imply that nothing more is inherently necessary. – Cameron Jul 4 '13 at 11:05
no, a morphism in a category is nothing more then its domain and codomain, together with its behaviour as dictated by the composition function. – Ittay Weiss Jul 4 '13 at 11:12
is docomain some nomenclature I'm unaware of or is it meant to read co-domain? – jk. Jul 4 '13 at 14:49

Every partially ordered set (poset) is a category; $x\to y$ iff $x\le y$. The morphism here is the ordered pair $\langle x,y\rangle$, which is not a function: it’s not a set of ordered pairs. Composition in this case is just ‘cutting out the middleman’; that it’s available is a consequence of transitivity.

The definition of category imposes certain conditions on morphisms, but it doesn’t say anything about their internal structure. Anything that satisfies those conditions — here just certain ordered pairs — gives you a category.

-

Morphisms are part of the data of a category, so I'm not entirely sure what you're asking. What you need for a morphism in category is: source, target, and a composition that is associative. Moreover, every object has an identity morphism that behaves as one'd expect it to behave.

It is often important to know what the morphisms are, since the same class of objects may have different morphisms, hence giving a different category. Consider, for instance, categories with topological spaces as objects. If you take standard maps as morphism, you get the category you mentioned. You may, however, also take homotopy classes of maps to be the morphisms. What you get is the so-called homotopy category. And if you, for instance, look at based topological spaces, you can consider the base-point preserving maps as morphisms, but you get a different category if you let the germs of maps (around the base point) be the morphisms.

-

You are right Cameron, the only requirement for something to be a morphism is to have a domain and a codomanin. In more detail, take the definition of category for ex. from Wikipedia:

There are many equivalent definitions of a category. One commonly used definition is as follows.

A category C consists of

a class ob(C) of objects

a class hom(C) of morphisms, or arrows, or maps, between the objects.

Each morphism f has a unique source object a and target object b where a and b are in ob(C). We write f: a → b, and we say "f is a morphism from a to b". We write hom(a, b) (or $hom_C(a, b)$ when there may be confusion about to which category hom(a, b) refers) to denote the hom-class of all morphisms from a to b. (Some authors write Mor(a, b) or simply C(a, b) instead.) for every three objects a, b and c, a binary operation hom(a, b) × hom(b, c) → hom(a, c) called composition of morphisms; the composition of f : a → b and g : b → c is written as g ∘ f or gf. (Some authors use "diagrammatic order", writing f;g or fg.) such that the following axioms hold: (associativity) if f : a → b, g : b → c and h : c → d then h ∘ (g ∘ f) = (h ∘ g) ∘ f, and (identity) for every object x, there exists a morphism 1x : x → x (some authors write idx) called the identity morphism for x, such that for every morphism f : a → b, we have 1b ∘ f = f = f ∘ 1a.

As you see there is nothing about the nature of the morphisms, in particular it does not say that they are functions and indeed in many noteworthy cases they are not functions.

The definition requires that each morphism have a domanin and a codomain. How is this obtained formally? Very simple (and some other sources make it explicit, eg Mac Lane ), you state that there are 2 functions - called dom and cod - that respectively associate to a morphism f its domain and codomain.

$$dom: hom(C)\to ob(C)$$ $$cod: hom(C)\to ob(C)$$

So dom(f) / cod(f) is the object which is the domain / codomain of f.

These are total functions, that means that they are defined on every morphism (every morphism has a domain and a codomain).

They are generally not injective functions (you may have 2 morphisms with the same domain and/or codomain).

They are surjective (given any object a, there is at least one morphism - called the identity morphism $Id_a$ - such that $dom (Id_a) =a$ and $cod (Id_a) =a$ ).

-