Atiyah-Macdonald, Exercise 2.17 (direct limit) I have solved the following exercise, can you tell me if this is correct? Thanks.
2.17. Let $(M_i)_{i \in I}$ be a family of submodules of an $A$-module such that for each pair $i,j$ in $I$ there exists $k$ in $I$ such that $M_i + M_j \subset M_k$. Define $i \leq j$ to mean $M_i \subset M_j$ and let $\mu_{ij}: M_i \to M_j$ be the embedding of $M_i$ in $M_j$. Show that 
$$ \varinjlim_n M_n = \bigcup M_n = \sum M_n$$

$ \varinjlim_n M_n = \bigcup M_n$: 
We want to show that the union together with inclusions $i_i : M_i \hookrightarrow \bigcup M_n$ satisfies the universal property of the direct limit of the direct system $M_i, \mu_{ij}$. To this end, let $Y$ be a module and $i_{i}^\prime$ be inclusions $i_{i}^\prime : M_i \hookrightarrow Y$ such that for $x_k \in M_k$ we have $i_i^\prime (\mu_{ki}(x_k)) = i_k^\prime(x_k)$. We want to show that there exists a unique homomorphism $\varphi: \bigcup M_n \to Y$ such that for all $i,j$: $\varphi \circ i_i = i_j^\prime \circ \mu_{ij}$. Define $\varphi: \bigcup M_i \to Y$ as follows: for $m$ in $\bigcup M_i $ there is $M_i$ such that $m \in M_i$. Set $\varphi(m) = i^\prime_j (\mu_{ij} (i_i^{-1}(m)))$. Now we have existence, since this (as a concatenation of homomorphisms) is clearly a homomorphism. (well-define since inclusions are injective). To verify uniqueness, let $\varphi^\prime$ be a second homomorphism making the diagram commute. Let $m \in M$ and for a random $k$, let $m_k = i_k^{-1}(m)$. Then $\varphi (m) = \varphi (i_k (m_k)) = i^\prime_j (\mu_{kj} (m_k)) = \varphi^\prime (i_k (m_k) ) = \varphi^\prime (m)$, hence showing uniqueness.
Similarly in the case $\sum M_n$.
Edit
Dear BenjaLim, or anyone else, I'm sorry but I don't understand why I cannot do $i_i^{-1}(m)$. Would someone explain it to me? Thank you.
 A: Edit: We first check that $\bigcup M_i$ is an $A$ - module: We will check the only non-trivial part here which is closure under addition.  Suppose that we have $y,z \in \bigcup M_i$. Then there exist $j,k$ such that $y \in M_j$ and $z \in M_k$. Now by assumption there exists $l \in I$ such that $M_j + M_k \subseteq M_l$. Hence it is clear that $y+z \in M_l \subset \bigcup M_i$ showing that $\bigcup M_i$ is closed under addition.
