def. Category. Category consists of collection and arrow (=morphism) which can compose. This composition must be:
- if there is an arrow from and there must be an arrow which we call :
- Q. If you have , then you should have , … ad infinitum? The set of morphisms isn’t closed under composition?
- Well yes, but you also define a “multiplication table”, composition of morphisms such that, e.g. , or such that prevents explosion of morphisms. ⇒ This multiplication table ensures set of morphisms is closed (in most categories).
- Q. If you have , then you should have , … ad infinitum? The set of morphisms isn’t closed under composition?
- each object must have an arrow mapping to itself, named where composition of it and any other morphism ,
-
where
- Multiple arrows pointing in the same direction can be present. Multiple arrows from an object to itself can be present aside from the identity.
- due to composition we can see compositions are associative:

Clarifying Morphisms
- Equality of morphism. An arrow or morphism from (=) are equal when .
- Order of composition. means that is applied first, then is applied. You read from right to left, just like function composition.
- Hom-set. is the set of all arrows going from
Constructing Simple Categories
- Categories with no objects, . Yes, it does satisfy axioms
- Category with 1 object. At least one morphism, the identity:

def. Free Construction. Take any Graph, which may not be a category. You add composition morphisms and identity morphisms to satisfy the category theory axioms. This is called free construction, and the category generated by a graph is a free category.
def. Discrete Category. This “has no structure,” i.e. is isomorphic to a simple set.

Programming
Motivation. Consider objects as types and morphisms as (pure) functions. Programming is basically writing morphisms that go from one type to another, and then composing them in desirable ways.