I'm currently doing this question. Fix a $A$ be a $m \times m$ matrix and $B$ be a $n \times n$ matrix, and let $X$ be a $m \times n$ matrix. Define a map $\alpha:V \to V$, where $V$ is a vector space of $m \times n$ matrices given by $\alpha(X)=AXB$. Find the trace of this linear operator.
Here's what I tried so far. I know that if I consider $\beta(X)=AX$, I can take a basis going down the columns of the matrix. (ie. I can take $\mathcal B=\{E_{11}, E_{21} ... E_{n1}, E_{12}, E_{22}...E_{nn}\}$, where $E_{ij}$ refers to the matrix with $1$ in it's $i$th row and $j$-th column and zero everywhere else. Then because $A$ acts on each column of $X$ the same, I have that:
$$ [\beta]_{\mathcal B} = \left(\begin{array}{rrrr} A & \cdots & & 0 \\ \vdots& A & & \\ & & \ddots & \vdots \\ 0 & & \cdots & A \end{array}\right) $$ where each $A$ is a block matrix.
For $\gamma(X)=XB$, I know $B$ acts on each row the same. I can take the basis $\mathcal{Y}=\{E_{11}, E_{12} \cdots E_{1n} \cdots E_{nn}\}$, this time going down the rows of the matrix, to have that $$ [\gamma]_{\mathcal Y}=\left(\begin{array}{rrrr} B^T & \cdots & & 0 \\ \vdots& B^T & & \\ & & \ddots & \vdots \\ 0 & & \cdots & B^T \end{array}\right) $$ But after this I don't know how to continue. Any hints? I can't just compose them together because the bases are different.