A category C consists of the following data:

A collection * Obj(C)* of objects. We will write “

*” to mean that “*

**x ∈ C***“*

**x ∈ Obj(C)**For each ordered pair * x, y ∈ C* there is a collection

*of arrows. We will write*

**Hom**_{C}(x, y)*to mean that*

**α∶x→y***. Each collection*

**α ∈ Hom**_{C}(x,y)*has a special element called the identity arrow*

**Hom**_{C}(x,x)*. We let*

**id**_{x}∶ x → x*denote the collection of all arrows in*

**Arr(C)***.*

**C**For each ordered triple of objects * x, y, z ∈ C* there is a function

* ○ ∶ Hom_{C} (x, y) × Hom_{C}(y, z) → Hom_{C} (x, z)*, which is called composition of arrows. If

*and*

**α ∶ x → y***then we denote the composite arrow by*

**β ∶ y → z***.*

**β ○ α ∶ x → z**If each collection of arrows * Hom_{C}(x,y)* is a set then we say that the category

*is locally small. If in addition the collection*

**C***is a set then we say that*

**Obj(C)***is small.*

**C**Identitiy: For each arrow * α ∶ x → y* the following diagram commutes:

Associative: For all arrows * α ∶ x → y, β ∶ y → z, γ ∶ z → w*, the following diagram commutes:

We say that * C′ ⊆ C* is a subcategory if

*and if*

**Obj(C′) ⊆ Obj(C)***we have*

**∀ x,y ∈ Obj(C′)***. We say that the subcategory is full if each inclusion of hom sets is an equality.*

**Hom**_{C′}(x,y) ⊆**Hom**_{C}**(x,y)**Let * C* be a category. A diagram

*is a collection of objects in*

**D ⊆ C***with some arrows between them. Repetition of objects and arrows is allowed. OR. Let I be any small category, which we think of as an “index category”. Then any functor*

**C***is called a diagram of shape*

**D ∶ I → C***in*

**I***. In either case, we say that the diagram*

**C***commutes if for all pairs of objects*

**D***in*

**x,y***, any two directed paths in*

**D***from*

**D***to*

**x***yield the same arrow under composition.*

**y**Identity arrows generalize the reflexive property of posets, and composition of arrows generalizes the transitive property of posets. But whatever happened to the antisymmetric property? Well, it’s the same issue we had before: we should really define equivalence of objects in terms of antisymmetry.

Isomorphism: Let * C* be a category. We say that two objects

*are isomorphic in*

**x,y ∈ C***if there exist arrows*

**C***and*

**α ∶ x → y***such that the following diagram commutes:*

**β ∶ y → x**

In this case we write * x ≅_{C} y*, or just

*if the category is understood.*

**x ≅ y**If * γ ∶ y → x* is any other arrow satisfying the same diagram as

*, then by the axioms of identity and associativity we must have*

**β****γ = γ ○ id _{y} = γ ○ (α ○ β) = (γ ○ α) ○ β = id_{x} ○ β = β**

This allows us to refer to * β* as the inverse of the arrow

*. We use the notations*

**α***and*

**β = α**^{−1}* β^{−1} = α*.

A category with one object is called a monoid. A monoid in which each arrow is invertible is called a group. A small category in which each arrow is invertible is called a groupoid.

Subcategories of Set are called concrete categories. Given a concrete category * C ⊆ Set* we can think of its objects as special kinds of sets and its arrows as special kinds of functions. Some famous examples of conrete categories are:

• Grp = groups & homomorphisms

• Ab = abelian groups & homomorphisms

• Rng = rings & homomorphisms

• CRng = commutative rings & homomorphisms

Note that Ab ⊆ Grp and CRng ⊆ Rng are both full subcategories. In general, the arrows of a concrete category are called morphisms or homomorphisms. This explains our notation of **Hom _{C}**

_{.}

* Homotopy*: The most famous example of a non-concrete category is the fundamental groupoid

*of a topological space*

**π**_{1}(X)*. Here the objects are points and the arrows are homotopy classes of continuous directed paths. The skeleton is the set*

**X***of path components (really a discrete category, i.e., in which the only arrows are the identities). Categories like this are the reason we prefer the name “arrow” instead of “morphism”.*

**π**_{0}(X)* Limit/Colimit*: Let

*be a diagram in a category*

**D ∶ I → C***(thus*

**C***is a functor and*

**D***is a small “index” category). A cone under*

**I***consists of*

**D**• an object * c ∈ C*,

• a collection of arrows * α_{i} ∶ x → D(i)*, one for each index

*,*

**i ∈ I**such that for each arrow * δ ∶ i → j* in

*we have*

**I**

**α**_{j}= D(δ) ○ α_{i }In visualizing this:

The cone * (c,(α_{i})_{i∈I})* is called a limit of the diagram

*if, for any cone*

**D***under*

**(z,(β**_{i})_{i∈I})*, the following picture holds:*

