Let \(\mathcal C\) be a category and \((I,\leq)\) a directed set. A directed system in \(\mathcal C\) consists of objects \(X_i\) for \(i\in I\) and morphisms \(f_{ij}\colon X_i\to X_j\) for \(i\leq j\), with \(f_{ii}=\id_{X_i}\) and \(f_{jk}\circ f_{ij}=f_{ik}\) for \(i\leq j\leq k\). A colimit of the system is an object \(X\) with morphisms \(\iota_i\colon X_i\to X\) satisfying \(\iota_j\circ f_{ij}=\iota_i\) for \(i\leq j\), such that for every object \(Y\) and morphisms \(\psi_i\colon X_i\to Y\) with \(\psi_j\circ f_{ij}=\psi_i\) for \(i\leq j\) there is a unique morphism \(h\colon X\to Y\) with \(h\circ\iota_i=\psi_i\) for all \(i\).
The morphisms \(\iota_i\) go from the system to \(X\); reversing every morphism gives the limit, whose structure morphisms go from the limit to the system. This is the special case of the colimit of a diagram in which the indexing category is the directed set \(I\).
In sets, and for abelian groups with the group structure of the direct limit, the colimit is \[ \varinjlim_iX_i=\qty{\Disjoint_{i\in I}X_i}/\sim, \] where \(\sim\) is the equivalence relation generated by \(x\sim f_{ij}(x)\) for \(x\in X_i\) and \(i\leq j\), with \(\iota_i\) sending \(x\) to its class [@Hat02].