Category theory studies structured and their relationships at a high level of abstraction, focusing on objects and arrows (morphisms) and how arrows compose.
It unifies mathematics via functors (morphisms between categories) and natural transformations (morphisms between functors).
EXAMPLE
For categories that are sets with special structure, morphisms are functions that preserve that structure.
For Set: objects are sets, morphisms are plain functions.
For Grp: objects are groups, morphisms are homomorphisms.
For Vect: objects are vector spaces, morphisms are linear transformations.
For Top: objects are topological spaces, morphisms are continuous functions.
For programming: objects are types, morphisms are functions
Category
A category consists of:
A class , whose elements are called objects (nodes)
A class , whose elements are called morphisms (arrows)
Each morphism has a source object and a target object , written
The hom-class denoted , or or is the class of all morphisms from to .A binary operation , called composition of morphisms.
…
A note on notation
The name “hom” derives from the fact that the notion of morphism is a generalisation of the notion of homomorphism. But even in categories whose objects have no notion of homomorphism or where the morphisms are explicitly not (or not precisely) homomorphisms, the classes are still referred to as hom-classes.’ src
Sigh
Isomorphic
For two objects in a category, if there exists arrows and such that:
, i.e. the objects are isomorphic, the functions are called isomorphisms.
They have the same structure (size, …).
Terminal object
For every object in a category, there exists a unique morphism:
For example in Set, the terminal object is the singleton set , since there is exactly one function from any set to a singleton set (the one that maps every element to ).
All terminal objects in a category are isomorphic.
Since for any two terminal objects there exist unique morphisms and , and and must be the identity morphisms (since terminal objects have exactly one morphism from any object to them), making and thus .
From a categorical perspective, there is only one terminal object, for any category.
Universal construction
1: Define a construction (object + morphisms to/from it).
2: Find a universal property (a property that uniquely characterizes the construction up to isomorphism).
1+2 = a universal construction.
EXAMPLE
Terminal object: 43 ( for every ).
Product: The smaller of two numbers (greatest lower bound).

