Prove $D \in \mathcal{L}(\mathcal{P}(\mathbf{R}),\mathcal{P}(\mathbf{R})) : \text{deg}(D(p)) = \text{deg}(p) - 1$ is surjective 
Suppose $D \in \mathcal{L}(\mathcal{P}(\mathbf{R}),\mathcal{P}(\mathbf{R}))$ is such that $\deg(D(p)) = \deg(p) - 1$ for every nonconstant polynomial $p \in \mathcal{P}(\mathbf{R})$. Prove that $D$ is surjective.

I have attempted an answer, however, I think it is incorrect:
We can redefine this as a linear map between two finite dimentional vector spaces:
$$
D \in \mathcal{L}(\mathcal{P}_m(\mathbf{R}),\mathcal{P}_{m-1}(\mathbf{R}))
$$ for $m > 0$.
Let $(1, x, x^2 \ldots, x^{m-1})$ be a basis for $\mathcal{P}_{m-1}$. We can extend this to a basis of $\mathcal{P}_m$ because $\mathcal{P}_{m-1} \subset \mathcal{P}_m$: $$(1, x, x^2 \ldots, x^{m-1}, x^m)\text{.}$$
Then define $D$:
\begin{align}
D(x^i) &= x^i, i = 0, \ldots, m - 1 \\
D(x^m) &= 0
\end{align}
Clearly then, $\text{range}(D) = \mathcal{P}_{m-1}$, as $(1, x, x^2 \ldots, x^{m-1})$ is a basis for $\text{range}(D)$. Hence $D$ is surjective.
The reason I think this answer is incorrect, is because I have chosen my own definition of $D$, not proved it for an arbitrary $D$. However, for similar questions, I often see the answers choose a specific mapping, and I struggle to know when that is acceptable and when it isn't.
 A: I'm not sure if this is the most efficient solution for this problem, but I'll give it a try.
