Definition:Polynomial over Ring as Function on Free Monoid on Set

Definition
Let $R$ be a  commutative ring with unity.

One Variable
Let $M$ be the free commutative monoid on the singleton $\left\{{X}\right\}$.

A polynomial in $X$ is a mapping $f: M \to R$ such that:
 * $f(X^k) = 0$ for all but finitely many $X^k \in M$.

Multiple Variables
Let $M$ be the free commutative monoid on the indexed set $\left\{{X_j: j \in J}\right\}$.

A polynomial form or just polynomial in $\left\{{X_j: j \in J}\right\}$ is a mapping $f: M \to R$ such that:
 * $f(\mathbf X^k) = 0$ for all but finitely many $\mathbf X^k \in M$.

Notation
Suppose we let $a_k \mathbf X^k$ denote the polynomial that has value $a_k$ on $\mathbf X^k$ and $0_R$ otherwise.

It follows from Unique Representation in Polynomial Forms that $f$ can then be uniquely written as a finite sum of non-zero mononomials:


 * $f = a_1 \mathbf X^{k_1} + \cdots + a_r \mathbf X^{k_r}$

or non-uniquely by relaxing the condition that $\forall i = 1, \ldots, r: a_i \ne 0$.

This is the notation most frequently used when working with polynomials.

It is also sometimes helpful to include all the zero terms in this sum, in which case:


 * $\displaystyle f = \sum_{k \in Z} a_k \mathbf X^k$

where $Z$ is the set of multiindices indexed by $J$.

Also see

 * Ring of Polynomial Forms is Commutative Ring with Unity

A polynomial in $X$ over an integral domain $D$ for transcendental $X$ is an instance of a polynomial form where $X$ acts as an indeterminate.