Build A′, B′ and C′ as described in the previous section. If f maps A into B, and g maps B into C, let f′ and g′ be the corresponding boundary operators acting on A′ and B′ respectively. Ignoring the last 0, an exact sequence implies an exact dual.
Let j be a function from M into A, an element of A′. If this becomes 0 in B′ then jf = 0, and f maps a nonzero element of A to 0 in B. Therefore, if f is injective, so is f′.
If M is free we can reverse this argument. If f maps y to 0 in B, build j such that j(x) = y, where x is one of the generators of M, and f′ maps j to 0.
But M need not be free; it only needs a summand isomorphic to R. Let x generate this copy of R, and map the rest of M to 0. We can do the same thing if the quotient module M/P contains a summand of R. Let x generate R in the quotient, map P to 0, and map the coset P+x to y.
If M is not well behaved, this direction need not hold. Consider the inexact sequence 0 → Z5 → Z7 → Z11 → 0, as Z modules. The boundary operators are trivial; you're looking at the homology groups. Let M = Z3. All the functions from Z3 into these modules are trivial, hence the dual sequence is 0 → 0 → 0 → 0 → 0, which is exact.
Moving on to the next module, let k be a function in B′ that lies in the kernel of g′. Thus kg = 0, and g maps the image of k to 0. If B is exact, the image of k pulls back uniquely to a submodule of A. Apply this inverse map to k and call the result j. Thus k = jf, and B′ is exact.
If M is free, the converse holds. Suppose y ∈ B lies in the kernel of g minus the image of f. Let k(x) = y to find a function in the kernel of g′ minus the image of f′.
Next consider the traditional cochain, the functions from A B and C into M. Ignoring the first 0, an exact sequence implies an exact dual.
Let j be a function from C into M such that gj maps B to 0. If g is onto, this is impossible. Therefore g surjective implies g′ is injective.
Conversely, if x lies outside the image of C, let j map the image of C to 0, and x to y in M. This assumes there is a way to map x to y in M, e.g. C/g(B) is free. When this is not the case, e.g. mapping Z11 into Z3, the dual can indeed become exact when the original sequence is inexact.
Moving on to B′, let k be a map from B into M that becomes 0 when pulled back to A. Thus k is 0 on f(A), and is well defined on B/f(A). This is equal to C, so let j(C) = k(B/f(A)). By construction, k has a valid preimage in C′, namely j, and B′ is exact.
Conversely, suppose x lies in the kernel of g minus the image of A. If there is a function from B/f(a) into M that is nonzero at x, then we can build a contradiction.
As you move to the cohomology, you cannot guarantee the first or last 0. Consider 0 → 2Z → Z → Z2 → 0, as Z modules. Map Z2 into this sequence and get 0 → 0 → 0 → Z2 → 0, which is not exact at the fourth position.
The converse need not follow. In the earlier example, Z7 is not the direct product of Z5 and Z11, yet the dual sequence, into or out of Z3, is all zeros, and is split exact.
When building the dual from a short exact sequence into M, what can we say about the first 0? When is the dual short exact? Remember that f embeds A into B, and f′ is surjective iff every function from A into M can be realized by composing f with some function from B into M. This is the very definition of injective. Therefore M is injective iff every exact sequence produces an exact dual.