How can I construct the matrix representing a linear transformation of a 2x2 matrix to its transpose with respect to a given set of bases?

You essentially have two ways of representing a Linear Tranformation (say, $T$ from now on):

  1. Using a "formula" or a kind of description (e.g. "the transpose")
  2. Using a matrix (which depends on the basis that we choose; see below)

In the second case, when you want to evaluate $T(u)$ where $u$ is an element of your vector space, you have to use the vector representation of $u$ with respect to the basis you chose! If for instance your vector space is a space of polynomials and $u$ is a polynomial, you cannot multiply a matrix with $u$; you can however multiply the vector representation of $u$ with the matrix.

In case you don't remember what a vector representation is: Let's choose the basis of the vector space of $2 \times 2$ matrices to be $\left\{ B_1,B_2,B_3,B_4\right\}$, where $$ B_1= \begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix}, B_2= \begin{bmatrix} 0 & 1\\ 0 & 0 \end{bmatrix}, B_3= \begin{bmatrix} 0& 0\\ 1& 0 \end{bmatrix}, B_4= \begin{bmatrix} 0& 0\\ 0& 1 \end{bmatrix}. $$ Note that the order of the basis matters, and thus we call it an ordered basis.

In our case, those $B_i$'s are the four $2\times 2$ basis matrices you mentioned above, in an order that we arbitrarily decided. For example, the vector representation of the matrix $\left(\begin{array}\11 & 2 \\ 3 & 4 \end{array}\right)$ would be $\left[1,2,3,4\right]$ because it can be written as $1\cdot B_1+2\cdot B_2 + 3\cdot B_3 + 4\cdot B_4$.

So now do the following:

  1. Plug in the basis elements in your T, that is, evaluate the $T(B_i)$'s for $i=1,2,3,4$. The result in each case is going to be of course a $2\times 2$ matrix (the transpose).

  2. Find the vector representation of that matrix; it's going to be a vector of 4 coordinates, as in the example above. Say that you find the vectors $a_1, a_2, a_3, a_4$, respectively.

  3. Put those vectors as columns in a matrix $A=\left( a_1| a_2 | a_3 | a_4 \right)$ (note that this is a $4\times 4$ matrix; your $T$ goes from a $4$-dimensional v.s. to itself).

That $A$ is going to be the desired matrix. Note that you are "asked to find the matrices associated with them with respect to the bases above". So, when you want to find the transpose of a matrix $B$ by using the matrix $A$ above, you will multiply the vector represenation of $B$ with $A$ and not try to multiply the matrix $B$ with $A$ (you can't anyway).

It is pretty much the same with any vector space: evaluate $T$ of each of the basis elements, write the results as vector representations, and put all those as columns in a matrix and you're done.

Note that the resulting matrix depends on the choice of your basis, as well as the order of the basis that you choose. For every vector space though, we have some "standard basis" that we use often. For example the one that I gave is often used for the vector space of $2\times 2$ matrices. But you may also see it in a different order, e.g. $\left\{ B_1, B_3, B_2, B_4\right\}$, and that will give a different answer. This is fine, as long as you are clear about what basis you have chosen.

Edit: observe that if you follow the steps you will get the matrix that Rasmus gave you.


So let's look at the transformation map $T\colon\mathbb M_2\to\mathbb M_2$. Let's write the given basis as $\{e_{11},e_{12},e_{21},e_{22}\}$ and let's fix the order in which we have written it down.

We have $T(e_{ij})=e_{ji}$ for all $i,j\in\{1,2\}$. Hence, the matrix for $T$ in our chosen ordered basis looks as follows: $$ \pmatrix{1&0&0&0\\0&0&1&0\\0&1&0&0\\0&0&0&1}. $$