The ideal generated by a subset $X$ of a ring $R$ Let $R$ be a ring and let $X$ be a subset of $R$. The ideal generated by $X$ is defined to be the intersection of all ideals of $R$ which contain $X$.

I am not understanding why $\langle X\rangle=XR$. So, why $$\langle X\rangle=\Bigl\{\sum_{i=0}^nr_ix_i: r_i\in R, x_i \in X, n\in \mathbb{N}\Bigr\}.$$

Would you help me, please?
Thank you in advance.
 A: Small detail:  You should have $RX$ instead of $XR$.
First, we show $\langle X \rangle \subseteq RX$.  Suppose that $a \in \langle X \rangle$.  Then $a$ is in every ideal that contains $X$.  In particular $RX$ is an ideal containing $X$ (as long as $R$ is assumed to have an identity).  Thus $a \in RX$.
Next, we show that $RX \subseteq \langle X \rangle$.  Suppose $\sum r_ix_i \in RX$.  For each $i$ we must have $r_ix_i$ is in every ideal containing $X$.  Since ideals are rings, their sum must be in there as well.
A: You need the ring to be commutative for this. Since
$$
\sum_{i=1}^n r_ix_i=\sum_{i=1}^n x_ir_i
$$
it's immaterial if we denote the set by $RX$ or $XR$.
The proof needs two steps.
First step: $RX\subseteq\langle X\rangle$
If $x\in X$ and $r\in R$, then $rx\in\langle X\rangle$ because $x\in\langle X\rangle$. Therefore also finite sums $\sum_{i=1}^n r_ix_i$, for $r_i\in R$ and $x_i\in X$, belong to $\langle X\rangle$.
Second step: $\langle X\rangle\subseteq RX$
Let us prove that $RX$ is an ideal. Clearly $0\in RX$. Closure under sums is obvious. If $y=\sum_{i=1}^n r_ix_i\in RX$ and $r\in R$, then
$$
ry=r\Bigl(\,\sum_{i=1}^n r_ix_i\Bigr)=
\sum_{i=1}^n r(r_ix_i)=
\sum_{i=1}^n (rr_i)x_i\in RX
$$
Since, by definition, $\langle X\rangle$ is the intersection of all ideals of $R$ that contain $X$ and $X\subseteq RX$, we conclude $\langle X\rangle\subseteq RX$.
A: As the notation RX suggests, the left ideal generated by X "absorbs" multiplication (on the left ) by elements of R. ( As remarked above, I could omit "on the left" if the ring were commutative.  Then we could just say "ideal".)   This is the defining property of an ideal, together with being closed under addition ... ( It seems) it has been proved above that X generates the left ideal RX. ..
