The usual definition of a category states: a category $\mathbf{C}$ consists of:

  1. A collection $\text{ob}(\mathbf{C})$ of objects
  2. A collection $\text{arr}(\mathbf{C})$ of arrows
  3. Some rules on the behaviour of these two types of objects

Leaving aside what collection here means, I realized that I have never seen a clear definition of what an arrow in a category is. Surely, in the typical categories like $\textbf{Set}$, $\textbf{Top}$ or $\textbf{Grp}$ arrows are functions that ... But there are categories whose arrows are not "functions".

If you have a poset $(P,\le)$ then you can get a category whose objects are elements of $P$ and such that there is an arrow $x\to y$ if and only if $x\le y$ in $P$. Okay but what kind of "entity" is the arrow there?, is there a precise, rigorous definition or do just have to accept that there are objects and arrows and asume that they follow the required rules, just like we asume there some things called "numbers" that follow the rules of arithmetic?

I hope I made myself clear


  • 5
    $\begingroup$ The quick answer to your question is that, yes, you "just have to accept that there are objects and arrows and asume that they follow the required rules". The "precise, rigorous definition" of objects and arrows are given by the usual definition of a category you allude to. It is a simple as that. Don't worry about it. $\endgroup$
    – Somos
    Mar 28, 2020 at 22:41
  • 2
    $\begingroup$ What exactly is an object in a category? $\endgroup$
    – Carsten S
    Mar 29, 2020 at 15:16
  • 5
    $\begingroup$ I feel like the category theorist answer is "something you can sensibly compose" because that's all they really care about - the same way they might try to tell you that a pair is just something that has a first component and a second component (in whatever codomains are specified) or a function is just something you can apply to values. $\endgroup$ Mar 30, 2020 at 1:12
  • $\begingroup$ Yeah, "arrows" as such are just undefined primitives of the theory meant to capture the notion of functional and other similar forms of composition. $\endgroup$
    – nomen
    Mar 30, 2020 at 22:04
  • $\begingroup$ What is the point of this question? :-) $\endgroup$
    – copper.hat
    Mar 31, 2020 at 6:31

6 Answers 6


There are already many excellent answers, but I want to add another perspective, already partly found in other answers, but I hope distinct enough to stand on its own.

I like to explain by analogy. Consider the question, "What is a vector?"

What is a vector?

Well, you might get you any of the following informal definitions as a response:

(a) a list of numbers, (b) a quantity with magnitude and direction, (c) a quantity that transforms like a vector under a change of coordinates.

(I think I might know some physicists who would take issue with me calling (c) informal, but oh well).

And you might then ask, well ok, but what's a formal definition of a vector?

Let's think of some examples of vectors. The elements of $\Bbb{R}^3$, the elements of $\Bbb{R}[x]$, continuous functions from $X$ to $\Bbb{R}$, where $X$ is a topological space. These seem like fairly different objects, but the common factor here is that a vector is simply an element of a set $V$ with a specified vector space structure. I.e., the formal definition of vector is simply an element of a vector space.

Why is this useful as a definition? Well, all of the properties of vectors are already encoded in the definition of vector space. So if I tell you that $v,w$ are vectors in $V$, and $r\in\Bbb{R}$ is a scalar, then you know that $v+w$ is also a vector, and that $rv$ is a vector, and that $r(v+w)=rv+rw$. All the properties of a vector that we might find interesting are encoded in the vector space axioms.

Note also that part of this means that it's meaningless to say $v$ is a vector on its own. It's only meaningful to say that $v$ is a vector of some vector space $V$. This is good, because as an element $v$ might belong to many different vector spaces with different structures, but depending on the ambient vector space structure, $v$ might behave completely differently.

Bringing it back to arrows

Similarly, if I say $f:X\to Y$ is an arrow of a category $\mathcal{C}$. The rigorous definition of arrow here is simply that $f$ belongs to the collection of arrows $\operatorname{Arr}(\mathcal{C})$, and that the domain of $f$ is $X$ and the codomain of $f$ is $Y$. All of the other interesting properties of arrows (for example that I could compose $f:X\to Y$ with an arrow $g:Y\to Z$ to get an arrow $g\circ f:X\to Z$) are already encoded in the axioms of the category $\mathcal{C}$, and there's no need to say anything further to define arrows.


