$\newcommand{\al}{\alpha}$Let $(M_\alpha)_\alpha$ be a direct system of abelian groups, and $\varinjlim M_\alpha$ its direct limit. Then one can show that every element of $\varinjlim M_\alpha$ can be represented by an element $m_\alpha\in M_\alpha$ for some $\alpha$, and using this, it is easy to show that if $J\subset I$ is a cofinal subset, then $\varinjlim_{\al\in J}M_\al\simeq\varinjlim_{\al\in I}M_\al$. I am wondering if one can generalize these two results to a more general setting of category theory. That is, 1) Is there a category theory version of the first result? And 2) Is the second result true in category theory? If so, how can one prove it?
[Math] Direct limit in category theory
category-theorycommutative-algebralimits-colimits
Related Solutions
Here's the motivating results for the sets; recall that the cartesian product $\mathop{\times}_{i\in I}X_i$ is defined to be the set of all functions $f\colon I\to \cup X_i$ such that $f(i)\in X_i$ for all $i\in I$.
Theorem. Let $\{X_i\}_{i\in I}$ be a family of sets, and let $P=\mathop{\times}\limits_{i\in I}X_i$ be their cartesian product, and let $\pi_{i}\colon P\to X_i$ for each $i\in I$ be the map defined by $\pi(\mathbf{f}) = f(i)$. Then, if $A$ is any set, and $g_i\colon A\to X_i$ is a family of functions from $A$ to the $X_i$, then there exists a unique $g\colon A\to P$ such that $g_i=\pi_i\circ g$ for all $i\in I$.
Proof. Define $g(a)$ to be the function that maps $i\in I$ to $g_i(a)$. Uniqueness is not hard to show.QED
If you think of the cartesian product as a set of "tuples" indexed by $I$, then $g(a)$ is just the tuple that has $g_i(a)$ in the $i$th coordinate.
Theorem. Let $\{X_i\}_{i\in I}$ be any family of sets, and let $(\mathbf{P},\{p_i\})$ be such that $\mathbf{P}$ is a set, $p_i\colon\mathbf{P}\to X_i$ is a family of functions, and with the property that for every set $A$ and every family of maps $g_i\colon A\to X_i$, there exists a unique function $g\colon A\to\mathbf{P}$ such that $g_i = p_i\circ g$. Then there exists a unique bijection $\chi\colon\mathbf{P}\to P$ such that $p_i = \pi_i\circ \chi$ (and hence $\pi_i=p_i\circ\chi^{-1}$).
Proof. From the previous theorem and the property of the cartesian product, since we have a set $\mathbf{P}$ and a family of maps into the $X_i$, there exists a unique $\chi\colon \mathbf{P}\to P$ such that $p_i=\pi_i\circ\chi$. We need to show that $\chi$ is a bijection.
Now, $P$ is a set and we have a family of maps into the $X_i$ (namely the $\pi_i$), so by our hypothesis on $P$, there exists a unique function $\psi\colon P\to\mathbf{P}$ such that $\pi_i =p_i\circ\psi$.
Now consider the map $\psi\circ\chi\colon \mathbf{P}\to \mathbf{P}$. We have $$p_i = \pi_i\circ\chi = p_i\circ(\psi\circ\chi).$$ By the uniqueness clause of the property of $\mathbf{P}$, we must have $\psi\circ\chi = \mathrm{id}_{\mathbf{P}}$. Symmetrically, since $$\pi_i = p_i\circ\psi = \pi_i\circ(\chi\circ\psi),$$ the uniqueness clause for the cartesian product shows that $\chi\circ\psi=\mathrm{id}_{P}$. Thus, $\psi=\chi^{-1}$, so $\chi$ is invertible, as desired. QED
That is, the property of having a family of maps into the $X_i$ such that for any set with maps into the $X_i$ there exists a unique map into the product which makes "commuting triangles" completely determines the cartesian product up to a (unique) bijection.
Now for the coproduct in sets, which is the disjoint union.
Theorem. Let $\{X_i\}_{i\in I}$ be a family of sets, and let $C=\cup_{i\in I}(X_i\times\{i\})$ be their disjoint union; let $\iota_j\colon X_j\to C$ be the map defined by $\iota_j(x) = (x,j)$. Then, if $A$ is any set and $g_i\colon X_i\to A$ is any family of maps from the $X_i$ to $A$, then there exists a unique $g\colon C\to A$ such that $g_i = g\circ \iota_i$ for each $i\in I$.
Proof. Define $g(x,i) = g_i(x)$. Uniqueness is easy to show. QED
Theorem. Let $\{X_i\}_{i\in I}$ be a family of sets, and let $(\mathbf{C},\{\kappa_i\})$ be a set $\mathbf{C}$ and functions $\kappa_i\colon X_i\to \mathbf{C}$ such that for every set $A$ and every family of maps $g_i\colon X_i\to A$, there exists a unique map $g\colon\mathbf{C}\to A$ such that $g_i=g\circ\kappa_i$. Then there exists a unique bijection $\chi\colon\mathbf{C}\to C$ such that $\iota_j = \chi\circ\kappa_j$.
The proof is the same idea as for the product; you don't even need to get to the level of sets, just use the properties that define $\mathbf{C}$ and $C$.
If you draw the diagrams, with arrows for functions, you will see that the theorem for the disjoint union expresses almost the same theorem as for the product, but with "arrows reversed": functions that went into the $X_i$ for the product become functions that go out of the $X_i$ for the disjoint union, etc.
The categorical concept of "product" and "coproduct" are just generalizations of these ideas. They are inspired by the fact that there are similar "objects" in other situations that have the same kind of properties (groups, topological spaces, modules, etc).
Let $\mathcal{C}$ be a category, and let $\{X_i\}_{i\in I}$ be a family of objects of $\mathcal{C}$.
Definition. A product of the $X_i$ is a pair $(P,\{p_i\}_{i\in I})$, where $P$ is an object of $\mathcal{C}$, and $p_i\colon P\to X_i$ are morphisms, such that for every object $A$ and every family of maps $f_i\colon A\to X_i$, there exists a unique morphisms $f\colon A\to P$ such that $f_i=\pi_i\circ f$ for each $i\in I$.
Definition. A coproduct of the $X_i$ is a pair $(C,\{\iota_j\}_{j\in I})$, where $C$ is an object of $\mathcal{C}$, and $\iota_j\colon X_j\to C$ are morphisms, such that for every object $A$ and every family of morphisms $g_i\colon X_i\to A$, there exists a unique morphism $g\colon C\to A$ such that $g_j = g\circ \iota_j$ for all $j\in J$.
Products and coproducts need not exist; but when they exist, they are unique up to unique isomorphism. This last fact follows exactly the same way as the proof for sets above, because we didn't use the fact that we had sets and set-maps, we only used the properties of the product and the coproduct to establish it.
Examples:
For $\mathcal{G}roups$, the product of a family of groups $\{G_i\}_{i\in I}$ is their cartesian product; the coproduct is their free product.
For $\mathcal{A}b\mathcal{G}roups$ (abelian groups), the product of a family $\{A_i\}_{i\in I}$ is their cartesian product, the coproduct is their direct sum.
For modules and vector spaces, the product is the cartesian product, the coproduct is the direct sum.
For topological spaces, the coproduct is the disjoint union, with the topology generated by the union of the topologies; the product is the cartesian product with the product topology.
In many familiar categories, where the objects are "sets with extra structure" and the morphisms are set-maps "that respect the structure", the underlying set of the product is always the cartesian product of the underlying sets, while the underlying set of the coproduct is seldom the disjoint union of the underlying sets. This is a consequence of the fact that the "underlying set functor" often has a left adjoint, but rarely has a right adjoint. See for example this previous answer
I would strongly recommend (yet again) George Bergman's Math 245 notes. Chapter 3 gives you a "tour" of 'universal constructions' in concrete examples, showing many instances of these categorical concepts as they occur "on the ground". Chapter 6 gives you the basics of Category Theory, and then Chapter 7 discusses the constructions you saw in Chapter 3 in terms of categories, functors, universal properties, etc.
Added. Hrmph. It seems I may have missed the point of the question, which was whether one can define direct sum via a universal property.
In the context of abelian categories, the concept of biproduct is precisely the concept that leads to the direct sum/product (which agree on finite families, but may disagree for infinite ones). The biproduct of abelian groups is precisely the direct sum/product for finite families, with the direct sum being the coproduct and the direct product being the product for infinite families. The same is true for vector spaces and $R$-modules, since they are all the prototypical instances of abelian categories.
What about categories in which the notion of "direct sum" still makes sense, but does not lead to a coproduct? For example, the restricted direct product in the category of groups makes perfect sense: the restricted direct product of a family $\{G_i\}_{i\in I}$ of group is the subgroup of the direct product $\prod\limits_{i\in I} G_i$ of elements $(g_i)$ such that $g_i=e_i$ for almost all $i$.
One can try defining it in categories with products, zero objects, and in which objects are sets and arrows are set-maps, by taking the collection of all elements of the product for which the projections agree with the zero morphism in almost all components. But this need not be an object in your category (e.g., for the category of rings with one, the direct sum is not a ring with one), and as far as I know there is no natural universal property that one can place on it. One can construct properties they satisfy in certain circumstances, but in my experience they are not very satisfactory or natural, and don't generalize. For instance, the direct sum/restricted direct product of groups can be described as the unique group $G$, together with embeddings $\iota_j\colon G_j\to G$ such that the images commute pairwise $(\iota_j(g_j)\iota_k(g_k) = \iota_k(g_k)\iota_j(g_j)$ for all $j\neq k$), and universal with respect to maps from the groups $G_j$ whose images commute pairwise; but "images commute pairwise" is a bit hard to generalize categorically.
In the definition of a direct limit you say that in the given situation there is a unique morphism that completes the diagram.
Now, when you want to prove that your two candidates $A$ and $A'$ for the direct limit are isomorphic, just observe that $1_A$ and $\alpha'\circ\alpha$ are both morphisms witnessing the universal property of $A$ with respect to $A$ itself.
Since such a morphism is unique, $\alpha'\circ\alpha=1_A$.
The symmetric argument works for $\alpha\circ\alpha'=1_{A'}$.
Best Answer
2) Colimits for cofinal subcategories are the same. See Mac Lane, Categories for the working mathematician, section IX.3.
1) This is more subtle. What should be an element of an object $X$? In the spirit of the Yoneda Lemma, it makes sense to regard arbitrary morphisms $A \to X$ as "generalized elements" of $X$. Because then the Yoneda Lemma essentially says that an object is determined by its generalized elements, which resembles the extensionality axiom in set theory.
Assume we have a directed colimit $\mathrm{colim}_i X_i$ in a category $C$, and that $A$ is a finitely presentable object of $C$. By definition, this means $\hom(A,\mathrm{colim}_i X_i) = \mathrm{colim}_i \hom(A,X_i)$, so that in fact every generalized element of $\mathrm{colim}_i X_i$ comes from a generalized element from some $X_i$, and that this choice is essentially unique: Two generalized elements of $X_i$ and $X_j$ become equal in the colimit if and only if they become equal in $X_k$ for some $k \geq i,j$. Similar statements hold when the diagram is $\lambda$-directed and $A$ is $\lambda$-presentable for some cardinal $\lambda$.
For example, if $C$ is some algebraic category, then the free object on one generator $F(1)$ of $C$ is finitely presentable (in fact, any object defined by finitely many generators and relations, see Chapter 3 in the book by Adamek and Rosicky on locally presentable categories), which essentially means that the forgetful functor to sets preserves directed colimits. This is not true for arbitrary concrete categories! For example, consider the category of topological vector spaces. The forgetful functor doesn't preserve directed colimits. An element in a colimit of topological vector spaces $V_i$ is just a limit of elements in the $V_i$.
Another example, let $C$ be the category of quasi-coherent sheaves on a concentrated scheme $X$ (for example, noetherian schemes are concentrated). Then $\mathcal{O}_X$ is presentable, which essentially means that the functor of global sections preserves directed colimits. This then can be generalized to its derived functors, i.e. sheaf cohomology, which is quite important and useful.