Or equivalently, if $G$ is a group, do the projective and injective dimension of $Z$ (viewed as a $ZG$module) agree?
Thanks!
Or equivalently, if $G$ is a group, do the projective and injective dimension of $Z$ (viewed as a $ZG$module) agree? Thanks! 


The cohomological and homological dimension of a group do not agree in general. For example, the homological dimension of the group $Z[\frac{1}{2}]$ is one, while its cohomological dimension is 2. However, if G is countable, then cohomological dimension is either equal to the homological dimension or one dimension greater. Also , cohomological dimension of a group is defined by the highest dimension n such that $H^n(G,M)$ is nonzero, where M is a Gmodule. It is important to use a Gmodule instead of the usual cofficient. For example, the cohomological dimension for any nontrivial knot group is 2, while its cohomology with $Z$ cofficient, or any Gmodule with trivial group action is always the same as the cohomology of $S^1$. 


So, Simon Wadsley’s comment clearly answers this question but a hypothetical future user will not have his/her eye drawn to that answer. That’s why I’m posting this, which is all Simon’s idea, in the hope that the OP will come back on at some point and accept this answer (thus preventing this problem from being bumped up to the frontpage by the Mathoverflowbot). If the OP is reading this, please click the check mark next to this box so it'll count as being answered. I'm giving a CW answer so I don't get rep (in line with the recommended procedure on meta) The homological and cohomological dimensions of a group do NOT have to agree. As you point out, if they did agree then the projective and injective dimensions of $\mathbb{Z}$ as a $\mathbb{Z}[G]$ module would agree (this is basically just the definition of Ext). An example that this could fail, take $G$ to be the trivial group. Then the projective dimension of $\mathbb{Z}$ as a $\mathbb{Z}$module is zero because any ring is projective over itself. But the injective dimension is not zero because $\mathbb{Z}$ is not a divisible abelian group. Indeed, the injective dimension is 1, as can be seen from the fact that $\mathbb{Z}$ is a PID and hence has global dimension 1. Or you can just write down an injective resolution. Or you can read DummitFoote for their treatment. 


I like to think of group (co)homology topologically, so I would say the integral (co)homological dimension of G is the integral (co)homological dimension of BG. Thinking this way there are lots of geometric examples in which the integral homological dimension is less than the integral cohomological dimension: for example, nonorientable surfaces are classifying spaces for their fundamental groups. Their integral homological dimension is 1, and their integral cohomological dimension is 2. Of course for other coefficient systems, this will no longer be the case (as Tom points out in his comment below). Note, for example, that the rational cohomological dimension of a nonorientable surface is 1. [Okay, I'm going to admit some confusion in regards to the comments on the original question. Am I thinking of the flat or the injective dimension here, when I take homology of BG? From the comments, it sounds like this must correspond to the flat dimension? I don't have Brown's book in front of me to unconfuse myself...] 

