Variety of algebras

The notion of "variety of algebras" is fundamental to the foundations of the branch of mathematics known as universal algebra and also plays an important role in group theory.

Equational definition
A variety of algebras is defined as the collection of all algebras of a particular signature and satisfying a particular collection (not necessarily finite) of identities. Below, the terms signature and identity are explained.

Signature refers to a function from a fixed set (that we may call the operator domain) to $$\mathbb{N}_0$$ (the set of nonnegative integers). The elements of the operator domain are the "operators" and the signature sends each operator to a nonnegative integer that is its "arity." An algebra of a given signature is defined to be a set equipped with operations as follows: for each operator in the operator domain, there is a $$n$$-ary operation from the set to itself where $$n$$ equals the arity of the operator.

For instance, a signature where the image of the operator domain is (in order) $$(2,1,3,2)$$ means that the algebras of that signature are sets $$S$$ equipped with (labeled) operations $$S \times S \to S, S \to S, S \times S \times S \to S, S \times S \to S$$. Note that which operation is what matters, so for instance, the roles of the two binary operations here are not interchangeable.

Note that operators of arity zero are constant functions.

Identity refers to an equality of two formal expressions where both expressions are constructed using the operators in the operator domain, respecting arity. An algebra is said to satisfy the identity if that identity holds for all choices of elements in the algebra. For instance, associativity is an identity. Explicitly, for a binary operation $$*$$, associativity states that $$(a * b) * c = a * (b * c)$$. A magma (set with a binary operation) "satisfies associativity" if this holds for all $$a,b,c$$ in the set, in which case it is called a semigroup.

Identities can connect two or more operations. For instance, $$a * (b + c) = (a * b) + (a * c)$$ is an identity connecting two binary operations, $$*$$ and $$+$$.

HSP definition
A variety of algebras is defined as a collection of all algebras of a particular signature that is closed under taking homomorphisms, subalgebras, and arbitrary direct products.