Let $R$ be a ring and consider \begin{eqnarray*} \phi : &R[X] &\longrightarrow \text{Map}(R,R) \\ &f &\mapsto \,\,\,(r \mapsto f(r)) \end{eqnarray*} I have shown that $\phi$ is a ring homomorphism iff $R$ is commutative. Now assume that $R$ is an infinite integral domain. (Then $R$ is commutative, so $\phi$ is a ring homomorphism.) I want to show that $\phi$ is injective, but not surjective. To do this, suppose that for arbitrary $f,g ∈ R[X]$, we have $\phi(f) = \phi(g)$. Then we have: $$ (\forall r ∈ R)(f(r) = \phi(f)(r) = \phi(g)(r) = g(r)). $$ Now if $f, g$ were functions, then we could conclude that $f =g$, and $\phi$ would be injective. I figured that the same would apply for polynomials (because they are equal at every point). However, we never used that $R$ is an infinite integral domain here. For surjectivity (or actually: non-surjectivity) it would suffice to show an example of a function $f \notin \text{im} \phi$. I have the feeling that here is where the infinity of $R$ comes into play, but as $R$ remains abstract, I haven't found a concrete example of this yet.
No homework question, just an exercise. Any help will be greatly appreciated.
Edit
What happens when instead $R$ is finite? (i.e. when $R$ is a finite field.) Can $\phi$ still be injective? And surjective? The latter is at least possible (if not plausible) on grounds of cardinality: Map$(R,R)$ is finite, while $R[X]$ is not.
For $R$ infinite, the set of all possible functions $f:R \to R$ has cardinality $2^{\vert R \vert}$, whereas (because polynomials can be put into $1-1$ correspondence with finite sequences from $R$) $\vert R[X] \vert = \vert R \vert$. Cantor's theorem tells us that for any set, $\vert R \vert \lt 2^{\vert R \vert}$, so $\phi$ can't be surjective.
If $\forall x \in R~f(x)=g(x)$, then because $R$ is an integral domain, it embeds in a field $F$, and because $R$ is infinite $f-g \in R[X] \subseteq F[X]$ has infinitely many roots, so it must be identically $0$.