product of equidimensional varieties is equidimensional? My question:  If $X, Y$ are equidimensional varieties, is $X\times Y$ also equidimensional? (you can even assume affine)  And isn't that required in the argument below?
Context:
An exercise in Ravi Vakil's notes asks to prove that for $X,Y$ equidimensional closed subvarieties of $\mathbb{A}^d_k$, the codimension of any component of $X\cap Y$ in $\mathbb{A}^d_k$ is at most the sum of the codimensions of $X$ and $Y$.  It suggests to do this by first identifying $X\cap Y$ with $$\Delta \cap (X\times Y)\subset \mathbb{A}^d_k\times \mathbb{A}^d_k,$$ where $\Delta$ is the diagonal of $\mathbb{A}^d_k$. $\Delta$ is cut out of $\mathbb{A}^d_k\times \mathbb{A}^d_k$ by $d$ linear equations, and so we can then use Krull's principal ideal theorem, adding one such equation at a time to the ideal of $X\times Y$, to show that the dimension of $\Delta \cap X\times Y$ is not smaller than $$dim(X\times Y)-d= dim(X)+dim(Y)-d,$$ which gives the desired result.
This all sounds plausible except for one point:  it seems like I require that $X\times Y$ is equidimensional when I do the dimension computation at the end when I add the equations that cut out $\Delta$ to the ideal of $X\times Y$.
 A: I am very late to the party, but I want to post a different solution because I don't think @Alex Youcis' answer is correct (please do correct me if I'm wrong), and many related posts with the same question are redirected here. The products $U \times V$ of affine open subsets of $X$ and $Y$ do not form a basis for $X \times Y$, because $X \times Y$ does not have the product topology. We can only guarantee $U \times V$ to be an affine cover of $X \times Y$, and this is not enough; at most, you have that each $\dim(U \times V) = m + n$, but you need to show that each $\dim(U \times V)$ is pure dimensional of dimension $m + n$ for the proof to work. [Edit: perhaps this is a question of differing definitions for "equidimensional." Vakil defines a scheme to be of pure dimension $n$ if and only if all its irreducible components have dimension exactly $n$.]
At this point in Vakil, you have already shown that for $X, Y$ integral (can be weakened to just irreducible) finite-type $k$-schemes of dimensions $m, n$, $X \times_k Y$ is of dimension $m + n$. We have also already shown that if $K/k$ is an algebraic field extension and $X$ is any $k$-scheme, then $X \times_k K$ has pure dimension $m$ if and only if $X$ has pure dimension $m$.
If $X, Y$ are equidimensional $k$-varieties of dimensions $m, n$, then every affine open subset of $X, Y$ also has pure dimensions $m, n$, respectively. Since dimension can be computed locally for locally finite type $k$-schemes, it suffices to prove that $X \times_k Y$ is of pure dimension $m + n$ in the case that $X, Y$ are affine. Furthermore, if $\overline{k}$ is an algebraic closure of $k$, then $X \times_k \overline{k}$ and $Y \times_k \overline{k}$ are also of pure dimension $m, n$, and in addition $(X \times_k Y) \times_k \overline{k} \cong (X \times_k \overline{k}) \times_\overline{k} (Y \times_k \overline{k})$, so it suffices to prove the theorem in the case that $k = \overline{k}$.
Let $X_i, Y_j$ be the irreducible components of $X, Y$. Each $X_i \times_k Y_j$ is an irreducible subvariety (products of irreducible varieties over an algebraically closed field are again irreducible) of $X \times Y$, and furthermore, the $X_i \times_k Y_j$ cover $X \times Y$, since they contain all the $k$-valued points of $X \times Y$, which are just the closed points. Thus, $X \times Y$ admits a cover by irreducible subspaces of dimension $m + n$, which implies $X \times Y$ is of pure dimension $m + n$; every irreducible component contains one of the $X_i \times Y_j$, so its dimension is $\geq m + n$, and its dimension has to be $\leq m + n$ since $\dim(X \times Y) = \max{\bigcup_{i, j} X_i \times Y_j}$.
