# Can $AB = \gamma BA$ for matrices $A$ and $B$

For what values of $$\gamma \in \mathbb{C}$$ do there exist non-singular matrices $$A , B \in \mathbb{C}^{n \times n}$$ such that $$AB = \gamma BA \,?$$

So far what I have done shown that $$\gamma$$ must be an nth root of unity, by considering the determinant. $$det(AB) = det(\gamma BA)$$ $$det(A)det(B) = \gamma ^n det(B)det(A)$$ Now since both $$A$$ and $$B$$ are non singular we have $$det(A) \neq 0$$ and $$det(B) \neq 0$$ So:

$$\gamma ^n =1$$. I also know that

$$tr(AB - \gamma BA)=0$$ $$tr(AB) - \gamma tr(BA)=0$$ $$tr(AB)\big(1-\gamma \big) = 0$$ Clearly we can assume $$\gamma \neq 1$$ since surely we can find $$A$$ and $$B$$ such that they commute so we conclude that $$tr(AB) = tr(BA) = 0$$

Now i'm thinking that we can find matrices $$A$$ and $$B$$ for any $$\gamma = e^{\frac{2 \pi i}{n}}$$ such that $$AB = \gamma BA$$ but I cannot think of a way of constructing them. Does anyone have any ideas? thanks in advance!

• Examples of the case $\gamma=-1$ are common, for instance $$A=\begin{pmatrix} 0 & 1 \\ 1 & 0\end{pmatrix},\qquad B=\begin{pmatrix} 1&0\\0&-1 \end{pmatrix}.$$ So that leaves complex roots of unity as the interesting case. – Semiclassical Aug 14 at 0:49
• Ahah: Equation 7 of this paper gives a construction for arbitrary roots of unity. – Semiclassical Aug 14 at 1:00
• wow thank-you! This problem is from a past qualifying exam at my university, I don't think I would have ever come up with such a construction.. – Justin Stevenson Aug 14 at 1:07
• Another perspective: $$AB = \gamma BA \implies A = B(\gamma A)B^{-1}.$$ Consequently, $A$ and $\gamma A$ must have the same eigenvalues. – Omnomnomnom Aug 14 at 2:24

For any $$n$$, define $$B = \text{diag}(e^{2\pi i k / n} : 0 \leq k \leq n-1)$$ and then for any $$0 \leq k \leq n-1,$$ we can define $$A = [a_{i,j}]$$ by $$a_{i,j} = \begin{cases}1, & i \equiv j+k\pmod{n} \\ 0, & \text{otherwise}\end{cases}$$
Now just consider the actions of $$A$$ and $$B$$ on the standard basis vectors.