# Definition:Operation/Arity

## Definition

The **arity** of an operation is the number of operands it uses.

The **arity** of an operation may be, in general, any number.

It may even be infinite.

### Unary

A **unary operation** is the special case of an operation where the operation has exactly one operand.

Thus, a **unary operation** on a set $S$ is a mapping whose domain and codomain are both $S$.

### Binary

A binary operation is the special case of an operation where the operation has exactly two operands.

A **binary operation** is a mapping $\circ$ from the Cartesian product of two sets $S \times T$ to a universe $\mathbb U$:

- $\circ: S \times T \to \mathbb U: \map \circ {s, t} = y \in \mathbb U$

If $S = T$, then $\circ$ can be referred to as a **binary operation on** $S$.

### Ternary

A **ternary operation** (or **three-place operation**) is an operation which takes three operands.

That is, its arity is $3$.

And so on.

### $n$-ary

Let $S_1, S_2, \dots, S_n$ be sets.

Let $\circ: S_1 \times S_2 \times \ldots \times S_n \to \mathbb U$ be a mapping from the cartesian product $S_1 \times S_2 \times \ldots \times S_n$ to a universal set $\mathbb U$:

That is, suppose that:

- $\circ: S_1 \times S_2 \times \ldots \times S_n \to \mathbb U: \forall \tuple {s_1, s_2, \ldots, s_n} \in S_1 \times S_2 \times \ldots \times S_n: \map \circ {s_1, s_2, \ldots, s_n} \in \mathbb U$

Then $\circ$ is an **$n$-ary operation**.

### Multiary

Certain types of operation have a variable number of operands.

An operation which does not have a fixed arity is called **multiary**.

### Finitary

A **finitary operation** is an operation which takes a finite number of operands.

### Arity of Zero

It is possible to conceive of an operator which takes *no* operands.

A constant can be considered as an operation which takes no operands.

That is, it has an arity of zero.

## Also known as

An older term for **arity** that can sometimes be seen is **valency**, which may be considered more acceptable to those who prefer linguistic purity.

## Linguistic Note

The term **arity** is a neologism generated from the **-ary** suffix of the specific terms **unary**, **binary** and so on.

## Sources

- 1989: Ephraim J. Borowski and Jonathan M. Borwein:
*Dictionary of Mathematics*... (previous) ... (next): Entry:**arity** - 2009: Kenneth Kunen:
*The Foundations of Mathematics*... (previous) ... (next): $\text {II}.4$ Polish Notation