TITLE: What is the kernel of the summation map from the direct sum to the sum?
QUESTION [8 upvotes]: Let $R$ be a ring, and let $I_1,\ldots,I_n$ be ideals in $R$ (or submodules of some $R$-module). Consider the sequence
$$
\bigoplus_{1\leq j < k\leq n} I_j\cap I_k\quad\xrightarrow{f}\quad\bigoplus_{l=1}^n I_l\quad\xrightarrow{g}\quad\sum_{k=1}^n I_k,
$$
where $g$ is given by addition, and $f$ maps $x\in I_j\cap I_k$ to $x\in I_j$ and to $-x\in I_k$ (and to zero in all other components).
Clearly, $g$ is surjective and the composition $g\circ f$ vanishes.
Question: Is the above sequence exact in the middle?
(This seems to be easy for $n=2$.)
(Concerning the title: I am aware of the fact that $f$ won't be injective in general.)

REPLY [4 votes]: You can convert chandok's example to ideals in a commutative ring as well.  Take R=Z[x,y,z]/(3,xx,xy,xz,yy,yz,zz), a 4-dimensional algebra over Z/3Z.  It has ideals of (vector space) dimension 1 generated by x−y, y−z, and z−x.  There is clearly a non-zero kernel of "g" containing the triple ( x−y, y−z, z−x ).  However, the domain of "f" is 0, since all pairwise intersections of the ideals are 0.
The obvious translation of chandok's example to one over the ring Z3 fails, since the ideals generated by the xi get bigger.  This ring fixes that, since it has a bunch of pointless ring elements that leave most abelian subgroups as ideals.