Definitions of direct product and of direct sum

I was wondering if there are some general definitions for direct product and for direct sum, for example in category theory or in set theory, so that the concepts for vector spaces, Abelian groups, rings can be unified, or in other words, the common features of those specific concepts can be abstracted?

In particular, the following quotes from Wikipedia (direct sum and direct product) seem to make attempts to reveal their relation to Cartesian product in set theory and (co)product in category theory, but also say that the relation is not always true.

one can often define a direct product of objects already known, giving a new one. This is generally the Cartesian product of the underlying sets, together with a suitably defined structure on the product set. More abstractly, one talks about the product in category theory, which formalizes these notions.

one can often define a direct sum of objects already known, giving a new one. This is generally the Cartesian product of the underlying sets (or some subset of it), together with a suitably defined structure. More abstractly, the direct sum is often, but not always, the coproduct in the category in question.

Thanks and regards!


Solution 1:

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.

Solution 2:

The categorical notion that subsumes most uses of direct sums is the coproduct, while direct products can be subsumed under the categorical product. Both notions are defined through a so-called universal property. I recommend reading the definitions on wikipedia and then trying to work out what each of these notions gives you in the category of sets, groups, abelian groups, modules, vector spaces, etc.

Solution 3:

Product of varieties is more specific then categorical product and is a generalization of a product of groups, modules, rings.