TITLE: Why is $ \hbox{Ext}_R^* (M,M) = H^*(\hbox{Hom}_R^*(P^*,P^*))$?
QUESTION [7 upvotes]: Let me first fix some notation and conventions. 
Let $ R$ be a ring and $ M$ a left $R$-module. Given chain complexes $P^*$ and $Q^*$ in $R$-mod, define $ \hbox{Hom}^*_R(P^*,Q^*)$ to be the graded space such that $ \hbox{Hom}_R ^i (P^*, Q^*) = \bigoplus_n \hbox{Hom}_R(P^n, Q^{n-i})$. $\hbox{Hom}^*_R (P^*,Q^*)$ has a differential with degree $+1$. Now let $ P^*$ be a projective resolution of $M$. 

Why is $ \hbox{Ext}^*_R (M,M)= H^* ( \hbox{Hom}_R^* (P^*, P^*))$?

I've seen this result stated in a few places but I dont see why it's true. I think  I could believe that $ \hbox{Ext}^*_R (M,M) = H^* ( \hbox{Hom}_R^*(P^*, M))$. But why is there a projective resolution in the second slot of the Total Hom and not an injective resolution?

REPLY [3 votes]: I want to justify the answer in user52045's comment by a reference: Brown, Cohomology of Groups, Theorem I.8 (8.5) states: 

If $f: C \to D$ is a quasi-isomorphism between arbitrary complexes and $P$ is a non-negative complex of projectives (over an ring $R$), then $Hom^\ast_R(P,f): Hom^\ast_R(P,C)\to Hom^\ast_R(P,D)$ is a quasi-isomorphism. 

Now let $M[0]$ be the complex having $M$ in degree 0 and zero elsewhere. Thus a projective resolution $P \to M$ is a quasi-isomorphism $f:P \to M[0]$ and by the theorem above: 
$$H^\ast Hom^\ast_R(P,P) \cong H^\ast Hom^\ast_R(P,M[0]) = H^\ast Hom_R(P,M)=Ext^\ast_R(M,M)$$