Set of associated primes of direct sum Let $M$ be a module over a ring $R$.
Let $\operatorname{Ass}(M)$ be the set of annihilator ideals $\operatorname{Ann}(x)$, which are prime, so
$$\operatorname{Ass}(M) = \{\operatorname{Ann}(x) \mid \operatorname{Ann}(x)\text{ is prime}, x \in M\}.$$
Recall that $\operatorname{Ann}(x) = \{r \in R \mid rx=0\}$.

If $M_1$ and $M_2$ are two modules, I wish to prove that
  $$\operatorname{Ass}(M_1 \oplus M_2) = \operatorname{Ass}(M_1) \cup \operatorname{Ass}(M_2),$$
  where $\oplus$ is direct sum and $\cup$ is ordinary union of sets.

I need to do this by considering an element of the left hand side and show it is in the right hand side, so nothing fancy. The direction from right to left is easy, since for any $m_1 \in M_1$ I have $\operatorname{Ann}(m_1) = \operatorname{Ann}(m_1,0)$, but the other direction causes me trouble.
 A: Let $\mathfrak{p} \in \textrm{Ass}(M_1 \oplus M_2)$. Suppose $\mathfrak{p} = \textrm{Ann}(m_1 + m_2)$ where $m_1 \in M_1$ and $m_2 \in M_2$. (I am considering $M_1$ and $M_2$ as submodules of $M_1 \oplus M_2$.) So for all $a$ in $\mathfrak{p}$, $a m_1 + a m_2 = 0$, so $a m_1 = 0$ and $a m_2 = 0$. Thus $\mathfrak{p} \subseteq \textrm{Ann}(m_1) \cap \textrm{Ann}(m_2)$. 
Now, either $\mathfrak{p} = \textrm{Ann}(m_1)$ or not; if it is we are done, so suppose $\mathfrak{p} \ne \textrm{Ann}(m_1)$. Let $a \in \textrm{Ann}(m_1)$, $a \notin \mathfrak{p}$. Then, 
$$a m_1 + a m_2 = a m_2 \ne 0$$
since otherwise $a \in \textrm{Ann}(m_1 + m_2)$, which would contradict $a \notin \mathfrak{p}$. Thus $a \notin \textrm{Ann}(m_2)$. So indeed $\mathfrak{p} = \textrm{Ann}(m_1) \cap \textrm{Ann}(m_2)$. Let $a$ be as above, and let $b \in \textrm{Ann}(m_2)$; then $a b \in \textrm{Ann}(m_1) \cap \textrm{Ann}(m_2) = \mathfrak{p}$, so $b \in \mathfrak{p}$. Thus $\textrm{Ann}(m_2) = \mathfrak{p}$. Hence, either $\textrm{Ann}(m_1) = \mathfrak{p}$ or $\textrm{Ann}(m_2)=\mathfrak{p}$, so 
$$\textrm{Ass}(M_1 \oplus M_2) = \textrm{Ass}(M_1) \cup \textrm{Ass}(M_2)$$
as required.
A: You could use the fact that for a submodule $N\subseteq M$ we have $\mathrm{Ass}(M)\subseteq \mathrm{Ass}(N)\cup \mathrm{Ass}(M/N)$.
This can be proved directly: Let $\mathrm{Ann}(m)=\mathfrak p\in\mathrm{Ass}(M)$.
If $A/\mathfrak p\cap N\neq 0$, then there is $0\neq n\in A/\mathfrak p\cap N$. By $A/\mathrm{Ann}(m)\cong mA$ you get $\mathrm{Ann}(n)=\mathfrak p$ and $\mathfrak p\in \mathrm{Ass}(N)$.
If otherwise $A/\mathfrak p\cap N=0$ you can use that $\mathfrak p\in \mathrm{Ass}(M)$ iff there is a injection $A/\mathfrak p\rightarrow M$ to show that $\mathfrak p\in \mathrm{Ass}(M/N)$.
A: This is just a restructuring of @ZhenLin's answer in light of the comments below it by @DylanMoreland and @PavelČoupek.

Let $M$ be an $A$-module that is a finite direct sum of its submodules $M_i$, that is, let $M = \bigoplus_{i=1}^n M_i$. If $\mathfrak{p}$ is an associated prime of $M_i$, then there exists $m_i \in M_i$ such that $\mathfrak{p} = \mathrm{ann}_A(m_i)$. But since $m_i \in M$ as well, this shows that $\mathfrak{p}$ is an associated prime of $M$. Hence, $\mathrm{Ass}(M) \supseteq \bigcup_{i=1}^n \mathrm{Ass}(M_i)$.
Conversely, suppose that $\mathfrak{p}$ is an associated prime of $M$.
Let $m = \sum_{i=1}^n m_i$, $m_i \in M_i$, be an element such that $\mathfrak{p} = \mathrm{ann}_A(m)$. In particular, $\mathfrak{p}$ annihilates $m_i$ for each $i$, so $\mathfrak{p} \subseteq \mathrm{ann}_A(m_i)$ for each $i$. Hence, $\mathfrak{p} \subseteq \bigcap_{i=1}^n \mathrm{ann}_A(m_i)$.
For the reverse inclusion, we observe that if $a \in \mathrm{ann}_A(m_i)$ for each $i$, then $am = 0$. Thus, $\bigcap_{i=1}^n \mathrm{ann}_A(m_i) \subseteq \mathfrak{p}$.
Hence, $\mathfrak{p} = \bigcap_{i=1}^n \mathrm{ann}_A(m_i)$. Now, by the observation mentioned by @DylanMoreland, this implies $\mathfrak{p} = \mathrm{ann}_A(m_i)$ for some $i$, and so $\mathrm{Ass}(M) \subseteq \bigcup_{i=1}^n \mathrm{Ass}(M_i)$.

The same proof works for arbitrary direct sums as well. $\mathrm{Ass}(M) \supseteq \bigcup \mathrm{Ass}(M_i)$ by the same argument as before. To prove the reverse inclusion, let $\mathfrak{p}$ be an associated prime of $M$. Let $m = \sum m_i$, $m_i \in M_i$, be an element such that $\mathfrak{p} = \mathrm{ann}_A(m)$. In particular, $m_i = 0$ for all but finitely many indices $i$. So, $m$ is an element of a finite direct sum. Now, we run through the same proof as before for this finite direct sum to prove that $\mathfrak{p}$ is an associated prime of one of the $M_i$.
Hence, the result
$$\operatorname{Ass}\left(\bigoplus M_i\right) = \bigcup \operatorname{Ass}(M_i)$$ is true for arbitrary direct sums.
