Let $K$ be a field, $L$ a galois extension of $K$ and $M$ a galois extension of $K$, with $K \subseteq M \subseteq L$. Define the trace of an element $a \in L$ as follows: $$tr_{L/K}(a) := \sum_{\sigma \in Gal(L/K)} \sigma(a).$$ I'm reading a proof of the fact that $\forall a \in M$: $$tr_{L/K}(a) = [L:M]tr_{M/K}(a),$$ and there's one step where I don't understand the reasoing. The proof starts like this: because of the galois correspondence, there exists a group morphism $$\varphi: Gal(L/K) \rightarrow Gal(M/K): \sigma \mapsto \sigma{|_M}.$$ Let $a \in M.$ Then, \begin{eqnarray*} tr_{L/K}(a) &=& \sum_{\sigma \in Gal(L/K)} \sigma(a) = \sum_{\sigma \in Gal(L/K)} \sigma_{|_M}(a) \\ &=&\sum_{\sigma' \in Gal(M/K)} [L:M] \cdot \sigma'(a). \end{eqnarray*} Then, the proof continues. However, I'm having problems with understanding the last step: $\sum_{\sigma \in Gal(L/K)} \sigma_{|_M}(a) =\sum_{\sigma' \in Gal(M/K)} [L:M] \cdot \sigma'(a).$ I searched the internet, but all the other proofs are based on composition maps or other stuff like that and it looks like the writer didn't use that. Can anyone please explain this to me?
As always, any help would be greatly appreciated.