Background:
This is a homework exercise which asks to compute a transform matrix. The answer has been published by our teacher. However, my approach goes a different way and gets a different solution. I checked over and over, but failed to identify the error.
The Exercise Problem:
Suppose $X \in R^{2 \times 2}$, define a linear transformation over $R^{2 \times 2}$ as: $ \mathbf{T(X)} = \begin{bmatrix} 1 & 1 \\ 2 & 2 \\ \end{bmatrix} X$.
Please compute its transform matrix under the following basis: $\mathbf{E_1} = \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ \end{bmatrix}$, $\mathbf{E_2} = \begin{bmatrix} 1 & 1 \\ 0 & 0 \\ \end{bmatrix}$, $\mathbf{E_3} = \begin{bmatrix} 1 & 1 \\ 1 & 0 \\ \end{bmatrix}$, $\mathbf{E_4} = \begin{bmatrix} 1 & 1 \\ 1 & 1 \\ \end{bmatrix}$.
My solution: My approach is simply to transform each of the vectors of the basis by $T$, then insert the result into the columns of a matrix. \begin{cases} T(E_1) &= \begin{bmatrix} 1 & 1 \\ 2 & 2 \\ \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 2 & 0 \\ \end{bmatrix} = E_1 - 2E_3 + 2E_4. \\[15pt] T(E_2) &= \begin{bmatrix} 1 & 1 \\ 2 & 2 \\ \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 0 & 0 \\ \end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 2 & 2 \\ \end{bmatrix} = -E_2 + 2E_4. \\[15pt] T(E_3) &= \begin{bmatrix} 1 & 1 \\ 2 & 2 \\ \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 0 & 1 \\ \end{bmatrix} = \begin{bmatrix} 1 & 2 \\ 2 & 4 \\ \end{bmatrix} = -E_1 - 2E_2 + 2E_3 + 2E_4. \\[15pt] T(E_4) &= \begin{bmatrix} 1 & 1 \\ 2 & 2 \\ \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & 1 \\\end{bmatrix} = \begin{bmatrix} 2 & 2 \\ 4 & 4 \\ \end{bmatrix} = -2E_2 + E_4. \end{cases} Thus, the transform matrix of $T$ is: $B = \begin{bmatrix} 1 & 0 & -1 & 0 \\ 0 & -2 & -2 & -2 \\ -2 & 0 & 2 & 0 \\ 2 & 2 & 2 & 1 \\ \end{bmatrix}$.
My teacher's solution:
This approach first computes the transform matrix of $T$ under the natural basis of $R^{2 \times 2}$, that is, $\mathbf{E_{11}} = \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ \end{bmatrix}$, $\mathbf{E_{12}} = \begin{bmatrix} 0 & 1 \\ 0 & 0 \\ \end{bmatrix}$, $\mathbf{E_{21}} = \begin{bmatrix} 0 & 0 \\ 1 & 0 \\ \end{bmatrix}$, $\mathbf{E_{22}} = \begin{bmatrix} 0 & 0 \\ 0 & 1 \\ \end{bmatrix}$.
\begin{cases}
T(E_{11}) &= \begin{bmatrix} 1 & 1 \\ 2 & 2 \\ \end{bmatrix}
\begin{bmatrix} 1 & 0 \\ 0 & 0 \\ \end{bmatrix}
= \begin{bmatrix} 1 & 0 \\ 2 & 0 \\ \end{bmatrix} = E_{11} + 0 E_{12} + 2E_{21} + 0E_{22}.
\\[15pt]
T(E_{12}) &= 0 E_{11} + E_{12} + 0 E_{21} + 2E_{22}.
\\[15pt]
T(E_{21}) &= E_{11} + 0 E_{12} + 2E_{21} + 0 E_{22}.
\\[15pt]
T(E_4) &= 0 E_{11} + 1 E_{12} + 0 E_{21} + 2E_{22}.
\end{cases}
Therefore,
$T(E_{11},E_{12},E_{21},E_{22}) = (E_{11},E_{12},E_{21},E_{22}) \begin{bmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 2 & 0 & 2 & 0 \\ 0 & 2 & 0 & 2 \end{bmatrix} = (E_{11},E_{12},E_{21},E_{22}) A$.
It then takes advantage of the transform matrix $C$ from the natural basis to the target basis:
$C = \begin{bmatrix} 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 \end{bmatrix}$.
So, the transform matrix of $T$ under the target basis is: $B = C^{-1}AC = \begin{bmatrix} 1 & -1 & 0 & 0 \\ 0 & 1 & -1 & 0 \\ 0 & 0 & 1 & -1 \\ 0 & 0 & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 2 & 0 & 2 & 0 \\ 0 & 2 & 0 & 2 \end{bmatrix} \cdot \begin{bmatrix} 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 1 & 0 \\ -2 & -1 & -3 & -2 \\ 2 & 0 & 2 & 0 \\ 0 & 2 & 0 & 4 \end{bmatrix}$.
My Question:
- As you can see, the two answers are different. Then, what is wrong with my solution?
- How to check whether a transform matrix has been correctly computed without the teacher's answer?
Your approach is correct but $E_1 - 2 E_3 + E_4 $ is not what you want $$ \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ \end{bmatrix} - 2 \begin{bmatrix} 1 &1 \\ 1 & 0 \\ \end{bmatrix} + 2 \begin{bmatrix} 1 & 1 \\ 1 & 1\\ \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 &2 \\ \end{bmatrix} \neq \begin{bmatrix} 1 & 2\\ 0 & 0 \\ \end{bmatrix} $$ It was just a computational error. $$ \begin{bmatrix} 1 & 0 \\ 0 & 0 \\ \end{bmatrix} - 2 \begin{bmatrix} 1 &1 \\ 0 & 0 \\ \end{bmatrix} + 2 \begin{bmatrix} 1 & 1 \\ 1 & 0\\ \end{bmatrix} = \begin{bmatrix} 1 & 0\\ 2 & 0 \\ \end{bmatrix} $$ This is what your teacher has.