Since comments are not permanent, I just want to edit in the link from Ethan Bolker's comment, to an excellent answer with a similar viewpoint to this one in reply to a similar (in spirit) question about "what actually is a polynomial?" The second paragraph in particular really captures what I wanted to say in my answer, (paraphrasing Ethan's answer) what really matters isn't what something actually is, but rather how it behaves.

  • 7
    $\begingroup$ +1 I think this is the best answer. For any mathematical abstraction, what it "actually is" is not relevant. What matters is how it behaves - which is specified by the axioms/assumptions that define it. See math.stackexchange.com/questions/2185587/… $\endgroup$ Mar 29, 2020 at 15:30
  • 3
    $\begingroup$ Speaking as a physicist, I can confirm that there are physicists who would object to (c) being a "informal" definition. However, I agree that those physicists are wrong. :-) $\endgroup$ Mar 29, 2020 at 23:07
  • $\begingroup$ Definition (c) has to be informal because it's circular. A change of coordinates is a change of representation from one basis to another, and a basis is a linearly independent spanning set of vectors. Once you've got vector down, you can say that a tensor is a thing that transforms like a tensor if you like, but you can't start with vectors if you're pretending to be rigorous. $\endgroup$ Mar 30, 2020 at 1:25
  • $\begingroup$ Actually, (c) is informal because the proper definition states, that a vector is anything that is a member of a vector space - which then begs the question, "what is a vector space?" :-) $\endgroup$
    – j4nd3r53n
    Mar 30, 2020 at 6:40
  • $\begingroup$ This is a great answer but I think it's missing something. Mainly WHY would you want to have something like a vector in the general sense or arrow in the general sense. Why not always talk about the elements of $R^3[x]$ and $Hom_C(A,B)$? The reason being that sometimes thinking about the more abstract concept makes it easier to notice properties and also makes the theorems you get much more applicable. $\endgroup$
    – DRF
    Mar 30, 2020 at 18:24

$\text{Hom}_C(A,B)$ can be literally any set you want and has nothing at all to do with functions $A \rightarrow B$, as long as you define what "composing" arrows means and there is an identity arrow for each object you have a category, your set of arrows can be literally any set you want. Same goes for your collection of objects. Just to get my point across (risking sounding ridiculous) I will give an extreme example.

I can define a category $\mathcal C$ where there are two objects, "Apple" and "Banana" and we define

$$\text{Hom}(\text{Apple}, \text{Banana}) = \{x \in \mathbb N: \text{The word "father" is mentioned on page } x \text{ in the bible}\}$$

$$\text{Hom}(\text{Banana},\text{Apple}) = \emptyset$$

$$\text{Hom}(\text{Banana},\text{Banana}) = \text{Hom}(\text{Apple},\text{Apple}) = \{*\}$$

We define composition in the only way possible letting $*$ be an identity arrow for both "Apple" and "Banana".

Here an arrow in $\mathcal C$, $\text{Apple} \rightarrow \text{Banana}$ is a natural number.

An example of a collection of objects and arrows that does not form a category (again, at the risk of sounding ridiculous) is if the objects of $\mathcal D$ is the people on earth and an arrow $X \rightarrow Y$ is a date that $X$ has shaked $Y's$ hand on. Yesterday I met my professor so there is an arrow $$\text{(27th of march 2020)}: \text{Noel} \rightarrow \text{Noel's professor}$$

Let's say that there is an arrow $X \rightarrow Y$ and an arrow $Y \rightarrow Z$ in $\mathcal D$, can we even guarantee that there exists an arrow $X \rightarrow Z$? We can't since $X$ hasn't necessarily shaked $Z's$ hand.

Does this get my point across? I will give a more mathematical example of a category where morphisms aren't in any way functions. The category $\textbf{Set}^{op}$ has objects all the sets and we define an arrow in $\textbf{Set}^{op}$ $A \rightarrow B$ to be a function $B \rightarrow A$ in $\textbf{Set}$. That's enough examples! Hope you understood.

  • 5
    $\begingroup$ -1 for a silly unrealistic example. (Clearly you did not shake hands with your professor yesterday... coronavirus?) — ((kidding)) $\endgroup$ Mar 29, 2020 at 18:37

An arrow is an element of the set of arrows. The set of arrows is any set you want.

