# Direct Sums and Direct Products

Recall that for a ring A, a sequence of A-modules $M_1, \ldots, M_n$ gives the A-module $M = M_1 \times \ldots \times M_n$ where the operations are defined component-wise. In this article, we will generalize the construction to an infinite collection of modules. Throughout this article, let $(M_i)$ denote a collection of A-modules, indexed by $i\in I$.

Definition.

The direct product $\prod_{i\in I} M_i$ is the set-theoretic product of the $(M_i)_{i\in I}$, with the structure of an A-module given by:

$(m_i) + (m_i') := (m_i + m_i'), \quad a\cdot (m_i) := (am_i)$.

The direct sum $\oplus_{i\in I} M_i$ is the submodule of $\prod_{i\in I} M_i$ comprising of all $(m_i)_{i\in I}$ such that $m_i \ne 0$ only for a finite number of $i\in I$.

Since there are only finitely many non-zero terms for an element $(m_i) \in \oplus_i M_i$, one often writes the element additively, i.e. $\sum_i m_i$.

For a simple example, note that if $M_i = M$ for a fixed module M, then $\prod_{i\in I} M$ is the set of all functions $f : I\to M$. On the other hand, $\oplus_{i\in I} M$ is the set of all f such that $f(i) \ne 0$ for only finitely many $i\in I$. [We say f has finite support.]

Exercise A

For an infinite collection $(M_i)$ of A-modules and an ideal $\mathfrak a\subseteq A$, which of these claims is true?

$\mathfrak a \left( \bigoplus_i M_i\right) = \left( \bigoplus_i \mathfrak a M_i\right), \quad \mathfrak a \left( \prod_i M_i\right) = \left( \prod_i \mathfrak a M_i\right).$

[Note: if it seems too hard to find a counter-example, argue qualitatively why equality does not hold.]

# Universal Property

At first glance, it seems like the direct product is the right definition since it generalizes directly from direct product of groups, rings, topological spaces etc. However, generally the direct sum is better behaved for our needs. The above exercise should provide some evidence of that.

For now, we will show that the direct sum and direct product are actually dual of each other, by showing the corresponding universal properties.

Theorem (Universal Property of Direct Product).

Let $M = \prod_{i\in I} M_i$. For each $j\in I$, take the projection map

$\pi_j : \prod_{i\in I} M_i \to M_j, \quad (m_i)_{i\in I} \mapsto m_j.$

Now the collection of data $(M, (\pi_i : M \to M_i)_{i\in I})$ satisfies the following.

• For any A-module N and collection of data $(N, (\phi_i : N \to M_i)_{i\in I})$ where each $\phi_i$ is A-linear, there is a unique A-linear $f : N\to M$ such that $\pi_i\circ f = \phi_i$ for each $i \in I$.

Note

The idea is that homomorphisms $N \to \prod_i M_i$ “classify” the collection of all I-indexed tuples $(\phi_i : N\to M_i)_{i\in I}$.

Proof.

For existence, define $f : N\to \prod_i M_i$ to be $n \mapsto (\phi_i(n))_{i\in I} \in \prod_i M_i$. Now for any $j\in I$ we have

$\pi_j (f(n)) = \pi_j ((\phi_i(n)_i) = \phi_j(n)$.

For uniqueness, if $j\in I$, the j-th component of $f(n)$ is $\pi_j(f(n)) = \phi_j(n)$ so the tuple $f(n)$ must be $(\phi_i(n))_{i \in I}$. ♦

The following result shows why universal properties are important.

Proposition 1.

Let M’ be an A-module and $(M', (\pi'_i : M' \to M_i))$ be a collection of data satisfying the above universal property. Then there is a unique isomorphism $f : M\to M'$ such that $\pi_i' \circ f = \pi_i$ for all $i\in I$.

Proof

1. We apply the universal property to $N = \prod M_i = M$ and $\phi_i = \pi_i$ for each i. There exists a unique $f : M \to M$ such that $\pi_i \circ f = \pi_i$. We know one such f, namely $1_M$. Hence this is the only possibility.

2. Next apply the universal property to NM’ and $\phi_i = \pi_i'$. There exists a unique $g : M'\to M$ such that $\pi_i\circ g = \pi_i'$ for each i.

3. But we know $(M', (\pi_i')_i)$ also satisfies this same universal property. Swapping M and M’ there exists a unique $f : M\to M'$ such that $\pi_i' \circ f = \pi_i$ for each i.

4. Now $\pi_i\circ (g\circ f) = \pi_i'\circ f = \pi_i$ for each i. By step 1, we have $g\circ f = 1_M$. By symmetry we get $f\circ g = 1_{M'}$ too. ♦

Note

In fact, we have proven something stronger: that there is a unique homomorphism $f : M\to M'$ such that $\pi_i' \circ f = \pi_i$ for all i and this f must be an isomorphism.

# Direct Sum

Similarly, the direct sum satisfies the following.

Theorem (Universal Property of Direct Sum).

Let $M = \oplus_{i\in I} M_i$. For each $j\in I$, take the embedding

$\epsilon_j : M_j \longrightarrow M, \quad m_j \mapsto (\ldots, 0, 0, m_j, 0, 0, \ldots).$

