Verifying Subtraction Closure in the Product of Two Ideals

I am attempting to show that the product of two ideals $A$ and $B$, $AB$, is also an ideal. I've got the underlying set defined as the following:

$$AB=\left\{ a_1b_1+a_2b_2+\dots+a_nb_n \mid a_i\in A, b_i \in B, n \in \mathbb{Z}^+ \right\}$$

Good so far. Verifying the $ar, ra \in AB$ requirement is simple enough using associativity. For whatever reason I'm getting hung up on the subtraction closure. I'll define $x, y \in AB$ such that:

\begin{align*} x&= a_1b_1+a_2b_2+\dots+a_nb_n \tag{a_i \in A, b_i \in B}\\ y&= c_1d_1+c_2d_2+\dots+c_nd_n \tag{c_i \in A, d_i \in B} \end{align*}

And then I'll take $x - y$:

\begin{align*} x-y&= a_1b_1+a_2b_2+\dots+a_nb_n-\left(c_1d_1+c_2d_2+\dots+c_nd_n\right) \\ &= a_1b_1+a_2b_2+\dots+a_nb_n-c_1d_1-c_2d_2-\dots-c_nd_n \\ &= a_1b_1-c_1d_1+a_2b_2-c_2d_2+\dots+a_nb_n-c_nd_n \\ &= (a_1b_1-c_1d_1)+(a_2b_2-c_2d_2)+\dots+(a_nb_n-c_nd_n) \end{align*}

So that's where I end up. Question is: is that enough? (bonus question: have I screwed something up?). I'm stuck on the idea that I should be able to derive $(a_i-c_i)(b_i-d_i)$ somehow, but I haven't been able to make that happen. So, at the moment I'm not convinced that $(x-y) \in AB$.

My suspicions are that I've either WAY overthought this, or that I've completely forgotten some middle school math rules that will due the trick. Either way, insights will be appreciated. Thanks!

• The value of $n$ doesn't necessarily have to be the same between the two elements. Feb 3, 2018 at 0:59
• Hint: if $x=a_1 b_1 + a_2 b_2$ and $y = c_1 d_1$, then $x-y = a_1 b_1 + a_2 b_2 + (-c_1) d_1$. Feb 3, 2018 at 1:00
• I think that you're on the overthinking side. $-c_1d_1$ is an element of $AB$ since $-c_1\in A$ and $d_1\in B$. So, you've already got a sum of terms of the correct form. Feb 3, 2018 at 1:24
• @daniel Okay, so the point of the parentheses is to highlight the fact that $-c_1 \in A$ and $d_1 \in B$? I don't know why I wanted something more complicated than that.
– J.T.
Feb 3, 2018 at 1:31
• And point taken about $n$. I thought about changing it, but I liked how neat everything turned out, lol
– J.T.
Feb 3, 2018 at 1:32

$-y=-\sum c_id_i=\sum(-c_i)d_i\in AB$