# Categorical proof of direct sum preserving exactness

The motivation is to show that $N_1,N_2$ are flat $R$-module if and only if $N_1\oplus N_2$ is flat $R$-module. We use the following fact:

Given two sequences of $R$-modules: $$0\rightarrow M_1'\rightarrow M_1\rightarrow M_1''\rightarrow 0$$ and $$0\rightarrow M_2'\rightarrow M_2\rightarrow M_2''\rightarrow 0$$ are exact if and only if $$0\rightarrow M_1'\oplus M_2'\rightarrow M_1\oplus M_2\rightarrow M_1''\oplus M_2''\rightarrow 0$$ is exact.

The proof is just the routine check.

Now I was wondering if this statement is still true for any category, not just for the category of $R$-modules. If so, is there a general (categorical) proof for the above statement?

More generally, if we replace the $I=\{1,2\}$ by an arbitrary index set, is this still true? (We know for the category of $R$-modules, it is true.)

A categorical proof could go as follows (for $I=\{1,2\}$ and then of course induction yields the finite $I$ cases. As Kevin Carlson points out, this will fail in general for arbitrary $I$)

Short version: finite direct sums in an abelian (or additive, provided the direct sums in question exist -one may even require less) category are both a coproduct and a product, so both a colimit and a limit, hence they commute both with cokernels (because colimits commute with colimits) and with kernels (because limits commute with limits). Hence they preserve exact sequences.

Long(er) version: The fact that the new sequence is a complex is clear (just use bilinearity of composition in an additive/abelian category, or in a more general setting of, say punctured categories, just use the fact that $(f_1\oplus f_2)\circ (g_1\oplus g_2) = (f_1\circ g_1) \oplus (f_2\circ g_2)$ by some abstract nonsense about coproducts, and then that $0\oplus 0 = 0$ by some abstract nonsense in punctured categories), so we only need to show that it is exact.

Let $x\in_U M_1\oplus M_2$ be a generalized element (that is a map $x: U\to M_1\oplus M_2$) such that $x$ is mapped to $0$ by $M_1\oplus M_2 \to M_1''\oplus M_2''$. Since $M_1\oplus M_2$ is the product of $M_1,M_2$, we may write $x$ as $(y,z)$.But then $y$ is sent to $0$ by $M_1\to M_1''$ and similarly for $z$. Hence $y$ factorizes uniquely through $M_1'$ and $z$ uniquely through $M_2'$, by exactness of the previous sequences. Hence $x$ factors uniquely through $M_1'\oplus M_2'$. Thus $M_1'\oplus M_2'\to M_1\oplus M_2$ is the kernel of $M_1\oplus M_2\to M_1''\oplus M_2''$ (in particular it is a monomorphism).

The only thing left to check is that the sequence is exact at $M_1''\oplus M_2''$, that is $M_1\oplus M_2\to M_1''\oplus M_2''$ needs to be epi. But $\oplus$ is a coproduct, and coproducts preserve epis, so we're good.

Notice that we have used that $\oplus$ was a coproduct and a product : this is why everything fails for an infinite $I$: an infinite direct sum is not a product.

3. Replacing $I$ with arbitrary index sets won't work because not all abelian categories have infinite direct sums - for example, the category of finite abelian groups. That said, if all the direct sums in question do exist, the proof should go through pretty much the same way. EDIT: It does not, see comments.