---
tag: 0580ZJSA3Q
kind: definition
name: Binary operation
msc: [08A02]
defines: 0M418FE7BB
sources:
  - url: https://en.wikipedia.org/wiki/Binary_operation
    locator: lead section
---

## Definition

Let $S$ be a set.
A binary operation on $S$ is a map $\ast \colon S \times S \to S$.
For $a, b \in S$, the notation for the image of the pair $(a, b)$ is $a \ast b$.

## Remarks

Addition, subtraction and multiplication are binary operations on the set $\mathbb{Z}$ of integers.
Subtraction is not a binary operation on the set $\mathbb{N}$ of natural numbers, because $1 - 2$ is not in $\mathbb{N}$.
The condition that $a \ast b$ is in $S$ for all $a, b \in S$ is often called closure.

## Explanations

### L1 human

A binary operation is a rule that takes two elements of a set, in order, and gives one element of the same set.
For example, addition takes $2$ and $3$ and gives $5$.
The order can matter: $2 - 3$ and $3 - 2$ are different.
