Let $K$ be a field, $A$ be a $K$-algebra, and $M$ be a finite generated $A$-module. How do you show that the length of a minimal projective resolution of $M$ is the projective dimension of $M$? (This statement is from Elements of the representation theory of associative algebras. Volume 1 page 426, below the definition of injective dimension.)
5.7. Definition. An exact sequence $$\dots \rightarrow P_m \xrightarrow{h_m} P_{m-1} \rightarrow \dots \rightarrow P_1 \xrightarrow{h_1} P_0 \xrightarrow{h_0} M \rightarrow 0 $$ is called a minimal projective resolution of $M$ if $h_j : P_j \rightarrow \operatorname{Im} h_j$ is a projective cover for all $j \geq 1$ and $h_0$ is a projective cover.
My thought was that given an arbitrary projective resolution $$ 0 \rightarrow Q_n \xrightarrow{q_n} Q_{n-1} \rightarrow \dots \rightarrow Q_1 \xrightarrow{q_1} Q_0 \xrightarrow{q_0} M \rightarrow 0 $$ and a fixed minimal projective resolution $$ 0 \rightarrow P_m \xrightarrow{p_m} P_{m-1} \rightarrow \dots \rightarrow P_1 \xrightarrow{p_1} P_0 \xrightarrow{p_0} M \rightarrow 0, $$ if there exists an epimorphism $g_k: Q_k \rightarrow P_k$ for $k = 0,\dots ,m$, then $Q_k \neq 0$ for each $k$ therefore $m \leq n$, as desired. But I don't know how to prove the existence of $g_k$ when $k \geq 2$.
you only need to prove the following $Let 0\rightarrow Ker q_0\rightarrow Q_0\xrightarrow {q_0}M \rightarrow 0$ be short exact sequence.
let $P_0 \xrightarrow{p_0} M$ be projective cover.then there exists an epimorphism $\alpha :Q_0 \rightarrow P_0$ such that $p_0\alpha =q_0$. ($\alpha $ is epimorphism since $P_0$ is projective cover.)Hence $Ker q_0\cong Ker p_0\coprod P$ for a projective module $P$.So you can get the result.