> [!definition]
>
> Let $I$ be a [[Directed Set|directed set]], $\catc$ be a [[Category|category]], $\seqi{A} \subset \catc$ be objects, and $\bracsn{f_j^i: i \le j} \subset \catc$ be morphisms. Suppose that
> 1. For any $i \le j$, $f_j^i \in \mor{A_i, A_j}$.
> 2. For any $i \le j \le k$, $f^{j}_k \circ f^i_j = f^i_k$.
> 3. $f_i^i = \text{Id}$.
>
> then $\bracsn{f_j^i}$ is a **directed family of morphisms**.
> [!definition]
>
> Let $\bracsn{f_j^i}$ be a directed family of morphisms. Define a category $\mathfrak{D}$, where $\obj{\mathfrak{D}}$ consists of pairs $(A, \bracsn{f^i_A}_{i \in I})$, such that
> 1. For any $i \in I$, $f^i_A \in \mor{A_i, A}$.
> 2. For any $i, j \in I$ with $i \le j$, $f^j_A \circ f^i_j = f^i_A$.
>
> A morphism $\varphi \in \mor{A, B}$ is a morphism $(A, \bracsn{f^i_A}_{i \in I}) \to (B, \bracsn{g^i_A}_{i \in I})$ if $\varphi \circ f^i_A = g^i_A$ for all $i \in I$.
>
> A universally repelling object in this category is known as the **direct limit** for $(A_i, \bracsn{f^i_j: i \le j})$, denoted as $\varinjlim A_i$.
> [!theorem]
>
> Let $\bracsn{f^i_j}$ be a directed family of morphisms and $J \subset I$ be a cofinal subset, then the limit of $\bracsn{f^i_j: i, j \in I, i \le j}$ and $\bracsn{f^i_j: i, j \in J, i \le j}$ coincide.
> [!theorem]
>
> Direct limits exist in the category of sets.
>
> *Proof*. Let $(A_i, \bracsn{f_i^j})$ be a directed family. Assume without loss of generality that $\seqi{A}$ are disjoint. Let $\ol A = \bigsqcup_{i \in I}A_i$. For any $x_i, x_j \in \ol A$ with $x_i \in A_i$ and $x_j \in A_j$, define $x_i \sim x_j$ if there exists $k \ge i, j$ such that $f^i_k(x_i) = f^j_k(x_j)$. In particular, $f^i_j(x_i) \sim x_i$ for any $x_i \in A_i$. Take $A = \ol A / \sim$ be the [[Equivalence Class|equivalence classes]], and $f^i_A = \pi|_{A_i}$ be the projection onto the equivalence classes, then $(A, \bracsn{f^i_A})$ is an element of the desired category.
>
> Suppose that $(B, \bracsn{g^i_B})$ is another such pair. Let $i \le j$, $x_i \in A_i$, and $x_j \in A_j$ such that $x_i \sim x_j$. Let $k \ge i, j$ such that $f^i_k(x_i) = f^j_k(x_j)$, then
> $
> g^i_B(x_i) = g^k_B \circ f_k^i(x_i) = g_B^k \circ f_k^j(x_j) = g^j_B(x_j)
> $
> so equivalent elements get mapped to the same value for all $i \in I$. If $x \in A_i$, define $\varphi: A \to B$ by $\ol x \mapsto g^i_B(x)$, then we have the desired map.
> [!theorem]
>
> Let $R$ be a [[Ring|ring]], then direct limits exist in the category of left $R$-modules.
>
> *Proof*. Let $(M_i, \bracsn{f^j_i})$ be a directed family of left $R$-modules, and $M = \prod_{i \in I}M_i$ be their product. For any $i, j \in I$ and $x \in M_i$, define
> $
> x_{ij}(k) = \begin{cases}
> x &k = i \\
> -f^i_j(x) &k = j
> \end{cases}
> $
> and let $N$ be the submodule generated by $\bracs{x_{i, j}: i, j \in I, x \in A_i}$.
>
> For each $i \in I$ define $f^i_{M/N}$ as the following composition
> $
> \begin{CD}
> M_i @>{\iota}>> M @>{\text{can}}>> M/N
> \end{CD}
> $
> then the [[Quotient Module|quotient]] $(M/N, \bracsn{f^i_{M/N}})$ is the desired limit.