Projective dimension of zero module Is there any consensus on what the projective dimension of the zero module should be? Here are three statements one commonly encounters in textbooks, sometimes with or without the condition $M\neq 0$:
(1) $\mbox{pd}(M)\leq n$ iff $\mbox{Ext}^{n+1}(M,-)=0$
(2) $\mbox{pd}(M)=0$ iff $M$ is projective
(3) $\mbox{grade}(M):=\infty$ if $M=0$
If one attempts to define $\mbox{pd}((0))$ by extending one of these results, (1), (2), (3) suggest $\mbox{pd}=-1, 0, \infty$, respectively.
 A: Let me explain a definition of projective dimension which gives the same result as the one given by Sándor Kovács, but without any restriction on the ring or the module we are talking about. This is, by the way, the one chosen by Bourbaki (A.X.8.1).
Let $A$ be a ring.
0) We write $\overline{\mathbb{Z}}=\mathbb{Z}\cup\{-\infty,\infty\}$ and furnish $\overline{\mathbb{Z}}$ with the ordering that extends the canonical ordering on $\mathbb{Z}$ and has $\infty$ as greatest and $-\infty$ as smallest element. We convene that suprema and infima of subsets of subsets of $\overline{\mathbb{Z}}$ are always understood to be taken in $\overline{\mathbb{Z}}$.
1) If $C$ is a complex of $A$-modules and $C_n$ denotes its component of degree $n\in\mathbb{Z}$, then we set $$b_d(C)=\inf\{n\in\mathbb{Z}\mid C_n\neq 0\}$$ and $$b_g(C)=\sup\{n\in\mathbb{Z}\mid C_n\neq 0\},$$ and we call $$l(C)=b_g(C)-b_d(C)$$ the length of $C$. Note that if $C$ is the zero complex then we have $b_d(C)=\infty$ and $b_g(C)=-\infty$, hence $l(C)=-\infty$.
2) If $M$ is an $A$-module and $(P,p)$ is a left resolution of $M$, then the length $l(P)$ of the complex $P$ is called the length of $(P,p)$. Note that if $P$ is the zero complex (which may be the case if and only if $M=0$) then the length of $(P,p)$ is $-\infty$.
3) If $M$ be an $A$-module, then the infimum of the lengths of all projective resolutions of $M$ is called the projective dimension of $M$. Hence, if $M=0$ then we have a projective resolution of length $-\infty$, and thus the projective dimension of $M$ is also $-\infty$. Conversely, if $M$ has projective dimension $-\infty$ then - since every $A$-module has a projective resolution - it necessarily has a projective resolution of length $-\infty$, and thus it follows $M=0$.
Note: This clearly makes sense in every abelian category with enough projectives, and there are obvious variants of the above that yield analogous definitions of injective or flat dimensions.
A: I came online to ask this question myself, as it came up today during a reading course on 
homological algebra.
According to my professor, the zero module, even though it is trivially projective (as a trivial direct summand of any free module), does not have projective dimension 0, but rather $-\infty$. I cannot remember the precise reasoning he used. I believe it had something to do with the supremum of the empty set equaling negative infinity, although I don't remember how an empty set even came into the picture.
The issue had come up from one of his papers in which a theorem he stated would turn out to be false for the zero module, as a reader pointed out. He responded that the theorem held only for modules of finite projective dimension and as such the zero module would be excluded.
I also recognize that this question is over 2 years old, but for what it's worth, we have another candidate for the projective dimension of the zero module.
And while I personally despise treating trivial cases, I acknowledge that a really good definition should always be able to account for them, making this question somewhat worthwhile?
A: Although I agree that one can easily decide to not worry about the case of the zero module, but as ashpool points out, it happens that sometimes we end up with the zero module whether we want or not and then each time we need to say (using ashpool's example) if $M/aM\neq 0$, then bluh and if $M/aM=0$ than something else happens.
So, I think there is actually something to be gained from making a definition that makes sense for the zero module (or the zero object in a more general situation). Of course, sometimes the  definition that makes one (in)equality work does not work for another. However, one could still say in a paper (less likely in a book I suppose) that we are using the following definition for whatever which is the usual one if the object is not zero and gives this or that when it is zero and makes the following inequality work.
So having philosophized about this let me give a definition of projective dimension that gives $-\infty$ for the zero module. 

Definition Let $(R,\mathfrak m,k)$ be a noetherian local ring and $M$ a finite $R$-module. Define the projective dimension of $M$ as
  $$
\mathrm{proj\, dim}_R M:=\sup \left\{ i\in \mathbb{Z} \ \vert \ \mathrm{Ext}_R^i (M,k)\neq 0 \right\}, 
$$
  where $\sup$ is taken in $\mathbb{Z}\cup\{\pm\,\infty\}$.

This is actually essentially ashpool's definition (1), except that for $M=0$ it takes the $\sup$ of the empty set. (This may have been what samantha's professor told her). It also makes the change of rings formula to work. 
In fact, I would argue that this is the "right" definition anyway, because the point is those Ext groups that are non-zero, not those that are.
Regarding adding the $\{\pm\,\infty\}$ possibilities: We definitely need to allow $+\infty$, so it makes sense to allow $-\infty$ as well, especially because we need it for $M=0$. 
Comment Of course one can start wondering what to do with non-local and/or non-noetherian rings, but I will leave that meditation to the reader.
