TITLE: Why isn't a polynomial a function?
QUESTION [5 upvotes]: In my class notes my teacher defined a polynomial with coefficients in a ring $R$ as:

If $R$ is a ring a polynomial with coefficients in a ring $R$ is a formal expression: $$a_o + a_1 x + ... + a_n x^n$$
with $n \in \mathbb N_0$ and $a_i \in R$

I also checked the definition given in some Abstract algebra books and all of them defined it as a formal expression. Why is that so? Isn't just enough to say that a polynomial if a function:$$f:R\to R$$ $$x \mapsto a_0 + a_1x+...+a_nx^n$$
Why define a polynomial as a formal expression?

REPLY [7 votes]: Because these definitions are not equivalent. For example, consider the field $\mathbb{F_2}$. The polynomials $x+1$ and $x^2+1$ are equal as functions. But they are not the same polynomial. And we don't want them to be the same polynomial.