In a comment on one of my earlier posts on tensors, an alarming question was raised: just what exactly is the difference between the direct sum and direct product of a collection of -vector spaces? It turns out that the “direct sum” and “direct product” are captured by two much more general notions from category theory, known as the “coproduct” and “product”, respectively, of a family of objects. If we take the direct sum of countably many copies of , we obtain the vector space of real sequences, only finitely many of whose terms are nonzero (which is countable-dimensional). I will use the abbreviation “FMNZT” for “finitely many nonzero terms”. If we take the direct product over that same family, we obtain the vector space of real sequences, period (which is uncountable-dimensional). On the other hand, the direct sum and direct product coincide if the family of objects we perform them over happens to be finite. What’s going on?

The purpose of this post, therefore, is to discuss the categorical definitions of the coproduct and product, and interpret them in the familiar setting of linear algebra. First, let’s have the definitions themselves (more or less copied from Wikipedia). Let be a category and be a family of objects in .

**Coproduct **(corresponds to the “direct sum”), written **
**An object in , together with a collection of morphisms such that for any object in and any collection of morphisms , there

*exists*a

*unique*morphism such that the diagram

commutes, or in other words, for all .

**Product** (corresponds to the “direct product”), written

An object in , together with a collection of morphisms such that for any object in and any collection of morphisms , there *exists* a *unique* morphism such that the diagram

commutes (those subscripts should be “j”, not “i”), or in other words, for all .

After reading the above definitions, I was still failing to see why the direct sum (“coproduct”) of countably many vector spaces should give a vector space of FMNZT sequences. So I decided to play devil’s advocate, and attempt to prove that the vector space of sequences *period* was the coproduct of a countable family. Of course, I failed, and perhaps the following will shed some light on why this does not work. Note that we are now working in the category of -vector spaces where the morphisms are linear maps.

**Attempted proof**. Suppose is a collection of vector spaces indexed by . Let be the vector space consisting of sequences where for all . We wish to prove that with the linear maps given by (where appears in position , of course). Let be some other -vector space and suppose we have a collection of linear maps . I want to construct a linear map so that for all .

OK, well, let’s just let . Wait a second, that could end up being an infinite sum, which makes no sense in this context. *This* is the showstopper here. **End of attempted proof**.

“But I’m still cynical”, you say, “why is it not true, in general, that such a linear map exists and is unique”? Well, let’s look at the following example.

**Claim**. Let’s take the above situation, in the special case where for all , , and the maps are given by , the inclusion map. Then there exists uncountably many linear maps such that for all , we get .

**Proof idea**. I’m trying to disprove the fact that is the coproduct of . In order to do this, I’m remarking that there are many linear maps satisfying the conditions, and therefore the map is not unique, thereby disqualifying from being the coproduct.

To see that the maps aren’t unique, simply note that the vector space of FMNZT sequences is a *subspace* of , and there is a unique linear map satisfying for all (this is obvious since is a basis for ). Therefore, we know that when we try to extend this map to the larger space , we can extend to a basis for , but there is going to be a lot of arbitrary choices we can make in terms of *how the map behaves on basis elements which have infinitely many nonzero terms*.

Note that the above does *not* prove that is the coproduct we’re after (this is, however, the case), but it does prove that certainly cannot be, due to the problem with uniqueness. If you want, try to prove the former statement from the definition of a coproduct (I already pretty much gave it away in the “attempted proof” above). Also, try showing that *is* the *product* of the family I mentioned, and showing that if the index set is finite, then