Category

See category theory, first.
A category C consists of:

  1. A class ob(C), whose elements are called objects.

  2. A class mor(C), whose elements are called morphisms (or arrows, maps). Each morphism f has:

    • A source object aob(C)
    • A target object bob(C)

    We write f:ab to indicate that f is a morphism from a to b.

    For any pair of objects a,bob(C), we denote by homC(a,b) (or simply hom(a,b)) the hom-class of all morphisms from a to b. Note that mor(C) is the union of all such hom-classes.

  3. A binary operation called composition:
    For any three objects a,b,cob(C), we have

    :hom(b,c)×hom(a,b)hom(a,c)

    The composition of f:ab and g:bc is written as gf (or simply gf).

  4. Two axioms governing composition:

    • Associativity: For any f:ab, g:bc, and h:cd,h(gf)=(hg)f
    • Identity: For every object xob(C), there exists a morphism 1x:xx called the identity morphism for x, such that for every morphism f:ab,1bf=f=f1a

    From these axioms, it follows that the identity morphism for each object is unique.

The "processes" or "maps" between categories that preserve the structure given above are called functors.

In practice, most working mathematicians impose additional size restrictions:

(a) Locally Small Category (Most Common Usage)

A category C is called locally small if for every pair of objects a,bob(C), the hom-class hom(a,b) is actually a set (not a proper class).

Why this matters: Most important constructions in category theory (the Yoneda’s lemma, functor categories, limits/colimits) require local smallness. When mathematicians say "category" without qualification, they usually mean "locally small category."

(b) Small Category

A category C is called small if both:

Small categories are particularly manageable and form the objects of the important category Cat.

The "Category of All Categories"

This definition clarifies why there is ambiguity about whether categories form a category:

Examples

Basic examples of categories:

An important strategy in category theory is to use universal propertys.