Matrix of linear transformation w.r.t basis terminology

What does it mean to find the matrix of a linear transformation with respect to a basis in the domain, and another in the codomain? In our notes we usually use the standard basis in the domain and a non-standard basis in the codomain. I assume the solution differs in we use a non-standard basis in the domain, but I'm not really sure how.

I'm probably not being very clear so I'll include an example.

Consider the basis $\beta = \{1,t,t^2\}$ for $P_2(\mathbb{R})$. Let $D: P_2(\mathbb{R}) \rightarrow P_2(\mathbb{R})$ be defined by differentation, $D(p)(t) = p'(t)$. Find the matrix $B_D$ of $D$ with respect to $\beta$ in the domain and $C = \{1+t, t-t^2, t^2\}$ in the codomain.

I know how to answer this question, but not really what it means. How would it differ if $\beta$ wasn't the standard basis? How do you do it with respect to two different bases?

Some clarification would be much appreciated, thanks!

-

1. Find the image, under $D$, of each element of the given basis for the domain.