TITLE: Finite Projective Dimension implies non vanishing Ext
QUESTION [6 upvotes]: Suppose the projective dimension of a module $M$ is $n < \infty$. Does there exist a free $R$-module $F$ such that $\operatorname{Ext}^n(M, F) \not = 0$?
Can't we write the free module as a direct sum of $R$'s and then we just need to show $\operatorname{Ext}^n(M, R) \not = 0$? So does this work actually for any free module?

REPLY [4 votes]: If you ask the question

if $M$ is an $R$-module of projective dimension $n$, is $\operatorname{Ext}^n(M,R)\neq0$?

then the answer is surpring: it depends. When $R=\mathbb Z$, this is essentially known as Whitehead's problem and Shelah proved that its answer depends on the specific set theory that you choose. Indeed, he showed that depending on the background set theory, there exist abelian groups $M$ which are not free (so that their projective dimension is $1$) such that $\operatorname{Ext}^1(M,\mathbb Z)=0$, or not.
$$\bullet\bullet\bullet$$
For the original question in which you look just for a free module:
Suppose the projective resolution of $M$ ends with $$\cdots\leftarrow P_{n-1}\xleftarrow{\hskip2ex d\hskip2ex }P_n\leftarrow 0$$ and suppose $P_n$ is a direct summand of the free module $F$. Applying the functor $\hom(\mathord-,F)$ we get a complex ending with $$\cdots\to\hom(P_{n-1},F)\xrightarrow{\hskip2ex d^*\hskip2ex }\hom(P_n,F)\to0$$ $\operatorname{Ext}^1(M,F)$ is the cokernel of the map $d$. To show it is not zero, it is enough to show that $d$ is not surjective. 
Now let $i:P_n\to F$ be the inclusion and let $j:F\to P_n$ be a retraction of $i$, so that $ji=1_{P_n}$. The element $i\in\hom(P_n,F)$ is not in the image of $d$. Otherwise we'd have a map $r:P_{n-1}\to F$ such that $rd=i$, so composing with $j$ we'd have $jrd=ji=1_{P_n}$. It follows that $jr:P_{n-1}\to P_n$ is a retraction for the map $d$. This is impossible, because the projective dimension of $M$ is exactly $n$.