Dimension and basis of kernel and image of linear transformation From a bank of past prelim exams:

Let $V$ be the real vector space of real polynomials of degree at most $5$, and define $T: V \to \Bbb{R}^3$ by $T(f) = (f(0), f(1), f(2))$. Find the dimensions of the kernel and image of $T$, and find a basis for each. 

I've attempted a solution, working with the standard basis of $V$ and concluded that the kernel is the set of polynomials divisible by $x(x-1)(x-2)$. Thus, I concluded that the dimension of the kernel is $3$, and the dimension of the image is $6-3=3$ by the rank-nullity theorem.
I'm just unsure of how to write the basis of the kernel and image. Any help would be greatly appreciated.
 A: Note: I'm going to assume that the underlying field here is $\mathbb{R}$.
Suppose $f\in ker(T)$. Then $T(f)=(f(0),f(1),f(2))=(0,0,0)$, hence $0$, $1$, and $2$ are all roots of $f$. So, $ker(T)\subseteq \{f\in V\,\vert\,f(0)=f(1)=f(2)=0\}$. The reverse containment is obvious. 
So, any $f\in ker(f)$ is of the form $$f(x)=x(x-1)(x-2)g(x)$$ where $g(x)$ is a polynomial of degree at most 2. So, we have $$g(x)=ax^2 + bx + c$$ where $a,b,c\in \mathbb{R}$ (and, of course, one or more of $a$, $b$, or $c$ may be zero). In fact, $g\in P_2(\mathbb{R})$, the space of polynomials over $\mathbb{R}$ having degree at most 2.
So, consider the transformation $S:ker(T)\,\rightarrow\,P_2(\mathbb{R})$ defined by $$S(x(x-1)(x-2)g(x))=g(x).$$ I'll bet you can show that $S$ is an isomorphism.
Once you do that, you know $dim(ker(T))$ (and can find a basis easily enough). From there, it's a simple matter to find $dim(im(T))$.
A: The nullspace is all polynomials of the form $$x(x-1)(x-2)(a + bx + cx^2) \text{ for some } a, b, c \in \Bbb{R}.$$ Expand and rewrite as:
$$ ax(x-1)(x-2) + bx^2(x-1)(x-2) + cx^3(x-1)(x-2) $$
i.e. all the kernel elements are scalar linear combinations of $3$ polynomials. Hence the kernel basis elements are
$$\{ x(x-1)(x-2), x^2(x-1)(x-2),x^3(x-1)(x-2)\} $$

Ops, I forgot the other part. The image is $\Bbb{R}^3$ whose basis is the canonical basis. Originally, I over-complicated things: consider every non-zero tuple $(r_0, r_1, r_2) \in \Bbb{R}^3$. We can show that we can construct $f(x) = ax^5 + bx^4 + cx^3 +dx^2 + ex + r_0$ such that $f(0) = r_0, f(1) = r_1, f(2) = r_2$. We can show that such $f$ always exists by an interpolation argument. Hence the image is all of $\Bbb{R}^3$.
Added: explicit construction for $f(x)$ such that $f(0) = r_0, f(1) = r_1, f(2) = r_2$: $$f(x) = \frac{r_2}{2}x(x-1) - r_1 x(x-2) + 2r_0(x-1)(x-2). $$
A: First we consider the Kernel of $T$, 
Suppose $f\in \operatorname{ker}(T)$ then we know that $f(0) = f(1) = f(2) = 0$, 
so as you say $g = x(x-1)(x-2)$ must divide $f$. 
so we can write $$\operatorname{ker}(T) = \{ g h : \operatorname{deg}(h) \leq 2 \}$$ 
we know that $\operatorname{deg}(h) \leq 2$ because we know that $\operatorname{deg}(f) \leq 5$. 
So we can define a basis for $\operatorname{ker}(T)$ using the canonical basis for $\{h : \operatorname{deg}(h) \leq 2\}$ 
$$B = \{g, gx, gx^2\}$$ 
So now we have a basis for $\operatorname{ker}(T)$ and hence we know it has dimension 3, so by the rank nullity theorem $\operatorname{Im}(T)$ has dimension $6-3=3$ and thus the image is all of $\mathbb{R}^3$ and hence any basis for $\mathbb{R}^3$ will do the job for the image. (for instance $\{(1,0,0), (0,1,0), (0,0,1)\}$) 