Thus $\epsilon_j(m_j)_i$ has component $m_j$ at $i = j$ and 0 if $i\ne j$. The collection of data $(M, (\epsilon_i : M_i \to M)_{i\in I})$ satisfies the following.

• For any A-module N and collection of data $(N, (\alpha_i : M_i \to N)_{i\in I})$ where each $\alpha_i$ is A-linear, there is a unique A-linear $f : M\to N$ such that $f\circ \epsilon_i = \alpha_i$ for each $i\in I$.

Proof.

Left as an exercise. ♦

We also have uniqueness for the above universal property.

Proposition 2.

Let M’ be an A-module and $(M', (\epsilon'_i : M_i \to M))$ be a collection of data satisfying the above universal property. Then there is a unique isomorphism $f: M\to M'$ such that $f\circ \epsilon_i = \epsilon'_i$ for each $i\in I$.

Proof.

Left as an exercise. ♦

The following exercise tests your conceptual understanding of universal properties.

### Important Exercise

Suppose we messed up and take the following maps instead:

• embeddings $\epsilon^0_j : M_j \to \prod_{i \in I} M_i$ which take $m_j$ to $(\ldots, 0, 0, m_j, 0, 0, \ldots)$;
• projections $\pi^0_j : \oplus_{i\in I} M_i \to M_j$ which take $(m_i)_{i\in I}$ to $m_j$.

Explain why $(\prod_i M_i, (\epsilon^0_i)_{i\in I})$ fails the universal property of direct sum, and $(\oplus_i M_i, (\pi^0_i)_{i\in I})$ fails the universal property of direct product.

[Hint (highlight to read): one of them fails the uniqueness property, the other fails the existence property.]

# Optional Example

Let I be the set of all primes. Consider the direct sum of $\mathbb Z$-modules $A := \bigoplus_{p\in I} \mathbb Z / p\mathbb Z$. Consider the $\mathbb Z$-linear homomorphism (i.e. additive homomorphism)

$\bigoplus_{p\in I} (\mathbb Z / p\mathbb Z) \longrightarrow \mathbb Q/\mathbb Z, \quad (m_p)_{p\in I} \mapsto \sum_{p\in I} \frac{m_p}{p}.$

Note that addition is well-defined because only finitely many $m_p$ are non-zero. Also, $\frac{m_p}p \in \mathbb Q/\mathbb Z$ is independent of our choice of integer $\equiv m_p \pmod p$.

The map is injective: suppose $\frac{m_1}{p_1} + \ldots + \frac{m_k}{p_k} = 0$ where $p_i$ are distinct primes and each $m_i \not\equiv 0 \pmod {p_i}$.  Multiplying throughout by $p_1 p_2 \ldots p_k$ gives

$(p_1\ldots p_{k-1})m_k + (\text{some terms}) = 0$

where each term in brackets is divisible by $p_k$. Since $p_1\ldots p_{k-1}$ is coprime to $p_k$ we have $m_k \equiv 0 \pmod {p_k}$ which is a contradiction.

Claim: the image of the map is the set G of all rational $\frac m n$ where n is square free. Indeed, suppose n in $\frac m n$ is square free; write $n = p_1 \ldots p_k$ as a product of distinct primes.

• Now the subgroup $H_n := \{\frac m n : 0 \le m < n\}$ of G has order n.
• On the other hand, the submodule $B_n := (\mathbb Z/p_1 \mathbb Z) \times \ldots \times (\mathbb Z/p_k \mathbb Z) \subset A$ maps into G injectively with image with $H_n$.
• Since $|B_n| = |H_n|$, we see that $H_n$ lies in the image.

Thus $\bigoplus_p (\mathbb Z / p\mathbb Z) \cong G$.

This entry was posted in Advanced Algebra and tagged , , , , . Bookmark the permalink.

### 5 Responses to Commutative Algebra 9

1. Manas Jana says:

Thank you for your beautiful notes. Can you give some references of your notes?

2. limsup says:

Hi. Some common references for Commutative Algebra include:

– R. Y. Sharp, “Steps in Commutative Algebra” (possibly the easiest book to read among this list).
– Atiyan & Macdonald, “Introduction to Commutative Algebra” (well-written but extremely terse).
– David Eisenbud, “Commutative Algebra: With a View Toward Algebraic Geometry” (more advanced than the previous two books but has loads of nice examples and exercises, a bit verbose though).
– Hideyuki Matsumura, “Commutative Ring Theory” (possibly the most advanced in this list, a good follow-up to A & M).

But it’s best to supplement your reading of commutative algebra with some algebraic geometry. “Algebraic Curves” by Fulton is a nice introduction to the topic.

3. Vanya says:

There is. map missing in $\pi^0_j : \oplus_{i\in I} M_i which take (m_i)_{i\in I} to m_j.$ in the important exercise, though it is obvious what you mean.

Also did you mean $p_k$ in “Since $p_1\ldots p_{k-1}$ is coprime to $q_k$ we have $m_k \equiv 0 \pmod {p_k}$ which is a contradiction.

• limsup says:

Thank you for all the bug fixes. 😀

• Vanya says:

I enjoy your exposition very much. Hope you don’t mind my comments.