Category Theory/Categories
From Wikibooks, the open-content textbooks collection
This is the Categories chapter of Category Theory.
Contents |
[edit] Definition
A category
consists of four kinds of data subject to three axioms, as listed below:
[edit] Data
- Objects
has objects A, B, C,…- Morphisms
- For each ordered pair of objects A, B in
, there is a set of morphisms or arrows from A to B. The notation
means that f is a morphism from A to B. The set of all morphisms from A to B is denoted by
. - Composition
- For each ordered triple of objects A, B, C in
, there is a law of composition: If
and
, then the composite of f and g is a morphism 
- Identity
- For each object A there is a designated identity morphism on A, notated as 1A, from A to A.
[edit] Axioms
These data satisfy the following three axioms, of which the first is in the nature of a convention, while the remaining two are more substantial:
- Unique typing
- Hom(A1,B1) and Hom(A2,B2) are disjoint unless A1 = A2, B1 = B2.
- Associative Law
- h(gf) = (hg)f if the composites are defined. Note that if one composite is defined, the other is necessarily defined.
- Identity is a “neutral element”
- For the identity morphism
associated to each object B, two equations must hold for each pair of objects A and C and each pair of arrows
,
:
[edit] Terminology and fine points
- If
in a category, A is called the domain or source of f, and B is called the codomain or target of f. - Hom(A,B) is called a hom set. In general a hom set may be empty, but for any object A, Hom(A,A) is not empty because it contains the identity morphism.
- The hom set Hom(A,B) may be denoted by
or
if it necessary to specify which category is referred to. - The requirement that the collection of morphisms from A to B be a set makes a category locally small. In this book, all categories are locally small.
- Morphisms may also be called maps. This does not mean that every morphism in any category is a set function (see #Baby examples and #Preorders). Arrow is a less misleading name.
- The composite gf may be written
. - It might be more natural to write the composite of
and
as fg instead of gf but the usage given here is by far the most common. This stems from the fact that if the arrows are set functions and
, then (gf)(x) = g(f(x)). Thus gf is best read as "do g after f".
[edit] Examples of categories
[edit] Baby examples
These examples are trivial and maybe uninteresting. But do not underestimate the power of baby examples. For one thing, they are sometimes counterexamples to possible theorems.
- 0 (the empty category)
- This category has no objects and no morphisms.
- 1
- The category 1 has one object and one morphism, which must necessarily be the object's identity arrow.
- 1+1
- This category has two objects and two morphisms, the identities on each object.
- 2
- This category has two objects and three morphisms. The third morphism goes from one object to the other.
- The objects of these baby categories are nodes in a graph (not sets) and the morphisms are arrows in the graph (not functions).
- For these baby categories we don't have to say what the composition operation does: it is always forced.
- It is impolite to say that categorists think that 1 + 1 is not equal to 2.
[edit] The category of sets
The category of sets, denoted by Set, is this category:
- The objects are sets
- A morphism from a set A to a set B is a function with domain A and codomain B.
- The composition is the usual composition: If
and
then
is defined by gf(a) = g(f(a)) for all
. - The identity morphism 1A on a set A is the identity function
defined by 1A(x) = x for
.
- In order that unique typing hold, it is necessary to require that the definition of a function include specifying its codomain. For example,
is a different function from the inclusion function
to some set B properly including A. - In most approaches to the foundations of math, the collection of all sets is not a set. This makes Set a large category.
[edit] Categories of sets with structure
- Finite sets and functions;
- groups and homomorphisms;
- abelian groups and homomorphisms;
- rings and homomorphisms;
- subsets of Euclidean space of 3 dimensions and Euclidean movements
- subsets of Euclidean space of n dimensions and continuous functions
- topological spaces and continuous functions.
The law of composition is not specified explicitly in describing these categories. This is the custom when the objects have underlying set-structure, the morphisms are functions of the underlying sets (transporting the additional structure), and the law of composition is merely ordinary function-composition. Indeed, sometimes even the specification of the morphisms is suppressed if no confusion would arise—thus one speaks of the category of groups.
The examples of sets with structure suggest a conceptual framework. For example, the concept of group may be regarded as constituting a first-order abstraction or generalization from various concrete, familiar realizations such as the additive group of integers, the multiplicative group of nonzero rationals, groups of permutations, symmetry groups, groups of Euclidean motions, and so on. Then, again, the notion of a category constitutes a second-order abstraction, the concrete realizations of which consist of such first-order abstractions as the category of groups, the category of rings, the category of topological spaces, and so on.
[edit] Preorders
A preorder α on a set A is a reflexive and transitive relation on A, which means that for all a ε A, a α a and for all a, b, c in A, if a α b and b α c, then a α c.
A preorder "is" a category in the following sense: Given a preorder (A, α) the category structure is this:
- The objects of the category are the elements of A.
- There is exactly one morphism from a to b if and only if a α b.
The existence of identities is forced by reflexivity and the composition law is forced by transitivity. It follows that the category structure has the property that there is at most one morphism from any object a to any object b.
Conversely, suppose you have a category with set A of objects, with the property that there is at most one morphism between any two objects. Define a relation α on A by requiring that a α b if and only if there is a morphism from a to b. Then (A, α) a preorder.
- The category structure and the preorder structure are really the same structure described in two different ways. It is reasonable to say that preorders are exactly those categories with at most one morphism from any object to any other object.
- Given a preorder, the morphisms of the corresponding category are not in any sense functions.
[edit] Groups and groupoids
Every Group G can be viewed as a category
as follows: One single Object call it e. And we set
and take as composition the group multiplication. Clearly the identityelement of G is 1e. Notice that in
every morphism is an isomorphism.
Generalizing this one defines: A category
is called a groupoid if every morphism is an isomorphism.
[edit] Properties of objects and morphisms
[edit] Initial and terminal objects
[edit] Isomorphisms
A morphism f: A → B in the category is said to be invertible, or a unit, or an equivalence, if there is a morphism g: B → A in with gf = 1A, fg = 1B. It is easy to prove that g is then invertible and is determined by f (g is the inverse of f, written g = f -1), and that if A is isomorphic to B, there existing an invertible f: A → B, then the relation of isomorphism is an equivalence relation on the objects of . Thus every category carries automatically with it a notion of the isomorphism of objects, proper to that category. The concept gives a great gain in universality compared with traditional procedures, which involve the definition, as distinct concepts, of one–one correspondence between sets, isomorphism between groups, isomorphism between rings, homeomorphism between topological spaces, bi-continuous isomorphism between topological groups, order type of ordered sets, and so on. It is particularly offensive, from the categorical point of view, to define an isomorphism of groups f: g → h to be a homomorphism that is one–one and onto H; for an isomorphism of groups should be just an invertible morphism of the category of groups. It is a theorem that, in this category, a morphism that is one–one and onto its codomain is an isomorphism. This theorem is false in the category of topological spaces, so that the definition masks the universality of the concept of isomorphism.

