In universal algebra, a variety of algebras or equational class is the class of all algebraic structures of a given signature satisfying a given set of identities. For example, the groups form a variety of algebras, as do the abelian groups, the rings, the monoids etc. According to Birkhoff's theorem, a class of algebraic structures of the same signature is a variety if and only if it is closed under the taking of homomorphic images, subalgebras and (direct) products. In the context of category theory, a variety of algebras, together with its homomorphisms, forms a category; these are usually called finitary algebraic categories. A covariety is the class of all coalgebraic structures of a given signature. Terminology A variety of algebras should not be confused with an algebraic variety, which means a set of solutions to a system of polynomial equations. They are formally quite distinct and their theories have little in common. The term "variety of algebras" refers to algebras in the general sense of universal algebra; there is also a more specific sense of algebra, namely as algebra over a field, i.e. a vector space equipped with a bilinear multiplication. Definition A signature (in this context) is a set, whose elements are called operations, each of which is assigned a natural number (0, 1, 2,...) called its arity. Given a signature and a set , whose elements are called variables, a word is a finite planar rooted tree in which each node is labelled by either a variable or an operation, such that every node labelled by a variable has no branches away from the root and every node labelled by an operation has as many branches away from the root as the arity of . An equational law is a pair of such words; the axiom consisting of the words and is written as . A theory consists of a signature, a set of variables, and a set of equational laws. Any theory gives a variety of algebras as follows. Given a theory , an algebra of consists of a set together with, for each operation of with arity , a function such that for each axiom and each assignment of elements of to the variables in that axiom, the equation holds that is given by applying the operations to the elements of as indicated by the trees defining and . The class of algebras of a