Header Image

Free algebras by means of a universal property

June 27, 2022

Consider a vector space $V$, when $X$ is a basis of $V$, we say that $V$ is a free vector space on $X$ 1. For any vector space $V$ and $W$ and a basis $X$ of $V$, if there is a map $f:X\to W$ then there exists a unique linear map from $V$ to $W$ that extends $f$. That is, there is a unique linear map making the following diagram commute,

commutative diagram 1

where $i$ is the inclusion map $i:X\to V$ (in fact, any map $X\to V$ satisfying this property turns out to be injective) 1. In other words there exists a unique map $g:V\to W$ such that $gi=f$.

We can use this to define free in terms of a universal property. In order to do this we define the following category. Let $\mathbf{C}$ be a full subcategory of $\mathbf{Alg}(\Omega)$ with objects in $\mathbf{C}$ called $\mathbf{C}$-algebras, and let $X$ be a set. Define $\mathbf{C}[X]$ to be the category of pairs $(A,\alpha)$, in which $A$ is a $\mathbf{C}$-algebra and $\alpha$ a map from $X$ to $A$. A morphism $f:(A,\alpha)\to (B,\beta)$ in $\mathbf{C}[X]$ is a homomorphism $f:A\to B$ such that $f\alpha = \beta$ 2. That is, a morphism in $\mathbf{C}[X]$ is a map $f:A\to B$ making the following diagram commute.

commutative diagram 2

A free algebra on $X$ is then an initial object in $\mathbf{C}[X]$ 2.

The example of a free $K$-vector space above can be constructed in terms of this definition. Let $K$ be a field and $\mathbf{C}$ the category of $K$-vector spaces. The free $\mathbf{C}$-algebra $(V,\alpha)$ on a set $X$ is the free $K$-vector space on $X$ where $V$ is the set $K^{(X)}$ of all maps $u: X\to K$ such that $\{x\in X:u(x)\neq 0\}$ is finite. The $K$-vector space structure on $V$ is defined by $$(u+v)(x)=u(x)+v(x)\text{ and }(ku)(x)=k(u(x))$$ for $u,v\in V$, $x\in X$, and $k\in K$. The map $\alpha: X\to V$ is defined by $$\alpha(x)(y)=\begin{cases} 1, \text { if } x=y \\ 0, \text { if } x \neq y \end{cases} $$ for all $x,y\in X$.

Now, for every map $\beta:X\to W$ there exists a unique morphism of $K$-vector spaces $f:V\to W$ with $f\alpha = \beta$, that is, making the diagram

commutative diagram 3

commute and this map is explicitly given by $$f(u) = \sum_{x\in X}u(x)\beta(x)$$ 2. Hence, $V$ is initial since this morphism always exists for any object $(W,\beta)$ of $\mathbf{C}[X]$. In fact, every $K$-vector space is the free-semimodule over a field and so every $K$-vector space is free.

We can apply this definition to other algebraic structures. Consider $\mathbf{C}$ as the category of magmas. Then a free magma on $X$ is an initial object $(M,\alpha)$ in $\mathbf{C}[X]$. Similarily, for groups, if we consider $\mathbf{C}$ the category of groups, the free group on $X$ is the initial object in $\mathbf{C}[X]$.


  1. George Janelidze. Conversation on free algebras. Personal communica- tion 15/03/22, 2022. ↩︎ ↩︎

  2. George Janelidze. Introduction to abstract algebra. Lecture Notes, 2015. ↩︎ ↩︎ ↩︎

Tags: category-theory universal-algebra