= Algebraic operation
{title2=$f:S^n\to S$}
In <universal algebra>, a finitary algebraic operation on a <set> $S$ is a <function>
$$
f:S^n\longrightarrow S
$$
for a <nonnegative integer> $n$, its <arity>. A <binary operation> has $n=2$, as with <addition> on the <integers>. A <unary operation> has $n=1$, as with taking the <additive inverse> $a\mapsto-a$.
A <nullary operation> has $n=0$: since $S^0$ contains the single empty tuple, such an operation selects a distinguished element of $S$, such as zero in a <ring>. Thus constants are operations too. The fixed <codomain> $S$ expresses closure, while additional identities such as the <associative property> specify laws an operation may satisfy.
Back to article page