I don't think your proof is quite right because you can't just say "concatenation of homomorphisms": how do you define $i^{-1}(m)$? I think your proof breaks down here because you cannot just do that. The way I would do it is as follows:
We want to prove that whenever we have maps $f_i : M_i \rightarrow N$ where $N$ is some $A$ - module and $f_i = f_j \circ \mu_{ij}$ whenever $i\leq j$, there is a unique $A$ - module homomorphism $L : \bigcup M_i \to N$. Take an element $x \in \bigcup M_i$. Then $x$ is in at least one $M_j$, so we can define $L(x)$ to be equal to $f_j(x)$. We need to check that this is well defined. Suppose $x$ is also in some other $M_k$. Then we know that we can choose an $l \in I$ such that $l \geq j,k$. By definition of $f_l$ we have that $f_j(x) = f_l\circ \mu_{jl}(x)$. But the right hand side is just $x$ viewed as an element of $M_l$ and then mapped under $f_l$. Similarly writing down $f_k(x) = f_l \circ \mu_{kl}(x)$, the right hand side is just $x$ viewed as an element of $M_l$ and then mapped under $f_l$. It follows that $f_j(x) = f_k(x)$ so that $L$ is well defined.
We now check that $L$ is an $A$ - module homomorphism; the only non-trivial part to check is that $L$ is additive. So suppose we have $x,y \in \bigcup M_i$. Then there is $j,k$ such that $x \in M_j$ and $y \in M_k$. Then we know that there exists an $l \geq j,k$ such that $x+y \in M_l$ and so $L(x+y) = f_l (x+y)$. Now $L(x) = f_j(x)$, $L(y) = f_k(y)$. Since
$$f_j(x) = f_l\circ \mu_{jl}(x), \hspace{4mm} f_k(y) = f_l\circ \mu_{kl}(y)$$
we can say that $f_j(x) + f_k(y) = f_l(x) +f_l(y)$. This is because $\mu_{jl}(x)$ and $\mu_{kl}(y)$ just views $x$ and $y$ respectively as elements of $M_l$. It follows that $L$ is additive. It now remains to check that $L$ is uniquely determined by the $f_i$. Suppose we have another map $\varphi : \bigcup M_i \longrightarrow N$ such that $\varphi \circ \tau_i = f_i$. Then it follows that 
$$\varphi \circ \tau_i(x) = L \circ \tau_i(x)$$
given any $i \in I$ and $x \in M_i$. But then  since the  $\tau_i$ are inclusion maps this is effectively saying that $L(x) = \varphi(x)$ for all $x \in M_i$ for any $M_i$. Since $x$ is arbitrary we conclude that $L = \varphi$ showing uniqueness. This completes the proof that 
$$\varinjlim M_i \cong \bigcup M_i.$$
Edit: I think you have your universal properties wrong: The universal property of the direct limit is this: If you have $N$ an $A$ - module and for each $i \in I$ let $\alpha_i : M_i \to N$ be an $A$ - module homomorphism such that $\alpha_i = \alpha_j \circ \mu_{ij}$ whenver $i \leq j$. The there exists a unique homomorphism $\alpha : M \to N$ such that $\alpha_i = \alpha \circ \mu_i$ for all $i \in I$.
Edit: Let me show you why it suffices to show that $\bigcup M_i$ satisfies the universal property of $\varinjlim M_i$ to prove that $\bigcup M_i \cong \varinjlim M_i$. Now we have inclusion maps $\tau_i : M_i \to \bigcup M_i$  such that clearly $\tau_i = \tau_j \circ \mu_{ij}$ for any $i \leq j$ because the $\mu_{ij}$ are just inclusion maps. So now we just need to show that $\bigcup M_i$ has the property that given compatible $A$ - module homomorphisms $f_i : M_i \to N$ for some $A$ - module $N$ such that $f_i = f_j \circ \mu_{ij}$ whenever $i \leq j$, there is a unique $A$ - linear map $L : \bigcup M_i \to N$ such that
$$f_i = L \circ \tau_i \hspace{3mm} \forall i\in I.$$
To see why we only need to verify this, suppose the result above about $\bigcup M_i$ holds. Then  putting in place of $f_i$ the usual maps $\phi_i$ from $M_i$ to $\varinjlim M_i$ and $N = \varinjlim M_i$, we have a unique linear map $L : \bigcup M_i \longrightarrow \varinjlim M_i$ such that 
$$\phi_i = L \circ \tau_i \hspace{3mm} \forall i \in I.$$
Recall how the maps $\phi_i$ are defined. We have $M_i \stackrel{\lambda_i}{\longrightarrow} \bigoplus_{i\in I} M_i \stackrel{ \mu}{\longrightarrow} \varinjlim M_i$ so 
$$\phi_i \stackrel{\text{def}}{\equiv} \mu \circ \lambda_i$$
where $\mu$ is the canonical projection from the direct sum onto the direct limit, and the $\lambda_i$ the canonical injections from $M_i$ into the direct sum. Now because we have maps $\tau_i$ out of $M_i$ to $\bigcup M_i$ such that $\tau_i = \tau_j \circ \mu_{ij}$ whenever $i\leq j$, then by the universal property of the direct limit, there is a unique $A$ - module homomorphism $L': \varinjlim M_i \rightarrow \bigcup M_i$ such that 
$$\tau_i = \phi_i \circ L' \hspace{3mm} \forall i \in I.$$
From here it is not hard to see that $L$ and $L' $ are mutual inverses so that $\bigcup M_i \cong \varinjlim M_i$.
$\hspace{6in} \square$
