Finite length module and graded local duality In the proof of Theorem 20.18 in Eisenbud Commutative Algebra, the following fact is stated:
If $S=k[X_1,\ldots,X_r]$ and $N$ is a finite length graded $S$-module, then 
$$\operatorname{Ext}_S^r(N,S(-r)) \cong \operatorname{Hom}_k(N,k).$$
It says this follows from Exercise 2.4, but I don't see why...
(I think one needs the fact that if $N$ is of finite length, then $\operatorname{Ext}^j(N,S)=0, \,\, \forall j<r$.)
 A: The isomorphism comes from the local duality theorem for graded modules. The reference from Eisenbud is obviously wrong, but Theorem A4.2 (from the same book) may help. 
In fact, as one can see in the book of Brodmann and Sharp, Local Cohomology, Example 13.4.6, $$^*\operatorname{Hom}_k(H_{\mathfrak{m}}^i(N),k)\cong\ ^*\operatorname{Ext}_S^{r-i}(N,S(-r)),$$
where $\mathfrak{m}=(X_1,\dots,X_r)$ and $N$ a finitely generated graded $S$-module. Now take $i=0$ and get 
$$^*\operatorname{Hom}_k(H_{\mathfrak{m}}^0(N),k)\cong\ ^*\operatorname{Ext}_S^{r}(N,S(-r)).$$
But when $N$ has finite length, $H_{\mathfrak{m}}^0(N)=N$ and therefore 
$$^*\operatorname{Hom}_k(N,k)\cong\ ^*\operatorname{Ext}_S^{r}(N,S(-r)).$$
A: $\def\Ext{\operatorname{Ext}}$To prove your last statement, notice you can prove it by induction on the length of $N$, starting from the computation of $\Ext_S(k,S)$ which you can do trivially by using the Koszul resolution of $k$. (If you know about the Künneth formula for $\Ext$, this can be reduced to the computation of $\Ext_{k[X]}(k,k[X])$, with one variable, as $\Ext_{k[X_1,\dots,X_n]}(k,k[X_1,\dots,X_n])\cong\Ext_{k[X]}(k,k[X])^{\otimes n}$, but really, there is no need to do this, as the computation required is almost immediate)
If $N$ is of length $n>1$, and $0\subsetneq N'\subsetneq N$ is a non-zero proper submodule, we have a short exact sequence $0\to N'\to N\to N/N'\to 0$, and by induction we know that $\Ext^j(N',S)=\Ext^j(N/N',S)=0$ for all $j<r$, so the long exact sequence for Ext gives what the desired conclusion for $\Ext^j(N,S)$.
This is probably the official proof of the fact, I dunno.

To prove your first formula, notice that what we have just shown together with the fact that $\operatorname{gldim}S=r$ implies that $F=\Ext^r(\mathord-,S)$ is an exact functor on the category $\mathcal{A}$ of finite length graded modules, just as $G=\hom_k(\mathord-,k)=\hom_S(\mathord-,k)=\Ext^0_S(\mathord-,k)$ is.
There is a natural map $\Ext^0(M,k)\to \Ext^r(M,S)$ given by Yoneda product with the class of the $r$-extension given by the Koszul complex, which is an element of $\Ext^r(k,S)$. This map is an isomorphism when $M$ is simple, so general nonsense —the Five Lemma, in fact— implies that it is an isomorphism on all of $\mathcal A$.
