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

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

Recall that, as it happens, a module is projective if and only if it is a direct summand of a free module.

Suppose $P_1 \oplus P_2$ is projective. Then for some module $Q$, we have $P_1 \oplus P_2 \oplus Q$ free. In particular, both $P_1$ and $P_2$ are direct summands of a free module, and are thus projective.

Conversely, suppose $P_1$ and $P_2$ are projective; then there exist modules $Q_1$ and $Q_2$ such that $P_1 \oplus Q_1$ and $P_2 \oplus Q_2$ are free. As we proved in this previous exercise, $(P_1 \oplus Q_1) \oplus (P_2 \oplus Q_2) \cong_R (P_1 \oplus P_2) \oplus (Q_1 \oplus Q_2)$ is free. Thus $P_1 \oplus P_2$ is projective.