Let $V \cong \mathbb{C}^r$ be the defining representation of $\mathfrak{su}(r)$. Then the permutation on $V \otimes V$ can be expressed as

$$ P = \frac{1}{r} \, 1 \otimes 1 + \frac{1}{2} \sum_{a=1}^{r^2-1} t_a \otimes t_a \, , \tag{$\star$} $$

where $\{t_a\}_{a=1}^{r^2-1}$ are a (hermitian, traceless) basis of $\mathfrak{su}(r)$ normalised by $\mathrm{tr}(t_a\,t_b) = 2\,\delta_{ab}$, called [generalised Gell-Mann matrices](https://en.wikipedia.org/wiki/Generalizations_of_Pauli_matrices#Generalized_Gell-Mann_matrices_(Hermitian)) in the physics literature. Special cases of (twice) the $t_a$ are [Pauli matrices](https://en.wikipedia.org/wiki/Pauli_matrices) ($r=2$) and [Gell-Mann matrices](https://en.wikipedia.org/wiki/Gell-Mann_matrices) ($r=3$).

**Question:** what is the oldest reference for $(\star)$?

I'd think it must be a classical result, but to my surprise the oldest reference that I found is

> C. Rakotonirina, *Expression of a tensor commutation matrix in terms of the generalized Gell-Mann matrices*, [Int. J. Math. Math. Sci. **2007**:20672 (2007)](https://doi.org/10.1155/2007/20672) ([arXiv:math/0511451](https://arxiv.org/abs/math/0511451))

NB. The existence of such a formula follows from Schur–Weyl duality. Indeed, since the $t_a$ are orthogonal for the Killing form, $\Omega \propto \sum_a t_a \otimes t_a$ is the split quadratic Casimir of $\mathfrak{su}(r)$ on $V \otimes V$. As $\Omega$ lies in the commutant of the $\mathfrak{su}(r)$-action on $V\otimes V$, by Schur–Weyl it lies in the image of the $\mathbb{C}S_2$-action, i.e. is a linear combination of the identity and permutation on $V\otimes V$. Solving for the permutation gives an expression of the form $(\star)$.