Let me explain by talking about directed graphs. You can imagine a category as a directed graph with an associative composition law. A directed graph is something with a set of vertices $V$ and a set of directed arcs $A$ together with a source and target function $s, t : A \to V$. Now normally we do something like set $V = \{1,\dots,n\}$ and $A \subseteq V \times V$ and $s(a,b) = a$ and $t(a,b) = b$. This is a common encoding, but there's nothing in the definition of a directed graph that says that $A$ must be a set of ordered pairs and $s$ and $t$ must be the first and second coordinates of those pairs. I could just as well have $V = \{1,2,3,4\}$ and $A = \{1,2,3\}$ with $s(i) = i$ and $t(i) = i + 1$. This also defines a directed graph.

So for categories, the set of arrows is literally just any set and any element of that set is called an arrow. Maybe for convenience you want your arrows encoded as ordered pairs but the definition doesn't force any particular encoding on you.

P.S. Actually you probably don't want your arrows to be ordered pairs because often ${\rm Hom}(A,B)$ has multiple elements whereas there is only one ordered pair $(A,B)$. Maybe for posets this is an OK encoding though.


I recall a really fun talk at a topology conference sometime in the late 1980s/ early 1990s. The speaker said "we're going to take as objects in a category the set of finite collections of evenly-distributed points on the $x$-axis between $x = 1$ and $x = 2$ -- we might have 3 points or 12 points or ...whatever."

OK, so far I was following him. Then he said "and a morphism in this category will be a braid arranged thus":

enter image description here

where the locations and directions of over- and under-crossings was arbitrary. He then went on to talk about natural transformations from this category to various others, developing knot polynomials in a remarkably abstract way. I have no idea whether anyone still does this sort of thing, but at the time, it was kinda mindblowing to see something so very concrete as a 'morphism'. I leave it to you to guess how composition of morphisms was defined...

  • $\begingroup$ Very cool! I take it the origin is punctured to prevent funny business? $\endgroup$ Mar 29, 2020 at 7:09
  • $\begingroup$ I seem to recall that the origin is NOT punctured, so that there are many "braid" descriptions of an single knot in 3-space. (The unknot, for instance, arises as a morphism from a one-point object to itself -- there's only one! -- or as a morphism from the two-point object to itself having exactly one "swap".) $\endgroup$ Mar 29, 2020 at 11:45
  • 1
    $\begingroup$ How does this answer the question? $\endgroup$
    – Taladris
    Mar 29, 2020 at 14:40
  • 3
    $\begingroup$ It's an example to show that arrows don't have to be "functions", for instance, as they are in so many categories (Groups, arrows are homomorphisms; vector spaces, arrows are linear maps; sets, arrows are functions; smooth manifolds, arrows are smooth maps; ...) Whether seeing an example like this helps OP to understand the more general idea that "object and arrows" really can be just about anything...well, I can hope. $\endgroup$ Mar 29, 2020 at 18:46
  • $\begingroup$ I'm a bit confused: shouldn't morphisms be between pairs of objects? I imagine the category is of braids, and what you're describing is the (Markov) "trace" of a morphism to get a link. People still study categories like this, though probably categories of tangles instead. Maybe you mean 'functors' instead of 'natural transformations'? $\endgroup$ Mar 29, 2020 at 20:45

To respond to your first remark, the collections $ob(C)$ and $arr(C)$ are what we call $\textbf{classes}$. Naively, this means that we can think of them each as a "set," except that they do not necessarily obey the axioms that are necessary to describe them as a set in the formal sense. If this feels wishy-washy to you, that is because it is. For a more satisfactory definition, you might be interested in looking through Categories for the Working Mathematician, by Mac Lane.

From this perspective, a particular arrow $f\in \text{Hom}(A,B)$ is just an element of the class of the arrows from $A$ to $B$. The category in question should define precisely what exactly this class is comprised of, but in general, an arrow is not a particularly sophisticated "entity;" it is just an element of this class.

For categories which we call $\textbf{small}$, the classes $ob(C)$ and $arr(C)$ are actually sets, and then an arrow is just an element of the set $arr(C)$ which satisfies the formal properties that are outlined in the definition of a category.


Given two objects $A$ and $B$, there is an associated set/class (depending on your definition) $\operatorname{Hom}_\mathcal{C}(A,B)$ of morphisms $A \to B$. An arrow is just such a morphism, i.e. an element of this set/class.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .