Exercise 1.9 in Hartshorne - is my initial attempt a good start?
Solution 1:
I want to point out that Hartshorne has given you all of the commutative algebra you really need. Let's say $\mathfrak{a}$ can be generated by $f_1, \dots, f_r$. We'll induct on $r$. The only observation is that any irreducible component $Y$ of $Z(\mathfrak{a})$ is contained in an irreducible component $Y'$ of $Z(f_1, \dots, f_{r-1})$, and in fact $Y$ is an irreducible component of $Y' \cap Z(f_r)$.
If you want to finish this off, you would have to justify a few things from the last paragraph and then use (Ex. 1.8) and the theorem (1.8Ab).
Solution 2:
Let our variety be $Y$ and $Y=Y_1 \cup \cdots \cup Y_s$ its decomposition into irreducible components. Then the vanishing ideals satisfy $I_Y = I_{Y_1} \cap \cdots \cap I_{Y_s}$. Note that $I_{Y_1},\dots,I_{Y_s}$ are the minimal primes that contain $I_Y$. Since by hypothesis $I_Y$ is generated by $r$, it follows by Krull's Generalized Hauptidealsatz (e.g. Matsumura, Commutative Ring Theory, Theorem 13.5) that the height of each of $I_{Y_i}$ is at most $r$. But since $\dim Y_i = n - \operatorname{height} (I_{Y_i})$, this implies that $\dim Y_i \ge n -r$.
Solution 3:
This is an immediate consequence of Krull's dimension theorem which can be found here, on page 22.
Krull's Dimension Theorem: If $\mathfrak{a}$ is an ideal generated by $r$ elements, then $\text{ht}( \mathfrak{p})\leq r$ for every minimal prime $\mathfrak{p}$ of $\mathfrak{a}$.
Since irreducible components of a variety correspond to minimal prime ideals, we have $\dim (k[x_1,...,x_n]/\mathfrak{p})= \dim (k[x_1,...,x_n]) -\text{ht}(\mathfrak{p})$ and the theorem follows since the dimension of the variety is equivalent to the dimension of the coordinate ring of that variety.