Trace in Terms of Orthonormal Basis

Theorem
Let $\mathbb K \subset \C$ be a field.

Let $\left({V, \left\langle{\, \cdot \,}\right\rangle}\right)$ be an inner product space over $\mathbb K$ of dimension $n$.

Let $\left({e_1, \ldots, e_n}\right)$ be an orthonormal basis of $V$.

Let $f: V \to V$ be a linear operator.

Then its trace equals:
 * $\operatorname{tr} \left({f}\right) = \displaystyle \sum_{i \mathop = 1}^n \left\langle{f \left({e_i}\right), e_i}\right\rangle$

Proof
Let $\displaystyle f(e_i) = \sum_{j \mathop = 1}^n c_{ij} e_j$

Let $A$ be the matrix relative to the basis $\left({e_1, \ldots, e_n}\right)$.

Then by the above assumption, $A_{ij} = c_{ij}$.

Then:

Now it remains to show that $c_{ii} = \left\langle{f \left({e_i}\right), e_i}\right\rangle$ :

Also see

 * Trace in Terms of Dual Basis