We can first show that the subspace $\mathbb{R}_{m}[x]$ of polynomials of degree at most $m$ is contained in the image of $D$, $\operatorname{im } D$, for any $m \geq 0$. This will imply that the image of $D$ has polynomials of all degrees, so it should indeed be all of $\mathbb{R}[x]$.  For that purpose, the following result will come in handy:
$\textbf{Lemma}$. Let $p_{0}, \ldots, p_{m}$ be $m + 1$ polynomials such that $\deg p_{i} = i$ for $i = 0, \ldots, m$. Then $p_{0}, \ldots, p_{m}$ is a basis for $\mathbb{R}_{m}[x]$.
$\textit{Proof.}$ I can expand on this if you wish.
Let $m \geq 0$ be arbitrary and consider the $m + 1$ nonconstant polynomials $x, \ldots, x^{m+1}$. Now let's take a look at their values under $D$:
$$ D(x), \ldots, D(x^{m+1}) .$$
By the hypothesis of the problem, we know that these polynomials have degrees from $0$ to $m$, so they form a basis for $\mathbb{R}_{m}[x]$. In particular:
$$ \mathbb{R}_{m}[x] = \operatorname{span}(D(x), \ldots, D(x^{m+1})) $$
Notice that $D(x), \ldots, D(x^{m + 1})$ are polynomials in $\operatorname{im }D$, which is a subspace of $\mathbb{R}[x]$. A fundamental property of  $\operatorname{span}(D(x), \ldots, D(x^{m+1}))$ is that it is the smallest subspace containing $D(x), \ldots, D(x^{m+1})$. We can therefore deduce that
$$ \mathbb{R}_{m}[x] = \operatorname{span}(D(x), \ldots, D(x^{m+1})) \subseteq \operatorname{im } D .$$
Now consider an arbitrary polynomial $p(x) = a_{0} + a_{1}x + \ldots + a_{m}x^{m}$. Then $p \in \mathbb{R}_{m}[x]$, so $p$ must be in the image of $D$ as well. Since $p$ was an arbitrary, we can conclude that $\mathbb{R}[x] \subseteq \operatorname{im }D$, so $ \mathbb{R}[x] = \operatorname{im }D $ and $D$ is surjective.
A: Let $D\in\mathcal{L}(\mathcal{P}(\mathbb{R}), \mathcal{P}(\mathbb{R}))$ have the property that $\deg (D(p)) = \deg(p) - 1$. We show that for any $m$ that the linearly independent set $\{x, x^2, \ldots x^m\}$ is mapped to a linearly independent set under $D$, we will do this by induction.
For $m = 1$, then $\deg(x) = 1$ and so $\deg(D(x)) = \deg(x)-1 = 0$. Hence $D(x)$ is a constant and we have that $D$ has mapped $\{x\}$ to a linearly independent set. Now assume for the inductive step that for $m=k$ we have that $D$ maps $\{x, \ldots x^k\}$ to a linearly independent set. Consider the set $\{x, x^2, \ldots x^k, x^{k+1}\}$. Let $\alpha_i$ be any scalars such that $$\sum_{i=1}^{k+1}\alpha_i D(x^i) = 0$$
Since $D$ is assumed to be linear then we have that
$$D\Big(\sum_{i=1}^k \alpha_i x^i\Big)  + \alpha_{k+1} D(x^{k+1}) = 0$$
Since $\sum_{i=1}^k \alpha_i x^i$ is a polynomial of degree $k$. Then $\deg(D(\sum_{i=1}^k \alpha_i x^i)) = k-1$. Since $\deg(\alpha_{k+1} D(x^{k+1})) = k$. It follows that $\alpha_{k+1}$ must be the coefficient of $x^k$, if this were not the case, then we would need $\deg(D(\sum_{i=1}^k \alpha_i D(x^i))) = k$. But this cannot happen by the condition on $D$. But since $\alpha_i$ was chosen so that $\sum_{i=1}^{k+1}\alpha_i D(x^i) = 0$ then it is necessary that $\alpha_{k+1} = 0$. Hence
$$\sum_{i=1}^{k}\alpha_i D(x^i) + \alpha_{k+1}D(x^{k+1})=\sum_{i=1}^{k}\alpha_i D(x^i) = 0$$
But by our inductive assumption that that $D$ maps $\{x, \ldots, x^k\}$ to linearly independent vectors, then $\sum_{i=1}^{k}\alpha_i D(x^i) $ can only happen if $\alpha_i =0$. Hence if $\alpha_1, \ldots, \alpha_{k+1}$ are such that
$$ \sum_{i=1}^{k+1}\alpha_i D(x^i)  = 0$$
then we must have that $\alpha_1 = \ldots = \alpha_{k+1} = 0$. Hence $\{x, \ldots, x^{k+1}\}$ are linearly independent and we complete our inductive step.
Let $p\in \mathcal{P}(\mathbb{R})$, then there exists some $m$ such that $p\in\mathcal{P}_m(\mathbb{R})$. Then by our work on $D$, we know that $D$ maps $\{x, \ldots, x^{m+1}\}$ to a set of a linear independent vectors in $\mathcal{P}_m(\mathbb{R})$. But $\{D(x), \ldots, D(x^{m+1})\}$ forms a set of $m+1$ independent vectors in $\mathcal{P}_{m}(\mathbb{R})$, a space of dimension $m+1$. Hence $span\{D(x), \ldots, D(x^{m+1})\} = \mathcal{P}_m(\mathbb{R})$. We can thus find scalars $\beta_i$ such that $$p(x) =\sum_{i=1}^{m+1}\beta_i D(x^i) =D\Big(\sum_{i=1}^{m+1}\beta_i x^i\Big)$$
We can conclude that $p$ is in $D(\mathcal{P}_m(\mathbb{R}))$. Hence $D$ is surjective to and from the space of polynomials.
