Property of Being an Ideal is not Transitive

Theorem
Let $I$ be an ideal of a ring $R$.

Let $J$ be an ideal of $I$.

Then $J$ need not necessarily be an ideal of $R$.

Proof
Let $R = \Q\left[{ X }\right]$ be the ring of polynomials in $X$ over $\Q$.

Let:
 * $I = \left\{{ a_0 + a_1 X + \cdots + a_n X^n \in R : a_0 = a_1 = 0 }\right\}$

and
 * $J = \left\{{ a_0 + a_1 X + \cdots + a_n X^n \in R : a_0 = a_1 = a_3 = 0 }\right\}$

First let us show that $I$ is an ideal of $R$.

We establish the properties of the ideal test in order.

$(1): \quad I \ne \varnothing$

This follows from the fact that $X^2 \in I$.

$(2): \quad \forall P, Q \in I: P + \left({-Q}\right) \in I$

Let
 * $\displaystyle P = \sum_{i = 0}^{+\infty} a_i X^i,\ Q = \sum_{i = 0}^{+\infty} b_i X^i \in I$.

Then by the definition of addition of polynomials:
 * $\displaystyle P + \left({-Q}\right) = \sum_{i = 0}^{+\infty}c_iX^i,\qquad c_i = \left({ a_i + b_i }\right)$

By assumption, $a_0 = a_1 = b_0 = b_1 = 0$.

Therefore:
 * $c_0 = a_0 + b_0 = 0,\qquad c_1 = a_1 + b_1 = 0$

Therefore $P + \left({-Q}\right) \in I$.

$(3): \quad \forall P \in I, Q \in R: Q \cdot P \in I$

Let
 * $\displaystyle P = \sum_{i = 0}^{+\infty} a_i X^i \in I,\ Q = \sum_{i = 0}^{+\infty} b_i X^i \in R$.

By the definition of multiplication of polynomials,
 * $\displaystyle Q \cdot P = \sum_{i = 0}^{+\infty} c_i X^i,\qquad c_i = \sum_{j + k = i} a_jb_k$

In particular, since $a_0 = 0$:
 * $c_0 = a_0 b_0 = 0$

Since $a_0 = a_1 = 0$:
 * $c_ 1 = a_0 b_1 + a_1 b_0 = 0$

Therefore $Q \cdot P \in I$.

This shows that $I$ is an ideal of $R$.

Next we show that $J$ is an ideal of $I$.

Again, we verify the properties of the ideal test in turn.

$(1): \quad J \ne \varnothing$

This follows from the fact that $X^2 \in J$.

$(2): \quad \forall P, Q \in J: P + \left({-Q}\right) \in J$

Let
 * $\displaystyle P = \sum_{i = 0}^{+\infty} a_i X^i,\ Q = \sum_{i = 0}^{+\infty} b_i X^i \in J$.

Then by the definition of addition of polynomials:
 * $\displaystyle P + \left({-Q}\right) = \sum_{i = 0}^{+\infty}c_iX^i,\qquad c_i = \left({ a_i + b_i }\right)$

By assumption, $a_0 = a_1 = a_3 = b_0 = b_1 = b_3 = 0$.

Therefore:
 * $c_0 = a_0 + b_0 = 0,\qquad c_1 = a_1 + b_1 = 0, ,\qquad c_3 = a_3 + b_3 = 0$

Therefore $P + \left({-Q}\right) \in J$.

$(3): \quad \forall P \in J, Q \in I: Q \cdot P \in J$

Let
 * $\displaystyle P = \sum_{i = 0}^{+\infty} a_i X^i \in J,\ Q = \sum_{i = 0}^{+\infty} b_i X^i \in I$.

By the definition of multiplication of polynomials,
 * $\displaystyle Q \cdot P = \sum_{i = 0}^{+\infty} c_i X^i,\qquad c_i = \sum_{j + k = i} a_jb_k$

Since $J \subseteq I$, we have $P,Q \in I$ so we have already that $c_0 = c_1 = 0$.

Moreover $a_0 = a_1 = b_0 = b_1 = 0$, so
 * $c_3 = a_0b_3 + a_1 b_2 + a_2 b_1 + a_3 b_0 = 0$

Therefore $Q \cdot P \in J$.

This shows that $J$ is an ideal of $I$.

Finally we wish to see that $J$ is not an ideal of $R$.

We have that $X^2 \in J$ and $X \in R$.

If $J$ were an ideal of $R$, this would imply that $X \cdot X^2 = X^3 \in J$.

But by the definition of $J$, we must have that the coefficient of $X^3$ is zero.

This is a contradiction, so $J$ is not an ideal of $R$.