Solution (source code)

= Solution

<Differentiation> satisfies $D(af+bg)=aD(f)+bD(g)$ for constant scalars $a,b$, so it is a <linear map> on suitable <vector spaces> of differentiable functions. An arbitrary set $S$ need not even be a <vector space>, and an endomorphism interpretation also requires $D(S)\subseteq S$.

For a noninvertible example, take $S=\operatorname{span}\{1,x\}$. Then $D(a+bx)=b$ and the <kernel of a linear map> is the nonzero <linear span> of $1$, so $D:S\to S$ is not injective. The <matrix> in this <basis> is $\begin{pmatrix}0&1\\0&0\end{pmatrix}$.

For an invertible example, take $S=\operatorname{span}\{e^x,e^{2x}\}$. In this <basis>, $D$ has <matrix> $\operatorname{diag}(1,2)$, and
$$
\boxed{D^{-1}(ae^x+be^{2x})=ae^x+\frac b2e^{2x}.}
$$
Thus <differentiation> is not always invertible; the domain and codomain determine the answer.