Why is $\mathcal{M}(k)$ given by this? (Ward Identity derivation in Peskin & Schroeder) In page 160 of Peskin & Schroeder we are considering an amplitude $\mathcal{M}(k)$ with an external photon as given in equation (5.77)
$$
\sum_{\epsilon}|\epsilon_\mu^*(k)\mathcal{M}^\mu(k)|^2=|\mathcal{M}^1(k)|^2+|\mathcal{M}^2(k)|^2.\tag{5.77}
$$
Then we recall that external photons are given by the term $\int{d^4x}ej^\mu A_\mu$ and hence $\mathcal{M}^\mu(k)$ is given by
$$
\mathcal{M}^\mu(k)=\int{d^4x e^{ikx}\langle f|\bar{\psi}(x)\gamma^\mu\psi(x)|i\rangle}.\tag{5.78}
$$
I don't understand how we come to this conclusion.
 A: It is due to the simplest application of relativistic perturbation theory.
The S-matrix is defined with $H_I$ as interaction Hamiltonian
$$S= T\exp\left(-i \int_{-\infty}^\infty \hat{H_I} dt \right)$$
where the symbol T stands for time ordering to be applied to the development of the exponential in a power series. But as we will only deal with 1. order of perturbation theory here, the time ordering does not come into effect. So the S-matrix is up to first order:
$$ S = id - i\int_{-\infty}^\infty \hat{H_I} dt$$
Now in QED the interaction operator is just the volume  integral  of the  electron current $j^\mu$ and the electromagnetic 4-potential  operator $\hat{A}_\mu$
$$ \hat{H_I} = \int d^3x e \hat{j}^\mu  \hat{A}_\mu$$
so plugging this into the precedent expression gives:
$$S = id - i \int d^4x e \hat{j}^\mu  \hat{A}_\mu$$
Now we only need to plug in the electromagnetic potential operator into the last expression ($c$ and $c^\dagger$ are the annihilation and creation operators of photons):
$$\hat{A}_\mu = \sum_{\epsilon=1,2}\sum_p [c_{pe} \epsilon_\mu e^{-ipx}  + c^\dagger_{pe} \epsilon^\ast_\mu e^{ipx}   ]$$
$\epsilon_\mu$ are components of the polarisation vector of the photon.
Considering an emission of a photon means that in the final state the is an additional photon with 4-momentum k, we take the matrix element of the S-matrix $\langle 1_k f| S| 0i\rangle $. Here $1_k$ means a final state with 1 photon of 4-momentum k and a transition of the participating electron from initial state $i$ to final state $f$ (note that the corresponding matrix element $\langle 1|c_{pe}|0\rangle =0$):
$$\langle 1_k f|S| 0i\rangle  = \langle 1_k f| 0i\rangle - i \int d^4x e \langle f|j^\mu|i\rangle \sum_{\epsilon=1,2}\sum_p \langle 1_k| c^\dagger_{pe}| 0\rangle \epsilon^\ast_\mu e^{ipx} =  - i\int d^4x \sum_{\epsilon=1,2} e \langle f|\bar{\psi}\gamma^\mu \psi|i\rangle e^{ikx} \epsilon^\ast_\mu$$
by using    $$\langle 1_k| c^\ast_{pe}| 0\rangle =\delta_{pk}$$ and the orthogonality of Fock states ($\langle 1| 0\rangle =0$)
By defining $$\cal{M}^\mu(k) = \int d^4x \sum_{\epsilon=1,2}\langle f|\bar{\psi}\gamma^\mu \psi|i\rangle e^{ikx} $$
we get:
$$\langle 1_k f|S| 0i\rangle  = -i e\sum_{\epsilon=1,2}\epsilon^\ast_\mu \cal{M}^\mu(k)$$
so the S-matrix element between a transition of an electron state $i$ to and electron state $f$ and an emitted photon of the 4-momentum k and polarisation state $\epsilon$  is given as above indicated.
Finally if we consider the transition probability we would take the modulus of the $S$-matrix element:
$$| \langle 1_k f|S| 0i\rangle |^2 =e^2 \sum_{\epsilon=1,2}|\epsilon^\ast_\mu \cal{M}^\mu(k)|^2$$
because the mixed term cancels out due the orthogonality of the polarisation states. Well, we get an additional $e^2$, but actually for the derivation flow, I guess, it does not matter.
Important remark: the emission of a single real photon is actually not possible for free electrons (only possible for bound electrons), so we have to imagine the states $i$ and $f$ of the participating electron as bound.
