I'm trying to understand this proof (lemma 9.20.5, which is based on lemma 9.20.4). But I don't understand the proof of lemma 9.20.4. It involves $\text{Tr}_K(\varphi : V \to V)$. The definition for $\text{Tr}_K$ is given initially, but I don't understand how it works for linear transformations on $L$-vector spaces. If we have such a transformation, won't a matrix associated with it have entries in $L$? If so, what is the meaning of $\text{Tr}_K$ of a matrix with entries which are not in $K$?
I thought of it reducing this matrix mod K, but if we have the base $l_1 = 1_K, \dots, l_m$ ($m \geq 2$) of $L/K$, the base $v_1, \dots, v_n$ ($n \geq 2$) of $V$ and the linear transformation $\varphi(a_1 v_1 + \dots + a_n v_n) = (a_1 + a_1)v_1 + a_2 v_2, \forall a_i \in L$ for example, what should $\text{Tr}_K(\varphi : V \to V)$ evaluate to? If I'm not mistaken, the RHS evaluates to $\text{Tr}_{L/K}(\text{Tr}_L(\varphi : V \to V)) = \text{Tr}_{L/K}((a_1+a_1)+a_2) = (1_K + 1_K)\text{Tr}_{L/K}(a_1) + \text{Tr}_{L/K}(a_2)$ and to finish we just get the matrices with entries in $K$ of the transformations $x \to a_1 x$ and $x \to a_2 x$. This doesn't seem to be euqal to LHS with this interpretation of reducing mod K, so it is probably wrong. So what's the correct meaning for $\text{Tr}_K(\varphi : V \to V)$?
You have fields $K\leq L\leq M$.
Any $L$-linear tranformation is also a $K$-linear transformation (by restriction of scalars). Multiplication by $\alpha\in M$ is an $L$-linear transformation: for all $x,y\in M$ and $r\in L$, $$\begin{align*} \alpha(x+y) &= \alpha x + \alpha y\\ \alpha(rx) &= r(\alpha x). \end{align*}$$ In particular, this is also $K$-linear.
So you have this map $\varphi\colon M\to M$. If you view it as a $K$-linear transformation, then you can calculate $\mathrm{Tr}_{M/K}(\alpha)$, which will be an element of $K$.
Or you can view it as an $L$-linear transformation, and calculation $\mathrm{Tr}_{M/L}(\alpha)$. This will give you an element $\beta\in L$. Now you have $\beta\colon L\to L$, multiplication by $\beta$ in $L$. This is a $K$-linear transformation, so you can compute $\mathrm{Tr}_{L/K}(\beta)$. This will be an element of $K$.
The equality in question says that $\mathrm{Tr}_{L/K}(\beta) = \mathrm{Tr}_{M/K}(\alpha)$. That is, that $$\mathrm{Tr}_{M/K}(\alpha) = \mathrm{Tr}_{L/K}(\mathrm{Tr}_{M/L}(\alpha)).$$ At no point are you taking $\mathrm{Tr}_K$ of a matrix with entries in $L$.
Here's an example: consider $K=\mathbb{Q}$, $L=\mathbb{Q}(\sqrt{2})$, $M=\mathbb{Q}(\sqrt{2},\sqrt{3})$. Let $B_1=[1,\sqrt{2}]$ be a basis for $L$ over $K$; let $B_2=[1,\sqrt{3}]$ be a basis for $M$ over $L$. And let $B_3=[1,\sqrt{2},\sqrt{3},\sqrt{6}]$ be a basis for $M$ over $K$. Let $\alpha=1+\sqrt{6}$.
To compute $\mathrm{Tr}_{M/K}(\alpha)$, we consider the linear transformation "multiplication by $\alpha$ on $M$", relative to basis $B_3$. The effect is: $$\begin{align*} 1 &\longmapsto 1+\sqrt{6}\\ \sqrt{2}&\longmapsto \sqrt{2}+\sqrt{12} = \sqrt{2}+2\sqrt{3}\\ \sqrt{3}&\longmapsto \sqrt{3}+\sqrt{18}=3\sqrt{2}+\sqrt{3}\\ \sqrt{6} &\longmapsto \sqrt{6}+6. \end{align*}$$ The corresponding matrix is $$\left(\begin{array}{cccc} 1 & 0 & 0 & 6\\ 0 & 1 & 3 & 0\\ 0 & 2 & 1 & 0\\ 1 & 0 & 0 & 1 \end{array}\right).$$ So $\mathrm{Tr}_{M/L}(1+\sqrt{6}) = 4$.
Now consider this as a transformation over $L$; relative to basis $B_2$, we have: $$\begin{align*} 1 &\mapsto 1+\sqrt{6} = 1 +\sqrt{2}\sqrt{3}\\ \sqrt{3}&\mapsto 3\sqrt{2}+\sqrt{3} \end{align*}$$ The corresponding matrix with entries in $L$ is $$\left(\begin{array}{cc} 1 & 3\sqrt{2}\\ \sqrt{2} & 1 \end{array}\right).$$ So $\mathrm{Tr}_{M/L}(1+\sqrt{6}) = 2$. Now we consider "multiplication by $2$" as a $K$-linear transformation $L\to L$. Relative to basis $B_1$, we have: $$\begin{align*} 1 &\mapsto 2\\ \sqrt{2} & \mapsto 2\sqrt{2} \end{align*}$$ so the corresponding matrix is $$\left(\begin{array}{cc} 2 & 0\\ 0 & 2 \end{array}\right).$$ Thus, $\mathrm{Tr}_{L/K}(2) = 4$.
Hence, we have $$\mathrm{Tr}_{L/K}(\mathrm{Tr}_{M/L}(1+\sqrt{6})) = \mathrm{Tr}_{L/K}(2) = 4 = \mathrm{Tr}_{M/K}(1+\sqrt{6}),$$ as expected.