In universal algebra, an algebra (or algebraic
structure) is a
set A together with a collection of operations on A. An n-
operation on A is a
function that takes n elements of A and returns a single element of A. Thus, a 0-ary operation (or nullary operation) can be represented simply as an element of A, or a
constant, often denoted by a letter like a. A 1-ary operation (or
unary operation) is simply a function from A to A, often denoted by a symbol placed in front of its argument, like ~x. A 2-ary operation (or
binary operation) is often denoted by a symbol placed between its arguments, like x ∗ y. Operations of higher or unspecified
arity are usually denoted by function symbols, with the arguments placed in parentheses and separated by commas, like f(x,y,z) or f(x1,...,xn). Some researchers allow
infinitary operations, such as where J is an infinite
index set, thus leading into the algebraic theory of
complete lattices. One way of talking about an algebra, then, is by referring to it as an
algebra of a certain type , where is an ordered sequence of natural numbers representing the arity of the operations of the algebra.
It is also possible to define an algebra via the
relations in the algebra instead of the operations.
Birkhoff's Theorem states that the two definitions are equivalent, i.e., there is a
Galois connection between relational and operational structures. This connection can be easily illustrated on the case of
lattices, where the algebraic structure can be given by the operations
meet or by introducing a
partial order relation. The relational point of view is useful in computational problems, in particular for the
constraint satisfaction problem (CSP).
After the operations have been specified, the nature of the algebra is further defined by
axioms, which in universal algebra often take the form of
identities, or equational laws. An example is the
associative axiom for a binary operation, which is given by the equation x ∗ (y ∗ z) = (x ∗ y) ∗ z. The axiom is intended to hold for all elements x, y, and z of the set A.