I need two counterexamples.
First, a direct sum of $R$-modules is projective iff each one is projective. But I need an example to show that, βan arbitrary direct product of projective modules need not be a projective module.β
If I let $R= \mathbb Z$ then $\mathbb Z$ is a projective $R$-module, but the direct product $\mathbb Z \times \mathbb Z \times \cdots$ is not free, hence it is not a projective module. We have a theorem which says that every free module over a ring $R$ is projective. Am I correct?
Second, a direct product of $R$-modules is injective iff each one is injective but I need an example to show that the direct sum of injective modules need not be injective.