Matrix to represent transformation $T(a_0+a_1t+a_2t^2) = a_1+2a_{2}t$ with respect to a certain basis I'm having so much trouble understanding this very concept..
This is a problem from the book.

The Mapping $T:P_2\to P_2$ is defined by $T(a_0+a_1t+a_2t^2)=a_1+2a_2t$ is a linear transformation. Find the B-matrix for $T$ where $B$ is the basis $\{1,t,t^2\}$.

The part that I'm struggling so much is that How Do you change a polynomial equation (in this problem, $a_0+a_1t+a_2t^2$) into a vector with respect to $B$. 
In the book, it does the following: $T(1)=0, T(t) =1, T(t^2)=2t$. 
I will write out my thought processes, so please point out the part that I'm wrong.


*

*$T(1)$ would be the same as putting $1$ for $a_0$ in $a_0+a_1t+a_2t^2$ which then goes through the transformation and since there is no value corresponding to $a_0$ in $a_1+2a_2t$, it becomes $0$.

*Do the same for all the bases $1,t,t^2$. which are transformed into $0,1,2t$

*(This is the part I'm not sure of) Then I have to write these $0,1,2t$ in vector format with respect to B. So $\{[T(1)]_B,[T(t)]_B,T(t^2)]_B\}$
How do I represent these in B basis ? In the book, they become
$[T(1)]_B = (0,0,0)\ , \ [T(t)]_B = (1,0,0)\ , \ [T(t^2)]_B = (0,2,0)$
Could anybody explain this transformation step by step?
 A: You are correct through step 3. I will pick up the solution where you say "How do I represent these in $B$ basis? In the book, they become ..."
You need to find the coordinates of a polynomial $p(t)$ with respect to $B$. These are the numbers $a,b,c$ such that
$$a\cdot1 + b\cdot t + c \cdot t^2 = p(t).$$
When $p(t)=1$, you need to solve
$$a\cdot1 + b\cdot t + c \cdot t^2 = 1.$$
where $a,b,c$ are real numbers. There is exactly one solution (because $B$ is a basis): $a=1$, $b=0$, and $c=0$. This gives you the coordinate vector $\left[\matrix{a\cr b\cr c\cr}\right]=\left[\matrix{1\cr 0\cr 0\cr}\right]$.
In general, the coordinates of $at^2+bt+c$ will be $\left[\matrix{c\cr b\cr a\cr}\right]$, because
$$at^2+bt+c = c \cdot 1 + b \cdot t + a \cdot t^2.$$
You got a nice basis here. There would be more work if your basis was something like $\{ t+1,t-2,t^2+5\}$, for instance; in that case, you would need to solve the equation
$$a\cdot(t+1)+b\cdot(t-2)+c\cdot (t^2+5)=p(t)$$
to get the coordinates.
