Binary operation/Computing operation/Introduction/Section

We consider the mathematical operations addition and multiplication, within the real numbers, as mappings

${\displaystyle \mathbb {R} \times \mathbb {R} \longrightarrow \mathbb {R} ,}$

so we assign to each pair

${\displaystyle {}(x,y)\in \mathbb {R} \times \mathbb {R} \,}$

the real number ${\displaystyle {}x+y}$ (and ${\displaystyle {}x\cdot y}$ respectively). Such a mapping is called an operation.

Definition

An operation (or binary operation) ${\displaystyle {}\circ }$ on a set ${\displaystyle {}M}$ is a mapping

${\displaystyle \circ \colon M\times M\longrightarrow M,(x,y)\longmapsto \circ (x,y)=x\circ y.}$

The domain of an operation is thus the product set of ${\displaystyle {}M}$ with itself, and the range is also ${\displaystyle {}M}$. Addition, multiplication and subtraction (on ${\displaystyle {}\mathbb {Z} }$, on ${\displaystyle {}\mathbb {Q} }$, or on ${\displaystyle {}\mathbb {R} }$) are operations. On ${\displaystyle {}\mathbb {Q} }$ and ${\displaystyle {}\mathbb {R} }$, the division is not an operation, since it is not defined in case the second component equals ${\displaystyle {}0}$. However, the division is an operation on ${\displaystyle {}\mathbb {R} \setminus \{0\}}$.