6

On my algebra course, sometimes we write, say

$$f \in R[X], f= X^2 + X + 1$$

And sometimes we treat polynomials as functions, so

$$ f(x) = x^2 + x + 1$$

What is the difference between these two ways of writing a polynomial?

I'm a bit confused about the two different notations. Is it that if $f = X^2 + X + 1$, then $f(x) = x^2 + x + 1$?

  • 2
  • 3
    @GitGud So a polynomial function is determined by the values it takes when evaluated in the domain of the function, whereas a polynomial is determined by it's coefficients? – Cameron Martin May 30 '14 at 22:23
  • 1
    A polynomial is a formal construction, a function is a special subset of a cartesian product with some restrictions. For example, over the field with two elements, $;\Bbb F_2;$, we have that as functions, $;x^2+x = 0;$ , yet as polynomials they are way different. – DonAntonio May 30 '14 at 22:25
  • Precisely. One of the ways to define polynomial over a ring is to define them as the infinite sequences in that ring. For example $(a_0, a_1, a_2, 0, 0, \ldots)$ would correspond to the polynomial $a_2x^2+a_1x+a_0$. With this definition it is obvious that only the coefficients matter. – Git Gud May 30 '14 at 22:26
  • And the elements of $R[X]$ are in no way functions, so we can't write $f(x)$ for $f \in R[X]$? – Cameron Martin May 30 '14 at 22:28
  • 3
    @CameronMartin There is a lot of abuses of notation going on here. The symbol $f(x)$ is not a function. It is a value. The function would be $f$, but then, uh oh, $f\in R[X]$ so $f$ is both a polynomial and a function? Abuses of notation often lead to contradictions... I am unable to pinpoint exactly which abuse you're missing, sorry. – Git Gud May 30 '14 at 22:31
  • 1
    Think of elements $p \in R[X]$ as functions $p:\mathbb{N} \to R$ (where $p_k = 0$ for all $k$ sufficiently large). The corresponding function comes from evaluation $x \mapsto \sum_k p_k x^k$. – copper.hat May 30 '14 at 22:31
  • sorry for leaving a comment on the old question but for the future reference, I interpreted DonAntonio as $p(x) = x^2 + x, q(x) = 0$ thus $p(x) = q(x)$. – Rowing0914 Mar 15 '24 at 22:47

1 Answers1

4

It depends on what you want to do. Sometimes you want to treat polynomials as elements of the polynomial ring, and sometimes you want to treat polynomials as functions. Conflating the two is a common form of abuse of notation, or what in computer science is called overloading.

In this case there is actually a precise way to describe the relationship between these two descriptions of polynomials: if $R$ is a commutative ring, then the set of homomorphisms of $R$-algebras from $R[x]$ to $R[x]$ can be canonically identified with $R[x]$ because $R[x]$ is the free $R$-algebra on one generator; moreover, composition of homomorphisms corresponds to composition of polynomials. There is an even better way to say what this means using category theory but maybe that's going too far for now.

Qiaochu Yuan
  • 419,620
  • 3
    People like to make a big deal about how polynomials being equal isn't the same as polynomial functions being equal, and that's true if you think a polynomial in $R[x]$ can only take elements of $R$ as input. But if you think about it a little you'll notice that in fact a polynomial in $R[x]$ can take an element of any $R$-algebra as input, such as $R[x]$ itself (above). And once you notice that, then the two notions of equality coincide. – Qiaochu Yuan May 31 '14 at 18:25
  • Inspired by your answer I have asked a question: http://math.stackexchange.com/q/894899/75923 – drhab Aug 12 '14 at 09:00
  • @QiaochuYuan OK, I'll bite. Can you give a hint what more exactly the category theory version of this is? – Mitch Dec 05 '18 at 17:19
  • 1
    @Mitch: I'm not certain what I had in mind but probably it was to use the Yoneda lemma, using the fact that $R[x]$ represents the forgetful functor from $R$-algebras to sets. See https://qchu.wordpress.com/2013/06/09/operations-and-lawvere-theories/ for some worked examples of similar arguments. – Qiaochu Yuan Dec 05 '18 at 20:25
  • @QiaochuYuan Thanks, that helps. – Mitch Dec 05 '18 at 22:55