# Homomorphism of universal algebras

## Definition

Let $A$ and $B$ be two algebras in a variety of algebras. Then, a map $\phi$ from $A$ to $B$ is termed a homomorphism of universal algebras if $\phi(f(a_1,a_2,...a_n)) = f(\phi(a_1),\phi(a_2),...,\phi(a_n))$ where $f$ is a member of the operator domain corresponding to the variety.

The $f$ on the left is in $A$ and the $f$ on the right is in $B$.

## Examples

### Homomorphism of magmas

Consider the variety of magmas: a magma is a set equipped with a binary operation. The operator domain here consists of a single operator: the binary operation of multiplication (denoted as $*$). Thus, given a map $\phi: A$$B$ of magmas, $\phi$ is a homomorphism if and only if, for every $g,h$ in $A$:

$\phi(g * h) = \phi(g) * \phi(h)$

The $*$ on the left is in $A$ and the $*$ on the right is in $B$.

Here, $*$ plays the role of $f$. Note that we have used infix notation for $*$ as opposed to prefix notation for $f$, which is why the expression looks somewhat different.

### Homomorphism of monoids

Consider the variety of monoids: a monoid is a set equipped with a binary operation $*$, as well as a constant called the neutral element $e$, such that:

• $a * (b * c) = (a * b) * c$ viz $*$ is associative
• $a * e = e * a = a$ viz $e$ is a neutral element for $*$

A map $\phi: A$$B$ of monoids is termed a homomorphism of monoids of $\phi( g * h) = \phi(g) * \phi(h)$ and \phi(e) = e[/itex].

Note that since every monoid is also a magma (by only looking at the binary operation) we can also talk of magma-theoretic homomorphisms of monoids. However, it is not true that any magma-theoretic homomorphism is also a homomorphism of monoids. In particular, the neutral element may not go to the neutral element.

### Homomorphism of groups

Further information: homomorphism of groups

A homomorphism of groups is a map from one group to another that preserves: the binary operation, the inverse operation and the neutral element. It turns out that any magma-theoretic homomorphism between groups is also a homomorphism of groups. Hence, we can also define a homomorphism of groups as a set-theoretic map between groups that preserves the binary operation.