What is the convention for the codimension of an empty set? I am learning about dimension and codimension of algebraic sets at the moment. I know that if $V \subseteq \mathbb{C}^n$ is an algebraic set defined by polynomials $f_1, ..., f_r \in \mathbb{C}[x_1, ..., x_n]$, then the dimension of $V$ equals the Krull dimension of $\mathbb{C}[x_1, ..., x_n] / (f_1, ..., f_r)$.
I was wondering what is the convention for the codimension of an empty set.
Could some one please clarify this for me?
Thank you very much!
 A: The empty set is not always assigned a co-dimension, but if it has to be done, $\infty$ makes sense. For instance if $X$ and $Y$ intersect nicely you'd expect the codimension of their intersections to add up. Since the intersection of anything with the empty set is the empty set, $\infty$ would work because $\infty + k = \infty$. 
See for instance, these notes of Ravi Vakil, where he assigns dimension $-\infty$ to $\emptyset$.
See also the stacks project where the Krull dimension is unusually defined so as to imply $\dim \emptyset = - \infty$.
A: The problem is that the ring of functions on the empty set is the zero ring, and it's unclear what the Krull dimension of the zero ring should be since it has no prime ideals (it's the only commutative ring with this property), so the supremum you're taking to define the Krull dimension is a supremum over the empty set. 
One plausible value to assign this is $-\infty$, as Prometheus says; this is a convention which has various nice properties. For example, defining the dimension of the empty set in this way preserves the property that 
$$\dim(X \times Y) = \dim X + \dim Y.$$
