# Category

Category, in mathematics, is a fundamental, algebraic or topological (super-, or meta-) structure formed by objects connected through arrows or morphisms into (categorical) diagrams, that has an identity arrow for each object, and is subject to certain axioms of associativity, commutativity and distributivity. The objects of a category can be simple sets, or specific algebraic structures such as monoids, w:semigroups, groups, groupoids, rings, modules, lattices, or topological structures, such as a topological space/ a graph/ a network, a meta-graph, and so on.

## Category definition

A category can be defined in several equivalent ways, as follows.
Definition #1: A category ${\mathcal {C}}$ consists of
    A set $O({\mathcal {C}})$ of objects.
    For any $X,Y\in \mathrm {Obj} ({\mathcal {C}})$, a set $\mathrm {Hom} (X,Y)$ of morphisms from $X$ to $Y$.
The objects and morphisms of a category obey the following defining axioms:
    There is a notion of composition. If $X,Y,Z\in O({\mathcal {C}})$, $f\in \mathrm {Hom} (X,Y)$ and $g\in \mathrm {Hom} (Y,Z)$, then $f$ and $g$ are called a composable pair. Their composition is a morphism $g\circ f\in \mathrm {Hom} (X,Z)$.
    Composition is associative. $f\circ (g\circ h)=(f\circ g)\circ h$ whenever the composition is defined.
    For any object $X$, there is an identity morphism $\mathrm {id} _{X}\in \mathrm {Hom} (X,X)$ such that if $Y,Z$ are objects, $f\in \mathrm {Hom} (X,Y)$ and $g\in \mathrm {Hom} (Z,X)$, then $\mathrm {id} _{X}\circ f=f$ and $g\circ \mathrm {id} _{X}=g$.
Definition #2: A morphism $f$ has associated with it two functions $\mathrm {dom}$ and $\mathrm {cod}$ called domain and codomain respectively, such that $f\in \mathrm {Hom} (X,Y)$ if and only if $\mathrm {dom} \,f=X$ and $\mathrm {cod} \,f=Y$. Thus two morphisms $f,g$ are composable if and only if $\mathrm {cod} \,f=\mathrm {dom} \,g$.
Remark 3: Unless confusion is possible, one will not usually specify which Hom-set a given morphism belongs to. Moreover, unless several categories are being considered, one usually does not write completely $X\in O({\mathcal {C}})$, but writes instead as a short-hand notation: "$X$ is an object". One may also write $X{\stackrel {f}{\longrightarrow }}Y$ to indicate implicitly the Hom-set $f$ to which it belongs to. Furthermore, one may also omit the composition symbol "o" , writing simply $gf$ instead of $g\circ f$.
* A category can also be regarded as a "<structure> of structures of the same mathematical kind, connected via their transformations or homomorphisms/ homeomorphisms". A "<category> of categories" can also be defined for small categories; it is usually called a super-category. The objects of a super-category are categories of any kind, and the arrows of a super-category are called w:functors. One can also define arrows between functors that are called natural transformations, and the essence of the mathematical theory of categories. or Category Theory, is often contained in natural transformations, such as natural equivalences.
* A proposed, logical axiomatics for categories was proposed by William F. Lawvere in the form of the Elementary Theory of Abstract Categories (ETAC), in which identities, objects, arrows, associativity, commutativity and distributivity properties are defined in logical terms and logical connectives.
* A groupoid, for example, can be considered as a category with all arrows being invertible. It is possible also to endow an algebraic structure, such as a group, or groupoid, with a (consistent) topological structure. An example of a group endowed with a topological structure is a Lie group that plays an important role in quantum physics; its generalization to many objects is a topological groupoid called a Lie groupoid, which has more complex mathematical properties than the Lie group.