Do all exact sequences $0 \rightarrow A \rightarrow A \oplus B \rightarrow B \rightarrow 0$ split for finitely generated abelian groups?

This is true more generally for finitely generated modules over a noetherian ring. Your question is equivalent to asking whether the sequence $$0\rightarrow \operatorname{Hom}(B,A)\rightarrow \operatorname{Hom}(A\oplus B,A)\rightarrow \operatorname{Hom}(A,A)$$ is surjective on the right. To prove this, it suffices to localize and then complete at an arbitrary prime $P$, so we can assume we're working over a complete local ring where $P$ is the maximal ideal. Now it suffices to check surjectivity after modding out an arbitrary power $P^n$, which allows us to assume that all the modules are of finite length. Surjectivity follows because the lengths of the left-hand and right-hand modules add up to the length of the module in the middle.

Edited to add: The comments above (which I read after I posted this) remind me that I've posted this same argument before. If people think this instance should be deleted, I'm fine with that.


I thought it worth adding a reference to this:

Miyata, Takehiko, Note on direct summands of modules, J. Math. Kyoto Univ. 7 1967 65–69.

In the paper, the question of the OP is attributed to Matsumura and the solution to Toda. Then a short argument is given for this case.

The author generalizes this result to the following (which is a quote from MathSciNet):

"Let $R$ be a commutative, noetherian ring and let $A$ be an $R$-algebra of finite type. Moreover, let $M$ be a finitely generated $A$-module and let $N$ be a submodule of $M$. Using the usual tools of homological algebra and noetherian ring theory, the author establishes the following pair of results.

Theorem 1: If $M$ is isomorphic to $N\oplus M/N$, then $N$ is a direct summand of $M$.

Theorem 2: If $0\to N\otimes_R T\to M\otimes_R T$ is exact for all $A$-modules $T$ (i.e., $N$ is pure), then $N$ is a direct summand of $M$."