Smallest Ideal containing S Let $R$ be a commutative ring and $S=\{a_1,\ldots,a_n\}\subset R$, then in the last lecture
$$\langle S\rangle:=\{r_1a_1+\ldots r_na_n,~r_i\in R\}$$
was referred to as the smallest ideal of $R$ containing $S$.
I have a question for an example I came up with:
Let $R=(\mathbb Z,+,\odot)$ where $\mathbb Z$ is the set of integers, $+$ the usual addition and $a\odot b=0$ for all $a,b\in\mathbb Z$. Then $R$ is a commutative ring if I am not mistaken, yet for any $S=\{a_1,...a_n\}\in\mathbb Z$ I get $\langle S\rangle={0}$ and if I have at least one $a_i\neq 0$, this would not be an ideal containing $S$.
Is there something wrong with my reasoning or maybe my understanding of "containing $S$"? If I had a ring with $1$ it would make sense to me, however in our lecture we are not forcing our rings to have a multiplicative identity.
 A: That description of $\langle S\rangle$ is only valid for rings with unity.
In general, for arbitrary rings $R$, possibly non-commutative, possibly without a unit, we have (my naturals include $0$):
$$\begin{align*}
\langle a\rangle &= \left\{\left. na+ra + as + \sum_{i=1}^m r_ias_i\quad\right|\  n\in\mathbb{Z},m\in\mathbb{N}, r,s,r_i,s_i\in R\right\}.\\
\langle S\rangle &= \left\{\left. \sum_{i=1}^k (m_it_i + a_it_i + t_ib_i + r_it_is_i)\quad\right|\  k\in\mathbb{N}, m_i\in\mathbb{Z}, t_i\in S, a_i,b_i,r_i,s_i\in R\right\}.
\end{align*}$$
When $R$ has a unity but is not commutative, then you may omit the terms $na$, $ra$, and $as$ in the first one, as they can be obtained as
$$\begin{align*}
na &= (\overbrace{1+\cdots+1}^{n\text{ sumands}})a1,\\
ra &= ra1\\
as &= 1as
\end{align*}$$
so they can all be folded into the $\sum_{i=1}^m r_ias_i$ terms. Similarly in the description of $\langle S\rangle$, leaving just a sum of terms of the form $r_it_is_i$. If the ring is commutative without a $1$, then you can omit $as+\sum r_ias_i$ in the first description, and you may replace the term $a_it_i+t_ib_i+r_it_is_i$ with just $a_it_i$ in the second.
If the ring is commutative with $1$, then you get the expression you have.
