Ideal generated by a set in a commutative ring without unity

In a commutative ring with unity $1$, call it $R$, the the ideal generated by the set $S=\{a_1,...,a_n\}$ is the smallest ideal of $R$ containing $S$. It can be proven that this ideal is

$$(a_1,...,a_n)=\left\{\sum_{k=1}^{n} r_ka_k \, : \, r_k \in R \right\}$$

I think to have proved this fact by the standard way: clearly any such ideal containing $S$ must contain this set, and this set is itself an ideal. But if the commutative ring does not have a unit, i cannot see why the same proof does not apply. That is, where we use the fact of a unity's existence to show this?

Thanks.

-

If $R$ has no multiplicative identity, $(a)$ need not contain $a$ if you take it to be $aR$. You want the ideal generated by a set $S$ to contain $S$.

-
@Martin: Well, yes: that was rather the point of my answer. Apparently I should make the counterfactual more explicit. – Brian M. Scott Apr 26 '13 at 12:06

The elements of the ideal $(S)$ generated by $S$ are finite sums or differences of elements of the form $s$ or $rs$, where $s \in S$ and $r \in R$. So in formulas:

$(S) = \{\sum_{i=1}^{n} r_i s_i : n \in \mathbb{N}, s_i \in S, r_i \in \mathbb{Z} \sqcup R\}$.

Here we use the $\mathbb{Z}$- and the $R$-module structure of $R$. In the non-commutative case, the formula above gives the left ideal generated by $S$. The two-sided ideal is even more complicated, we also have to take elements of the form $rsr'$ where $r,r' \in \mathbb{Z} \sqcup R$.

-

In the noncommutative case include s(i) t(i) with t(i) in R . here I used s(i) instead of the subscript i.

-