# Evaluation of a trace - how does it depend on the inner product being used?

Let's say that I am looking at the space of matrices $M_{n\times n}(\mathbb{R})$. If I have some linear function $F : M_{n\times n}(\mathbb{R}) \to M_{n\times n}(\mathbb{R})$, then I can take it's "trace" by taking a basis $\{ E_{ab} \}_{a,b=1}^{n} \subset M_{n\times n}(\mathbb{R})$ and evaluating the following: $$\mathrm{Tr}(F) = \sum_{a,b=1}^{n} \left< E_{ab}, F(E_{ab}) \right>\ \ \ =?\ \ \ \sum_{a,b=1}^{n} \mathrm{Tr}\left[ F(E_{ab})^{T}E_{ab}\right]$$

I'm assuming that the inner product on $M_{n\times n}(\mathbb{R})$ I should be using is $\left< A,B \right> = \mathrm{Tr}(B^{T}A)$.

But here's my question: obviously $\left< A,B \right>_{\prime} = \frac{\pi}{1789} \mathrm{Tr}(A^{T}B)$ is a valid inner product as well! But this different choice of inner product would change the value of $\mathrm{Tr}(F)$!

I would have liked to think that $\mathrm{Tr}(F)$ is invariant under the choice of our inner product for some reason...since this is not the case, is the trace of a function like $F$ defined in terms the inner product $\left< A,B \right> = \mathrm{Tr}(B^{T}A)$? What's going on here?

Let's say you have an operator $T \colon V \rightarrow V$ on a finite dimensional vector space over $\mathbb{R}$. Then you can calculate the trace of $T$ in two different ways:
1. Choose some basis $\beta = (v_1,\dots,v_n)$ for $V$. Then $\operatorname{Tr}(T) = \sum_{i=1}^n ([T]_{\beta})_{ii}$ where $[T]_{\beta}$ is the matrix representing $T$ with respect to the basis $\beta$. By choosing a different basis $\beta'$, we will get a different matrix $[T]_{\beta'}$ with possibly different diagonal values but $\sum_{i=1}^n ([T]_{\beta})_{ii} = \sum_{i=1}^n ([T]_{\beta'})_{ii}$.
2. Choose some inner product $\left< \cdot, \cdot \right>$ on $V$ and some orthonormal basis $(v_1,\dots,v_n)$ for $(V,\left< \cdot, \cdot \right>)$. Then $\operatorname{Tr}(T) = \sum_{i=1}^n \left< Tv_i, v_i \right>$. If you change the inner product or the orthonormal basis the summands will change but the sum will be independent of the inner product or the specific orthonormal basis used to calculate the sum (as long as it is orthonormal with respect to the chosen inner product).
In your case, if replace $\left< \cdot, \cdot \right>$ with $\frac{\pi}{1789} \left< \cdot, \cdot \right>$ then a basis $(e_1,\dots,e_n)$ that was orthonormal for $\left< \cdot, \cdot \right>$ will stay orthogonal for the new inner product but not orthonormal. If you modify the basis accordingly (by moving to $e_i' := \sqrt{\frac{1789}{\pi}} e_i$), you'll get the same result.
One way to look at it: is $\{E_{ij}: i,j\in\{1,2,\ldots,n\}\}$ still an orthonormal basis with respect to your new inner product?