# Quantum field theory why is it a trace?

So in Peskin and Schoreder, when computing the amplitude of $e^+e^-\rightarrow\mu^+\mu^-$, summing up over spin they write

\begin{align}\sum_{s,s'}\bar{v}^{s'}_a(p_2)\gamma^\mu_{ab}u^s_b(p_1)\bar{u}^{s}_c(p_1)\gamma^\nu_{cd}v^s_d(p_2) & =(\not{p}_2-m)_{da}\gamma^\mu_{ab}(\not{p}_1+m)_{bc}\gamma_{cd}^\nu\\ &= \textrm{tr}[(\not{p}_2-m)\gamma^\mu(\not{p}_1+m)\gamma^\nu] \end{align}

Why is that a trace?

As I understand that $a$, $b$, $c$, $d$ indexes are the matrix indexes and this is the combination to make a trace. Can someone please clarify, I can't find the answer anywhere.

An $A_{ab}B_{bc}$ yields a $C_{ac}$. Contracting all indices, but the outer ones of your expression yields a $[(\not{p}_2-m)\gamma^\mu(\not{p}_1+m)\gamma^\nu]_{dd}$. Now executing the $dd$ contraction is just the trace.
\begin{align}\sum_{s,s'}\bar{v}^{s'}_a(p_2)\gamma^\mu_{ab}u^s_b(p_1)\bar{u}^{s}_c(p_1)\gamma^\nu_{cd}v^s_d(p_2) & =(\not{p}_2-m)_{da}\gamma^\mu_{ab}(\not{p}_1+m)_{bc}\gamma_{cd}^\nu\\ &= \textrm{tr}[(\not{p}_2-m)\gamma^\mu(\not{p}_1+m)\gamma^\nu] \end{align}
$\bar{v}$ is a 1 X 4 matrix, $\gamma$ is a 4 X 4 matrix and $u$ is a 4 X 1 matrix. The product of these three matrices in this order is a 1 X 1 matrix. But the trace of a 1 X 1 matrix is equal to the matrix element itself! And because of the property of the trace, tr$(A*B*C)$ = tr$(C*A*B)$ = tr$(B*C*A)$. The same reasoning applies to the next three terms.