Creating a transformation matrix

linear algebralinear-transformationsmatrices

This question is related to this one, but more specific. I was given the following question:

Let $D=\{d_1,d_2\}$ and $B=\{b_1,b_2\}$ be bases for vector spaces $V$ and $W$ respectively. Let $T:V\rightarrow W$ be a linear transformation with the property that $T(d_1)=-5b_1-7b_2$ and $T(d_2)=9b_1+4b_2$. Find the matrix for T relative to D and B.

This is a pretty simple question and I just took the transformation properties and made a matrix: $$\left(\begin{matrix}-5&-7\\9&4\\\end{matrix}\right)$$

The answer key has the same answer but with the rows and columns switched:$$\left(\begin{matrix}-5&9\\-7&4\\\end{matrix}\right)$$

Am I wrong? Are these both correct? If they are both correct, don't they change the way the transformation works – especially if it is a larger matrix and not a two by two?

Best Answer

The book is correct. Consider applying your matrix to a basis vector: $$\begin{pmatrix}-5 & -7 \\ 9 & 4\end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}=\begin{pmatrix}-5 \\ 9\end{pmatrix}\neq\begin{pmatrix}-5\\-7\end{pmatrix}$$ Generally, the $i$-th column of $T$ corresponds to the image of the $i$-th basis vector.