Irreducible components of all codimensions If one has an affine closed set $X$ in $\mathbb{A}^n$ defined by $m<n$ equations, then one can show that the irreducible components of $X$ have codimension $\leq m$: one shows this by induction on the $m=1$ case. My question is this: for fixed $n$, is it always possible to find for any $m<n$ such an affine closed set $X_m$ in $\mathbb{A}^n$ which has irreducible components of all codimensions $1,2,\ldots, m$? I can't seem to construct a general example for which this surjectivity-like condition will always hold.
 A: It has been pointed out to me in the comments that I misinterpreted the question. What the asker is actually after is a variety cut out by $m$ equations which has irreducible components of all codimensions $1,2,...,m$.
Let $\{s_1,s_2,\cdots,s_m\}$ be $m$ distinct elements of the field $k$. Let $f_1=\prod_{i=1}^m (x_1-s_i)$. Let $f_2= (x_1-s_1)x_2$, $f_3=(x_1-s_1)(x_1-s_2)x_3$, and similarly let $f_k = x_k \prod_{i=1}^{k-1} (x_1-s_i)$. Then $V(f_1,\cdots,f_m)$ has $m$ irreducible components, one of each appropriate codimension.
Codimension 1 is given by $x_1=s_1$, codimension 2 is given by $x_1=s_2,x_2=0$, codimension 3 is given by $x_1=s_3,x_2=x_3=0$, etc. The same trick from below will solve the problem of the cardinality of the field not being big enough to choose a distinct collection of $s_i$, and we're done.

Old answer to misinterpreted question:
If one is working over an infinite field $k$, one can do it with non-intersecting linear subvarieties. Let $\{s_1,s_2,\cdots,s_m\}$ be $m$ distinct elements of the field $k$, and consider the subvarieties given by $V(x_1-s_1)$, $V(x_1-s_2,x_2)$, $V(x_1-s_3,x_2,x_3),\cdots, V(x_1-s_m,x_2,\cdots,x_m)$.
If one is working over a finite field $\Bbb F_q$ with $m>q$, this technique requires a little adjustment: pick a finite Galois extension of $\Bbb F_q$ so that one may choose an enumeration of $s_i$ as before, but with the additional condition that no two $s_i$ share a minimal polynomial. Replace the $x_1-s_i$ term by $m_{s_i}(x_1)$, the minimal polynomial of $s_i$ with variable $x_1$. This then does the job.
