Free algebra

Likewise, the polynomial ring may be regarded as a free commutative algebra.

For R a commutative ring, the free (associative, unital) algebra on n indeterminates {X1,...,Xn} is the free R-module with a basis consisting of all words over the alphabet {X1,...,Xn} (including the empty word, which is the unit of the free algebra).

This R-module becomes an R-algebra by defining a multiplication as follows: the product of two basis elements is the concatenation of the corresponding words: and the product of two arbitrary R-module elements is thus uniquely determined (because the multiplication in an R-algebra must be R-bilinear).

This construction can easily be generalized to an arbitrary set X of indeterminates.

, the free (associative, unital) R-algebra on X is with the R-bilinear multiplication that is concatenation on words, where X* denotes the free monoid on X (i.e. words on the letters Xi),

denotes the external direct sum, and Rw denotes the free R-module on 1 element, the word w. For example, in R⟨X1,X2,X3,X4⟩, for scalars α, β, γ, δ ∈ R, a concrete example of a product of two elements is The non-commutative polynomial ring may be identified with the monoid ring over R of the free monoid of all finite words in the Xi.

Note that unlike in an actual polynomial ring, the variables do not commute.

More generally, one can construct the free algebra R⟨E⟩ on any set E of generators.

For a more general coefficient ring, the same construction works if we take the free module on n generators.

The construction of the free algebra on E is functorial in nature and satisfies an appropriate universal property.

The free algebra functor is left adjoint to the forgetful functor from the category of R-algebras to the category of sets.