**D**[This picture means that there exists a unique arrow * υ ∶ z → c* such that, for each arrow

*in*

**δ ∶ i → j***(including the identity arrows), the following diagram commutes:*

**I**When * δ = id_{i}* this diagram just says that

*. We do not assume that*

**β**_{i}= α_{i}○ υ*itself is commutative. Dually, a cone over*

**D***consists of an object*

**D***and a set of arrows*

**c ∈ C***satisfying*

**α**_{i}∶ D(i) → c*for each arrow*

**α**_{i}= α_{j}○ D(δ)*in*

**δ ∶ i → j***. This cone is called a colimit of the diagram*

**I***if, for any cone*

**D***over*

**(z,(β**_{i})_{i∈I})*, the following picture holds:*

**D**When the (unique) limit or colimit of the diagram * D ∶ I → C* exists, we denote it by

*or*

**(lim**_{I}D, (φ_{i})_{i∈I})*, respectively. Sometimes we omit the canonical arrows*

**(colim**_{I}D, (φ_{i})_{i∈I})*from the notation and refer to the object*

**φ**_{i}*as “the limit of D”. However, we should not forget that the arrows are part of the structure, i.e., the limit is really a cone.*

**lim**_{I}D ∈ CPosets: Let P be a poset. We have already seen that the product/coproduct in P (if they exist) are the meet/join, respectively, and that the final/initial objects in P (if they exist) are the top/bottom elements, respectively. The only poset with a zero object is the one element poset.

Sets: The * empty set ∅ ∈ Set* is an initial object and the

**one point***is a final object. Note that two sets are isomorphic in Set precisely when there is a bijection between them, i.e., when they have the same cardinality. Since initial/final objects are unique up to isomorphism, we can identify the initial object with the cardinal number 0 and the final object with the cardinal number 1. There is no zero object in Set.*

**set ∗ ∈ Set**Products and coproducts exist in Set. The product of * S,T ∈ Set* consists of the Cartesian product

*together with the canonical projections*

**S × T***and*

**π**_{S}∶ S × T → S*. The coproduct of*

**π**_{T}∶ S × T → T*consists of the disjoint union*

**S, T ∈ Set***together with the canonical injections*

**S ∐ T***and*

**ι**_{S}∶ S → S ∐ T*. After passing to the skeleton, the product and coproduct of sets become the product and sum of cardinal numbers.*

**ι**_{T}∶ T → S ∐ T[Note: The “external disjoint union” * S ∐ T* is a formal concept. The familiar “internal disjoint union”

*is only defined when there exists a set*

**S ⊔ T***containing both*

**U***and*

**S***as subsets. Then the union*

**T***is the join operation in the Boolean lattice*

**S ∪ T***; we call the union “disjoint” when*

**2**^{U}*.]*

**S ∩ T = ∅**Groups: The trivial group * 1 ∈ Grp* is a zero object, and for any groups

*the zero homomorphism*

**G, H ∈ Grp***sends all elements of*

**1 ∶ G → H***to the identity element*

**G***. The product of groups*

**1**_{H}∈ H*is their direct product*

**G, H ∈ Grp***and the coproduct is their free product*

**G × H***, along with the usual canonical morphisms.*

**G ∗ H**Let * Ab ⊆ Grp* be the full subcategory of abelian groups. The zero object and product are inherited from

*, but we give them new names: we denote the zero object by*

**Grp***and for any*

**0 ∈ Ab***we denote the zero arrow by*

**A, B ∈ Ab***. We denote the Cartesian product by*

**0 ∶ A → B***and we rename it the direct sum. The big difference between*

**A ⊕ B***and*

**Grp***appears when we consider coproducts: it turns out that the product group*

**Ab***is also the coproduct group. We emphasize this fact by calling*

**A ⊕ B***the biproduct in*

**A ⊕ B***. It comes equipped with four canonical homomorphisms*

**Ab***satisfying the usual properties, as well as the following commutative diagram:*

**π**_{A}, π_{B}, ι_{A}, ι_{B}This diagram is the ultimate reason for matrix notation. The universal properties of product and coproduct tell us that each endomorphism * φ ∶ A ⊕ B → A ⊕ B* is uniquely determined by its four components

*for*

**φ**_{ij}∶= π_{i}○ φ ○ ι_{j}*,so we can represent it as a matrix:*

**i, j ∈ {A,B}**Then the composition of endomorphisms becomes matrix multiplication.

Rings. We let * Rng* denote the category of rings with unity, together with their homomorphisms. The initial object is the ring of integers

*and the final object is the zero ring*

**Z ∈ Rng***, i.e., the unique ring in which*

**0 ∈ Rng***. There is no zero object. The product of two rings*

**0**_{R}= 1_{R}*is the direct product*

**R, S ∈ Rng***with component wise addition and multiplication. Let*

**R × S ∈ Rng***be the full subcategory of commutative rings. The initial/final objects and product in*

**CRng ⊆ Rng***are inherited from*

**CRng***. The difference between*

**Rng***and*

**Rng***again appears when considering coproducts. The coproduct of*

**CRng***is denoted by*

**R,S ∈ CRng***and is called the tensor product over*

**R ⊗**_{Z}S*…..*

**Z**