Mathematics is a *huge* subject.

Category theory is one area of mathematics dedicated to exploring the commonality of structure between different branches of mathematics.

Categorical language allows us to ascend a layer of abstraction and recognize the obvious underlying principles that guide seemingly unrelated concepts. Generality facilitates connections.

#### What is a category?

A category \(C\) consists of:

- a
__class of objects__\(Ob(C)\) - For every ordered pair of objects \(X\) and \(Y\), a set \(C(X,Y)\) of
__morphisms__with*domain*\(X\) and*range*\(Y\) [\(C(X,Y)\) is possibly empty] Note: \(f \in C(X,Y) \equiv f : X \rightarrow Y \equiv X \overset{f}{\rightarrow} Y\). - For every object an
__identity__morphism \(Id_x \in C(X,X)\). - A
__composition__law \\(C(X,Y) \times C(Y,Z) \rightarrow C(X,Z)\\) \\((g,f) \rightarrow f\cdot g\\)

The concept of *composition* follows naturally from the definition of path equivalence in graph theory: *Two paths with the same source as destination are equal.* Additionally, categories must satisfy the laws of *associativity* and *identity*.

#### Category Laws

Categories must obey 2 laws:

- Composition must be associative:
- Every object \(a\) in \(C\) has a morphism \(id_a\) which is equivalent to a loop in graph theory. The identity morphism \(id_a\) connects the object \(a\) to itself, \\(id_a: a \rightarrow a\\).

*Two paths are equal if the source and destination of the paths are equal.* With this in mind, we can represent the category laws of identity and associativity with diagrams.

Follow the arrows, recall that we write function composition backward! If we traverse \(f\) then \(g\), it is the convention to write \(g \circ f\)

Examples:

Groups, together with group homomorphisms, form a category (we will discuss these next lecture for those who have not danced with abstract algebra).

Each of the natural numbers is a category:

#### Categories have some nice properties

Any property which can be expressed in terms of (category, objects, morphism, and composition):

**Dual:**\(D\) is \(C\) with reversed morphisms**Initial:**\(Z in obj(C)\) s.t. \(\forall Y \in obj(C)\), #\(hom(Z,Y) =1\). In other words: an object is initial if there exists a unique morphism from that object to any other object in \(C\).**Terminal:**\(T \in obj(C)\) s.t. \(T\) is initial in the dual of \(C\)**Functor:**Structure preserving mapping between categories

#### Homomorphims Between Categories: What the func is a functor?

An example of associating morphisms from \(C\) to \(D\) with the functor \(F(C)\).

#### A Reflection on the Unfication of Familiar Concepts

A few categories you have likely encountered before without recognizing it:

- Set (sets and functions)
- Vec (vectorial spaces and linear transformations)
**Top (topological spaces and continuous maps)**- Grp (groups and homomorphisms) — we will be discussing these next lecture for those who have not danced with abstract algebra.
- Ab (abelian groups and homomorphisms)
- Hask (Haskell types and functions)
- Cat (categories and functors)

A categorical key to highlight some of the relationships between structure preserving maps:

Here are some more advanced examples for those who feel groovy and algebraic:

- \(R\)-Mod (R-modules and homomorphisms)
- \(Gr_R\) (\(\mathbb{Z}\)-graded \(R\)-modules and graded \(R\)-module homomorphisms)