# Dimension of the product of affine schemes

Let $X=\mbox{Spec}A$ and $Y=\mbox{Spec}B$ be two affine schemes such that $A$ and $B$ are domains and finitely generated as $\mathbb{Z}$-algebras, and contain $\mathbb{Z}$. Consider their product over $\mathbb{Z}$: $X\times_\mathbb{Z} Y=\mbox{Spec}(A\otimes_\mathbb{Z}B)$. I want to show that $\mbox{dim}X\times_\mathbb{Z}Y=\mbox{dim}X+\mbox{dim}Y-\mbox{dim}\mathbb{Z}=\mbox{dim}X+\mbox{dim}Y-1$.

Now, this is obviously the case when $A=\mathbb{Z}[x_1,\ldots,x_m]$ and $B=\mathbb{Z}[y_1,\ldots,y_n]$, since in this case $A\otimes B=\mathbb{Z}[x_1,\ldots,x_m,y_1,\ldots,y_n]$, and has dimension $m+n+1=(m+1)+(n+1)-1$.

In the general case, we have that $A=\mathbb{Z}[t_1,\ldots,t_m]$ and $B=\mathbb{Z}[s_1,\ldots,s_n]$, where the $t_i$'s and $s_i$'s satisfy certain relations. Moreover we see that $A\otimes B=\mathbb{Z}[t_1,\ldots,t_m,s_1,\ldots,s_n]$.

I can't seem to figure out how to find the dimension of this ring based on the dimensions of $A$ and $B$; am I missing some trivial observation?

-
I think you should exploit the fact that $X$ and $Y$ are flat over $\mathbb{Z}$ and the theorem about the dimension of the fibres. – Andrea Apr 10 '12 at 15:34
Yeah, I know it works with dimension theory on fibers, I was just hoping for a more elementary proof. Thanks! – rfauffar Apr 10 '12 at 18:41
This may not be what you're looking for, but over a field you should be able to calculate the dimension by Noether's normalization lemma. I don't know if we can finesse this over $\Bbb Z.$ – Andrew Sep 16 '12 at 23:23