
I know that if I substitute the first matrix for $T(M)$ I see what T does to each of the basis vectors. I don't understand how that creates a $3\times 3$ matrix though.
I was looking at this question for a hint, but I don't understand it still. Find the matrix of the given linear transformation $T$.
Any advice?
The matrix of a transformation $T$ in a basis $(e_i)_i$ can be written with column vectors $[..T(e_i)..]$, all coordinated in the given basis.
In this particular case, you should calculate the $3$ matrix products: $T(e_1),\ T(e_2),\ T(e_3)$, then express these three results as the linear combination of $e_1,e_2,e_3$ and write the coefficients in the columns.
For example, $T(e_3)=T\pmatrix{0&0\\0&1}=\pmatrix{0&2\\0&7}=7e_3+2e_2-2e_1=-2e_1+2e_2+7e_3$.