Let $X\_1,\dots,X\_n$ be non commutative variables such that $\operatorname{tr} f(X\_1,\dots,X\_n) = 0$ whenever the $X\_i$ are specialized to square matrices in $M\_r(k)$ for any $r \geq 1$. Does this imply that $f$ is in the ideal generated by cyclic permutations: $g\_1\dots g\_k - g\_2\dots g\_k g\_1$ for any polynomials $g\_i$ in the $X\_i$ and $k \geq 2$?


(And if I have missed any obvious relations, is the statement true up to adding in those relations to the ideal?)



Are the trace relations among matrices generated by cyclic permutations?
The reformulation suggested by Christian Remling and Benjamin Steinberg is true (at least over a field $k$ of characteristic zero):


If $\operatorname{tr} f(X\_1,\dots, X\_n)=0$ for all $X\_1,\dots, X\_n$ in $M\_r(k)$ then $f$ is a linear combination of differences of cyclically permuted words.


An equivalent, linearly dual, statement:


For $m$ words $w\_1,\dots, w\_m$ in the variables $X\_1,\dots, X\_n$, if none is the cyclic permutation of the other, then for any $a\_1,\dots, a\_n$ in $k$, there exist $r$ and $X\_1,\dots X\_n \in M\_r(k)$ such that $\operatorname{tr}(w\_i)=a\_i$ for all $i$.


This implies the previous statement because, for each word appearing in $f$, we can add up the coefficients by which all cyclic permutations of that word appear in $f$. If this sum is zero for all words then $f$ is a linear combination of differences of cyclic permutations, and if it is nonzero for some word we can take $a\_i=1$ for that word and $a\_i=0$ for all remaining words.


Proof: Without loss of generality, assume that the words $w\_1,\dots, w\_n$ are in nondecreasing order of length.


It suffices to find for each $i$ matrices $Y\_{1,i},\dots, Y\_{n,i}$ such that $\operatorname{tr} w\_j( Y\_{1,i}, \dots, Y\_{n,i})=0$ for $j<i$ and $\neq 0$ for $j=i$. Then we can construct $X\_i$ as a direct sum of suitable scalar multiples of the $Y\_{j,i}$.


Suppose the word $w\_i$ is $X\_{j\_1} X\_{j\_2} \dots X\_{j\_\ell}$. Define $Y\_{j,i}$ as the $\ell \times \ell$ matrix whose entry in the $a$th row and $b$th column is


$$(Y\_{j,i})\_{ab} =\begin{cases} 1 & b\equiv a+1 \textrm{ mod }\ell \textrm{ and } j\_b=j \\ 0 & \textrm{otherwise} \end{cases} $$


Because the only nonzero enties in these matrices have $b\equiv a+1\textrm{ mod }\ell$, the only nonzero entries in the product of $d$ such matrices have $b \equiv a+d\textrm{ mod }\ell$, so the trace of such a product is nonzero only if $d$ is divisible by $\ell$. Thus the trace vanishes for all shorter words.


For a word of length exactly $\ell$, the only contribution to the trace of the product is from products of entries that follow the cyclic math around, i.e.


$$ \operatorname{tr} Y\_{s\_1,i} Y\_{s\_2,i} \dots Y\_{s\_{\ell-1},i} Y\_{s\_\ell,i} = \sum\_{c=1}^{\ell} (Y\_{s\_1,i} )\_{c (c+1)} (Y\_{s\_2,i} )\_{(c+1)(c\_2)} \dots (Y\_{j\_{\ell-1},i} )\_{(c-2)(c-1)} (Y\_{s\_\ell,i} )\_{(c-1)c}$$ which is equal to the number of cyclic permutations of $s\_1,\dots s\_\ell$ that equals $j\_1,\dots, j\_\ell$ and thus vanishes unless $s\_1,\dots, s\_\ell$ is a cyclic permutation of $j\_1,\dots ,j\_\ell$ and is nonzero in case it is a cyclic permutation, as desired.


