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$?