In category theory, different types of notation are common. Ubiquitous and important in the formalism is diagram notation. I like to think of it as follows: the diagram finds natural expression in category theory because, as emphasised in the first entry of my notes, in approaching the idea of a category we may take the view that what we are defining is the language of morphisms. Indeed, it is the primacy of morphisms, and not the objects of a category, that is emphasised.
Recall that morphisms – what we have also described as structure-preserving maps – are represented graphically as arrows. From this, the next important idea is composition – that is, a view of all of the ways in which we may compose arrows. As discussed, composition is built into the definition of a category, and one observation that may be proffered is that, as a language of morphisms, when working toward category theory we may extend our view that it is furthermore a minimalist language of composition. (Eventually, once we discuss categorical products and functors (a kind of morphism of categories), we will extend this view of category theory as fundamentally the language of duality). In a sense, it is as though we are building the ideas in stages. Putting these two things together, the primacy of morphisms and the rule of composition, we also arrive at the notion of how we may express the equality of arrows using diagrams.
Categorical diagrams are powerful for many reasons. One reason has to do with how a new proof technique is devised: i.e., what is called the diagram chase . For example, commutative diagrams are utilised as a new technique of proof in homology theory. In this note, as a matter of introduction, we will think about diagrams and morphisms in a basic way. Saunders Mac Lane  motivates it concisely, ‘Category theory starts with the observation that many properties of mathematical systems can be unified and simplified by a presentation with diagrams of arrows’. Furthermore, in these notes, while ‘[m]any properties of mathematical constructions may be represented by universal properties of diagrams’, eventually the motivation is to study physical objects like branes.
The notion of a diagram
What follows is a very brief introduction to the notion of a diagram. In particular, we are talking here about commutative diagrams. We will be somewhat informal in definition. The reason is as follows: there are two ways to approach the concept of a diagram and to give it definition. One way is through the notion of a functor, which is the way I prefer, but it is less intuitive and the topic of functors has been saved for more advanced discussion. Another way comes from a more direct and perhaps intuitive representation, namely how we may approach the commutative diagram as a directed graph of morphisms in a category.
Let’s start with something basic and familiar, an example of structured sets. A lot of objects in mathematics may be thought of as structured sets, and we can begin with a basic illustration of a structured graph with arrows from one vertex to another. This can be thought of as extra structure, or, indeed, a set with structure. A simple graphical representation is given below.
Here we have a vertex set of some graph mapped to vertex set of another graph. The arrows represent a function that preserves the graph structure. That is, there is a graph (homo)morphism such that, if vertex is linked to then is linked to . That is to say, if and are linked in one graph, then the image of is linked to the image of . (In fact, if we were working in category theory it would be said that this forms another category).
Now, let us advance this idea. Consider a set and a set . Define an arrow representing a function from to , following the rule that assigns to each element an element . A diagram of sets and functions may be written as below.
Here we have a commutative triangle, which we may define as a category (suppressing identity arrows, etc. in the diagram) in which the hypotenuse equals the composite . In other words, this diagram is commutative when , where is the composite function . Generally, a diagram commutes if any two paths of composable arrows in the directed graph with common source and target have the same composite. The vertices in the graph are labelled by objects in the category, and the edges are labelled by morphisms (arrows) in the category.
Definition 1. A category diagram is commutative if for every pair of objects, all directed paths from one to the other give rise to the same morphism, i.e., the composite arrow along the first path is equal to the composite arrow along the second path.
As a matter of convention, unless explicitly stated otherwise, in these notes (and in many texts) a diagram is commutative.
The language of morphisms
It is beneficial to think a bit more about different kinds of arrows and how they interact with other arrows in the relevant category. (This is a very brief review, and more detail can be found in [1, 2, 3, 4]).
In set-theoretic language, when we speak of sets we can of course speak of elements of those sets. In category-theoretic language, however, when speaking of the category Set it is no longer possible to speak of the elements of sets as each set is simply an object in Set. More pointedly, objects in categories have nothing ‘inside’ of them in the way we may think of elements of a set. In this sense, it is nice to think of the idea of a category as a representation of structure. One may then be inclined to ask: where is the information? How does one know how many elements there are in these sets? Is there a loss of information? It turns out that we don’t really lose information. In the example of Set, we can recover information about the sets just from knowing the object that represents the sets and arrows between the objects that represent the functions. The main tool at our disposal, again, is the morphism. What categorical language and logic gives us is not so much a disadvantage as a valuable shift in perspective.
As Emily Riehl writes, ‘A category provides a context in which to answer the question, “When is one thing the same as another thing?”. Almost universally in mathematics, one regards two objects of the same category to be “the same” when they are isomorphic’.
Take a simple set theoretical example of an isomorphism.
Here we have a one-to-one map. The property of having an inverse is what makes this map an isomorphism. Notice, if we compose and we obtain an identity . Similarly, if we compose and we obtain an identity . Now, compare this with a category-theoretic view of an isomorphism.
Here we have an arrow , which is an isomorphism if there exists such that and .
Definition 2. In a category , two objects are isomorphic (to each other) if there are , such that and . In this case, we say that and are isomorphisms, and write .
If is an isomorphism, the morphism such that is uniquely determined. We write , and say that is the inverse of
Different categories possess different notions of isomorphism. Standard examples include: in the category Set, isomorphisms are bijective functions; in Grp they are bijective group (homo)morphisms; in the category of metric spaces Met (with non-expansive maps), they are isometries; in Vect they are invertible linear transformations; and in the category of topological spaces Top, they are (homeo)morphisms (i.e. continuous bijections with continuous inverses). In the language of category theory, it is generally not the case that one might distinguish between isomorphic objects. Instead, objects are determined ‘up to isomorphism’, which is a pertinent point that will be highlighted again when we start discussing categorical homotopy theory among other things.
Definition 3. A morphism is a monomorphism if it satisfies the property: for every , , . This property is called left cancellation.
If is a monomorphism, this is conventionally denoted or . In adjectival form, an monomorphism is mono.
Example. Consider the category Top of locally path-connected, pointed topological spaces (a pointed space is a space together with a choice of basepoint). Let be such a space and a covering map (which may or may not be injective). This covering map is a monomorphism. Having restricted to the case where we can lift maps to back up to the covering space , any map which can be factored through as some map can be lifted. Since the basepoint is fixed, it can be lifted uniquely back to , picking out arrows from some space to . Since these maps are both lifts of the maps , uniqueness of lifts gives .
Definition 4. A morphism is an epimorphism if it satisfies the property: for every , , . This property is called right cancellation.
When is an epimorphism, it is convention to represent it as . In adjectival form, an epimorphism is epic.
Example. Consider the category TopHaus of Hausdorff topological spaces. Let be the category of TopHaus, and be the standard inclusion. If is another Hausdorff topological space, are continuous functions with . Then it can be argued using the fact that in Hausdorff spaces, convergent sequences have at most one limit, and continuous functions preserve limits: for any , where . It follows,
The injection from to is not a surjection, even though it is an epimorphism.
Sections and retractions
Definition 5. Let be a category. A section is a morphism such that there is some morphism with . Sometimes it is said that is a section of , or a right inverse to . Given , if such an exists we say that admits a section. All sections are monomorphisms.
Definition 6. A retraction is a morphism such that there is some morphism with . Sometimes it is said is a retraction of, or left inverse to, . Given , if such an exists we say that admits a retraction. All retractions are epimorphisms.
If a morphism is both a section and a retraction, then it is an isomorphism.
Monomorphisms and epimorphisms should be regarded as categorical analogues of the notions of injective and surjective functions (see Section 1.2 in ).
Though we have yet to study duality in a category-theoretic context, it is interesting that notions of monomorphism and epimorphism are dual, which means their abstract categorical properties are also dual (see Lemma 1.2.11. in ).
It is fairly straightforward, I think, to see that identity arrows are always monic. Dually, they are thus always epic as well. A number of theorems also follows, which, for intuitive explanation, can be reviewed in Section 5.1. in .
 E. Riehl, Category theory in context. Dover Publications, 2016. [online].
 S. Mac Lane, Category theory for the working mathematician. Springer, 1978. [online].
 P. Smith, Category theory: A gentle introduction [online].
 D. Epelbaum and A. Trisal, Introduction to category theory. [Lecture notes].