Hartshorne Exercise 2.6. This might sound dumb to many people, but if I were to blindly try and carbon-copy the proof of Proposition 1.7 in Hartshorne to Exercise 2.6 where would I go wrong? Basically, I don't see where exactly that proof is failing?
$\bf{Propositon 1.7}$ If $Y$ is an affine algebraic set, then the dimension of $Y$ is equal to the dimension of its affine coordinate ring $A(Y).$
$\bf{Proof.}$ If $Y$ is an affine algebraic set in $\mathbb{A}^n$, then the closed irreducible subsets of $Y$ correspond to prime ideals of $A=k[x_1,...,x_n]$ containing $I(Y).$ These in turn correspond to prime ideals of $A(Y)$. Hence $\dim Y$ is the length of the longest chain of prime ideals in $A(Y)$, which is it's dimension.
$\bf{Exercise 2.6.}$ If $Y$ is a projective variety with homogeneous coordinate ring $S(Y)$, show that $\dim S(Y)=\dim Y+1.$
Thanks!
 A: The problem is that the closed irreducible subsets of projective space correspond to homogenous prime ideals not containing the irrelevant ideal. 
As a hint for your problem, you know that dimension on a variety can computed affine locally (i.e. if you dehomogenize your definining equations in one coordinate chart, the resulting affine variety has the same dimension as your projective variety). Now, consider how the coordinate ring of the dehomogenization corresponds to the coordinate ring of the full projective variety.
A: Actually, if you follow the proof of affine version, you can only conclude $\dim S(Y)\geq \dim Y$, since for a chain of irreducible closed sets
$$ Z_0 \supsetneq  Z_1 \supsetneq \cdots \supsetneq Z_n$$
You can have corresponding prime ideal chain:
$$ I(Z_0) \subsetneq  I(Z_1) \subsetneq \cdots \subsetneq I(Z_n).$$
However, the converse doesn’t hold, since the definition of dimension of ring doesn’t change, which is just same with the affine case. So for every prime  (not necessarily homogeneous) ideal $\mathfrak p$, we may not have the $Z(\mathfrak p)$ is an algebraic set in $\mathbf P^n$ generally.
