[proofplan]
Choose an ordered basis of $V$ and write the matrices of $S$ and $T$ in that basis. The commutator then has matrix $AB - BA$, so its trace is the sum of the diagonal entries of $AB - BA$. Expanding the diagonal entries as finite sums shows that the two double sums are the same after swapping the dummy indices, hence their difference is zero.
[/proofplan]
[step:Represent the commutator by the matrix $AB - BA$]
Let $n := \dim_k V$. Choose an ordered basis $\mathcal{E} = (e_1,\dots,e_n)$ of $V$; if $n = 0$, this is the empty basis and all sums below are empty. Let $A = (a_{ij})_{1 \le i,j \le n} \in k^{n \times n}$ be the matrix of $S$ in the basis $\mathcal{E}$, and let $B = (b_{ij})_{1 \le i,j \le n} \in k^{n \times n}$ be the matrix of $T$ in the same basis. Thus, for each $j \in \{1,\dots,n\}$,
\begin{align*}
S(e_j) = \sum_{i=1}^{n} a_{ij} e_i.
\end{align*}
Also,
\begin{align*}
T(e_j) = \sum_{i=1}^{n} b_{ij} e_i.
\end{align*}
By the definition of matrix multiplication for composition of linear maps, the matrix of $S \circ T$ in the basis $\mathcal{E}$ is $AB$, and the matrix of $T \circ S$ in the basis $\mathcal{E}$ is $BA$. Since $[S,T] = S \circ T - T \circ S$, the matrix of $[S,T]$ in the basis $\mathcal{E}$ is
\begin{align*}
C := AB - BA.
\end{align*}
Therefore, by the definition of trace of a [linear map](/page/Linear%20Map) through any representing matrix,
\begin{align*}
\operatorname{tr}([S,T]) = \operatorname{tr}(C).
\end{align*}
[guided]
We choose a basis because trace is computed from the diagonal of a matrix representative. Let $n := \dim_k V$, and choose an ordered basis $\mathcal{E} = (e_1,\dots,e_n)$ of $V$. If $n = 0$, then $\mathcal{E}$ is empty and every finite sum over $\{1,\dots,n\}$ is an empty sum, equal to $0$.
Define $A = (a_{ij})_{1 \le i,j \le n} \in k^{n \times n}$ to be the matrix of the linear map $S: V \to V$ in the basis $\mathcal{E}$. This means that, for each basis vector $e_j$,
\begin{align*}
S(e_j) = \sum_{i=1}^{n} a_{ij} e_i.
\end{align*}
Define $B = (b_{ij})_{1 \le i,j \le n} \in k^{n \times n}$ to be the matrix of the linear map $T: V \to V$ in the same basis. Thus, for each $j \in \{1,\dots,n\}$,
\begin{align*}
T(e_j) = \sum_{i=1}^{n} b_{ij} e_i.
\end{align*}
The reason for using the same basis for both maps is that composition of linear maps is then represented by matrix multiplication. Let $v \in k^n$ be an arbitrary coordinate vector. In this basis, $S \circ T$ is represented by $AB$, because applying $T$ first gives the coordinate vector $Bv$, and applying $S$ next gives $A(Bv) = (AB)v$. Similarly, $T \circ S$ is represented by $BA$.
The commutator is defined by
\begin{align*}
[S,T] := S \circ T - T \circ S.
\end{align*}
Therefore the matrix of $[S,T]$ in the basis $\mathcal{E}$ is
\begin{align*}
C := AB - BA.
\end{align*}
Finally, the trace of a linear map on a finite-dimensional [vector space](/page/Vector%20Space) is the trace of any matrix representing it in an ordered basis. Hence
\begin{align*}
\operatorname{tr}([S,T]) = \operatorname{tr}(C).
\end{align*}
[/guided]
[/step]
[step:Expand the diagonal entries and cancel the two finite double sums]
For each $i \in \{1,\dots,n\}$, the $i$-th diagonal entry of $C = AB - BA$ is
\begin{align*}
C_{ii} = \sum_{j=1}^{n} a_{ij}b_{ji} - \sum_{j=1}^{n} b_{ij}a_{ji}.
\end{align*}
Thus
\begin{align*}
\operatorname{tr}(C) = \sum_{i=1}^{n}\sum_{j=1}^{n} a_{ij}b_{ji} - \sum_{i=1}^{n}\sum_{j=1}^{n} b_{ij}a_{ji}.
\end{align*}
In the second finite double sum, rename the dummy indices $i$ and $j$. Since multiplication in the field $k$ is commutative, this gives
\begin{align*}
\sum_{i=1}^{n}\sum_{j=1}^{n} b_{ij}a_{ji} = \sum_{i=1}^{n}\sum_{j=1}^{n} b_{ji}a_{ij} = \sum_{i=1}^{n}\sum_{j=1}^{n} a_{ij}b_{ji}.
\end{align*}
Therefore
\begin{align*}
\operatorname{tr}(C) = 0.
\end{align*}
[/step]
[step:Conclude that the trace of the commutator vanishes]
From the first step, $\operatorname{tr}([S,T]) = \operatorname{tr}(C)$. From the second step, $\operatorname{tr}(C) = 0$. Hence
\begin{align*}
\operatorname{tr}([S,T]) = 0.
\end{align*}
This proves the theorem.
[/step]