I have to express the trace of a product of matrices A and B in terms of traces of individual matrices. I know that $\operatorname{tr}(AB) \neq \operatorname{tr}(A)\operatorname{tr}(B)$, and for the tensor product $\operatorname{tr}(A \otimes B) = \operatorname{tr}(A) \operatorname{tr}(B)$. However, is there a nice function $f(\cdot)$ such that $\operatorname{tr}(AB) = f(\operatorname{tr}(A), \operatorname{tr}(B))$?
Any help will be greatly appreciated.
Regards, H.A.S.
For $n \times n$ matrices, $n \geq 2$, there is not:
Taking $A = B = {\mathbf 0}$ gives $$\text{tr } A = \text{tr } B = \text{tr} (AB) = 0 ,$$ so if there were such a function, it would satisfy $f({\mathbf 0}, {\mathbf 0}) = 0$. On the other hand, if $n = 2$, taking $A = B = \begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix}$ gives $\text{tr } A = \text{tr } B = 0$ but $$\text{tr}(AB) = \text{tr} \begin{pmatrix}1 & 0\\ 0 & 1\end{pmatrix} = 2,$$ so $f({\mathbf 0}, {\mathbf 0}) = 2$, a contradiction.
For $n > 2$, taking a direct sum $A = B = \begin{pmatrix}0 & 1\\ 1 & 0\end{pmatrix} \oplus {\mathbf 0}$ leads to the same contradiction.
For $1 \times 1$ matrices (as voldemort points out), we do indeed have $\text{tr}(AB)=\text{tr } A \cdot \text{tr } B$---in fact, the trace in this dimension coincides with the usual ring isomorphism of the space of $1 \times 1$ matrices with the space of scalars---so in that dimension $f(x, y) = xy$ satisfies the condition.