Given a ring $R$, the polynomial ring is defined as
$$R [x]:=\left\{\sum_{k=0}^n a_k x^k: n\ge0, \ a_k \in R \ \text{for }k\in \left\{0, 1, \dots, n \right\}\right\}. $$ However, it is not usually specified what $x$ is. In order for multiplication to make sense, I guess it has to be an element in $R$ at least. But is $R[x]$ the set of all functions $ P: R\rightarrow R, \text{given by } x\mapsto \sum_{k=0}^n a_k x^k$, or the set of those functions evaluated at $x$?
Sometimes $R$ is required to be commutative. Does that make any difference for R[x]?