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$

Also see

 * Trace in Terms of Dual Basis