A version of Fourier inversion formula for finite groups (Fourier Inversion). Let $G$ be a finite group and $\hat{G}$ a complete set of inequivalent irreducible unitary representations of $G$.   For any $f\in L^2(G)$, we have $$f(x)=\frac{1}{|G|}\sum_{\substack{\pi\in \hat{G}\\ 1\leq i,j\leq d_{\pi}}}d_{\pi}\langle f,\pi_{i,j} \rangle\pi_{i,j}(x)$$
Here $d_{\pi}$ denotes the dimension of the representation $
\pi$, and $\pi_{i,j}(x)$ denotes the (i,j) matrix entry of $\pi(x)$. 
I try to show that this is equivalent to the following:
$$f(x)=\frac{1}{|G|}\sum_{\pi\in \hat{G}}d_{\pi}\operatorname{Tr}\Big(\pi(x^{-1})\sum_{y\in G}f(y)\pi(y)\Big)$$
Attempt: For any $\pi\in 
\hat{G}$ and $x\in G$, it is enough to show that  $$\operatorname{Tr}\Big(\pi(x^{-1})\sum_{y\in G}f(y)\pi(y)\Big)=\sum_{1\leq i,j\leq d_{\pi}} \langle f,\pi_{i,j} \rangle\pi_{i,j}(x)$$
But I have 
$$\operatorname{Tr}\Big(\pi(x^{-1})\sum_{y\in G}f(y)\pi(y)\Big)=\sum_{y\in G} f(y) \operatorname{Tr}\big(\pi(x^{-1}y)\big)=\sum_{y\in G}\sum_{i=1}^{d_\pi}f(y)\pi_{i,i}(x^{-1}y)$$
Can any one give a hint from here? Thanks!
 A: If we expand $\langle f, \pi_{i,j}\rangle$, we get
$$\sum_{y \in G} f(y) \cdot \overline{\pi_{i,j}(y)},$$
and hence
\begin{align}
\sum_{1 \leqslant i,j \leqslant d_{\pi}} \langle f,\pi_{i,j}\rangle \pi_{i,j}(x)
&= \sum_{1 \leqslant i,j \leqslant d_{\pi}} \sum_{y\in G} f(y) \overline{\pi_{i,j}(y)}\pi_{i,j}(x) \\
&= \sum_{y\in G} f(y) \sum_{1\leqslant i,j \leqslant d_\pi} \pi_{j,i}(y^{-1})\pi_{i,j}(x) \\
&= \sum_{y\in G} f(y) \operatorname{Tr} \bigl(\pi(y^{-1})\pi(x)\bigr) \\
&= \sum_{y \in G} f(y) \operatorname{Tr} \pi(y^{-1}x),
\end{align}
which is very similar to what you want, but not quite the same. And indeed we generally don't have
$$\operatorname{Tr} \pi (x^{-1}y) = \operatorname{Tr} \pi (y^{-1}x).$$
But, we are summing over all (equivalence classes of) irreducible representations. So, if for every irreducible representation $\pi$ you can find an irreducible representation $\psi$ such that for all $x,y\in G$ you have
$$\operatorname{Tr} \pi(x^{-1}y) = \operatorname{Tr} \psi(y^{-1}x),$$
that solves it. Now $x^{-1}y = (y^{-1}x)^{-1}$, and so $\pi(x^{-1}y) = \pi(y^{-1}x)^{-1} = \overline{\pi(y^{-1}x)}^T$ since $\pi$ is unitary, whence
$$\operatorname{Tr} \pi(x^{-1}y) = \overline{\operatorname{Tr} \pi(y^{-1}x)},$$
and thus the conjugate representation to $\pi$, $\psi = \overline{\pi} \colon x \mapsto \overline{\pi(x)}$ does what we want.
