## The direct sum of two modules is injective if and only if each direct summand is injective

Let $R$ be a ring with 1 and let $Q_1$ and $Q_2$ be (left, unital) $R$-modules. Prove that $Q_1 \oplus Q_2$ is injective if and only if $Q_1$ and $Q_2$ are injective.

Recall Baer’s Criterion: an $R$-module $Q$ is injective if and only if for every left ideal $I \subseteq R$ and every $R$-module homomorphism $\varphi : I \rightarrow Q$, there exists an $R$-module homomorphism $\Phi : R \rightarrow Q$ such that $\Phi|_I = \varphi$.

Suppose $Q_1$ and $Q_2$ are injective. Let $I \subseteq R$ be a left ideal and let $\varphi : I \rightarrow Q_1 \oplus Q_2$ be an $R$-module homomorphism. Letting $\pi_1$ and $\pi_2$ denote the first and second coordinate projections, $\pi_1 \circ \varphi : I \rightarrow Q_1$ and $\pi_2 \circ \varphi : I \rightarrow Q_2$ are $R$-module homomorphisms. By Baer’s Criterion, there exist $R$-module homomorphisms $\Phi_1 : R \rightarrow Q_1$ and $\Phi_2 : R \rightarrow Q_2$ such that $\Phi_1|_I = \pi_1 \circ \varphi$ and $\Phi_2|_I = \pi_2 \circ \varphi$. Define $\Phi : R \rightarrow Q_1 \oplus Q_2$ by $\Phi(r) = (\Phi_1(r), \Phi_2(r))$. Certainly $\Phi$ is an $R$-module homomorphism. Moreover, $\Phi_I = \varphi$. Thus $Q_1 \oplus Q_2$ is injective.

Suppose $Q_1 \oplus Q_2$ is injective. Let $I \subseteq R$ be a left ideal and let $\varphi_1 : I \rightarrow Q_1$ and $\varphi_2 : I \rightarrow Q_2$ be $R$-module homomorphisms. Define $\varphi : I \rightarrow Q_1 \oplus Q_2$ by $\varphi(i) = (\varphi_1(i), \varphi_2(i))$. Certainly $\varphi$ is an $R$-module homomorphism. By Baer’s Criterion, there exists an $R$-module homomorphism $\Phi : R \rightarrow Q_1 \oplus Q_2$ extending $\varphi$. Now let $\Phi_1 = \pi_1 \circ \Phi$ and $\Phi_2 = \pi_2 \circ \Phi$; certainly $\Phi_1 : R \rightarrow Q_1$ and $\Phi_2 : R \rightarrow Q_2$ are $R$-module homomorphisms, and if $a \in I$ then $(\Phi_1(a), \Phi_2(a)) = \Phi(a) = \varphi(a) = (\varphi_1(a), \varphi_2(a))$. Thus $Q_1$ and $Q_2$ are injective.