I am somewhat of a beginner in algebraic geometry and have been working on the following problem from Hartshorne:
Let $Y \subset \mathbb P^n$ be a projective linear variety, that is its ideal $I(Y)$ can be generated by homogeneous polynomials of degree $1$. Then for any $r \in [n]$, $\dim Y = r$ if and only if $I(Y)$ can be minimally generated by $n-r$ homogeneous linear polynomials.
This is how I started: since $Y$ is a projective variety, $I(Y)$ is a prime ideal in the integral domain $S:= k[X_0, \cdots , X_n]$ whence by proposition 1.8A(b) (section I.1), we have
$$\text{ht} I(Y) = \dim S - \dim S(Y) = n+1-r$$
and Krull's Principal Ideal Theorem (in conjunction with the Noetherianity of $S$ via the Hilbert Basis Theorem) shows that the minimal number of generators $\mu(I(Y))$ of the ideal $I(Y)$ satisfies the inequality
$$\mu (I(Y)) \geq \text{ht} I(Y) = n-r+1.$$
On the other hand, what I have to show is that $\mu(I(Y))=n-r$. I do not know where the fallacy in the above argument is and would really appreciate some help regarding the same. It would also be nice to know if this argument shows promise. Thank you.
Note that we actually have $\dim(S(Y))=\dim(Y)+1=r+1$.