In Mathematics, a structure generally consists of a set $S$ together with a collection of named constants, relations and functions. Here, a constant simply means an element of $S$, a relation is a subset of $S^n$ and a function is a function $f:S^n\to S$. The number $n$ is called the arity of the function or the relation, and represents the number of arguments that the relation (or function) can take. The function (or relation) is called
- Unary if $n=1$
- Binary if $n=2$
- Ternary if $n=3$
- $n$-ary in all other cases
The number of such constants, relations and functions is usually finite, but in some cases (like vector spaces) it can be infinite.
On every set $S$, there is a “trivial” structure which consists of all the finite powers $S^n$, and all the projection maps $\pi_i:S^n\to S$, where $\pi_i(x_1,…,x_n)=x_i$. This structure on sets is used implicitely.
A graph is a set $G$ together with a single relation $E\subseteq G\times G$.
A real vector space is a structure $(V, 0, +, (\lambda_r:r\in\Real))$. It has a single constant $0$, a binary function $+$, and an infinite list of unary functions $\lambda_r:S\to S$, one for every real number.
In general, what makes a structure algebraic is the lack of non-trivial relations. The first example above can be considered an algebraic structure, because the relations, which we chose to be $S^n$ for every $n$, are in a sense trivial. Vector spaces are also an algebraic structure, but graphs are not.