# Category (category theory)

A category, , is a mathematical object consisting of:

- A class, of objects.
- For every pair of objects , a class of morphisms from to . (We sometimes write to mean .)
- For every three objects, , a binary operation called composition, which satisfies:
- (associativity) Given , and we have
- (identity) For and object , there is an identity morphism such that for any :

The class of all morphisms of is denoted .

A category is called **small** if both and are sets. If is not small, then it is called **large**. is called **locally small** if is a set for all . Most important categories in math are not small, but are locally small.

Intuitively we can think of the objects of as being sets (perhaps with some additional structure) and morphisms as being functions between these sets (perhaps satisfying some properties) and composition as being regular function composition, however there are examples of categories which do not satisfy this. Typically when studying category theory we deal with morphisms and composition completely abstractly (similarly to how we study multiplication abstractly in group theory), and never talk about 'plugging things in to' morphisms.

## Examples

Some common examples of categories are:

- The category
**Set**of all sets, where morphisms are functions. - The category
**Grp**of all groups, where morphisms are group homomorphisms. - The category
**Ab**of all abelian groups, where morphisms are group homomorphisms. - The category
**Ring**of all rings, where morphisms are ring homomorphisms. - The category
**Field**of all fields, where morphisms are field homomorphisms (notice that this means all morphisms are injective, and so they can be viewed as field extensions). - The category
**Vect**of all vector spaces, where morphisms are linear maps. - The category
**Top**of all topological spaces, where morphisms are continuous functions. - The category
**Cat**of all small categories, where morphisms are functors. - For any categories and , the
**functor category**of functors where morphisms are natural transformations.

*This article is a stub. Help us out by expanding it.*