# 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?

I have been given that I am working with the space of all 2x2 matrices. The basis $B$ for this space is given as a set of four 2x2 matrices, each with an entry of 1 in a unique position and zeroes everywhere else (sorry about the description in words - I don't know how to format matrices for this site).

I have also been given the basis $B' = ({1, x, x^2})$ for the space of all polynomials of degree 2 or less and the basis $B'' = ({1})$ for $R$.

Then I am given a series of linear transformations and asked to find the matrices associated with them with respect to the bases above. I am completely lost as to how to do this! I would like help with how to achieve one of them so that I can then go and apply what I learn here to the other transformations.

The example I've chosen is the transformation T that maps 2x2 matrices to their transposes. I can't seem to construct a matrix that will bring the element in position '21' up to position '12'.

Can anyone give me some direction with this? Many thanks!!

-

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.

-
Thanks for this superb answer! I can see that I was getting stuck thinking about these matrices rigidly in their 2 x 2 format, rather than thinking about getting a sort of coordinate vector for them relative to the given basis. This really helped my understanding a lot, you rock!! –  Katherine Rix Mar 31 '12 at 14:18
@geo909: Why did you choose $\begin{pmatrix}a&b \\ c&d \end{pmatrix} \rightarrow \langle a, b, c, d \rangle$ as opposed to $\langle a,c,b,d \rangle$? Is the vector representation of the matrix always taken as if you are reading left to right and then from top to bottom by definition? –  ahorn Apr 21 at 8:15
@ahorn That's a good point, Indeed my choice was arbitrary. I edited my answer to reflect this. –  geo909 Apr 21 at 13:52

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}.$$

-
+1 for the SWAP gate. –  draks ... Apr 3 '12 at 10:37
@draks: Oh... That's cool! =) –  Rasmus Apr 7 '12 at 19:05