# Find matrix describing linear transformation

This is a homework problem I thought figured out, but the homework site says it's not correct.

The linear transformation $$T_n : P_n \rightarrow P_n$$ defined as $$T(p(x)) = \frac{\partial}{\partial x}(x \cdot p(x))$$

Eg. $$T_0(1) = 1$$ , $$T_1(x) = 2x$$ , $$T_2(x^2) = 3x^2$$

Find the matrix which represents $$T_2$$ with respect to the basis B = {$$b_1, b_2, b_3$$} = $$\begin{pmatrix}1-x \\-x^2-x\\ -x^2-x-1 \end{pmatrix}$$

So what I did was to write $$T$$(old basis) in terms of new basis:

$$T_0(1) = 1 = b_2 - b_3$$

$$T_1(x) = 2x = -2b_1 + 2b_2 - 2b_3$$

$$T_2(x^2) = 3x^2 = 3b_1 - 6b_2 +3b_3$$

which gives the matrix

$$\begin{pmatrix}0&-2&3 \\1&2&-6\\ -1&-2&3 \end{pmatrix}$$

The homework site does not agree with my answer, but I can't see what I did wrong. The matrix seems to work for every vector I test it against. Did I do something wrong? Or is the homework site wrong?

That's because what you have to do is to compute $$T(b_1)$$, $$T(b_2)$$, and $$T(b_3)$$ with respect to the basis $$B$$, not $$T(e_1)$$, $$T(e_2)$$, and $$T(e_3)$$, where $$e_1=1$$, $$e_2=x$$ and $$e_3=x^2$$.
So, since, for instance, $$T(b_1)=1-2x=2b_1-b_2+b_3$$, the entries of the first column of your matrix will be $$2$$, $$-1$$, and $$1$$.