Functions that are Not Binary Operations
Recall from the Unary and Binary Operations on Sets page that if $S$ is a set then a function $f : S \times S \to S$ is said to be a binary operation and we must be specific in having that:
- Each pair $(x, y) \in S \times S$ is mapped into $S$.
- $f(x, y)$ is defined.
- Each pair $(x, y) \in S \times S$ is mapped to only one element in $S$.
We will now look at some examples of sets $S$ and functions $f : S \times S \to S$ that are not binary functions.
First consider the set of nonnegative real numbers $S = \{ x \in \mathbb{R} : x > 0 \}$ and consider the function $* : S \times S \to S$ defined for $a, b \in S$ by:
(1)We can clearly see that since $a, b > 0$ that $a * b$ is well defined and each pair $(a, b) \in S \times S$ is mapped to only one element in $S$. That said, $*$ is not a binary operation on $S$ because the first condition is not satisfied. Take $a, b \in S$ where $0 < b \leq 1$. Then $\ln b \leq 0$ and hence $a \ln b \leq 0$. Therefore $a * b = a \ln b \leq 0$ so $(a * b) \not \in S$. So some pairs $(a, b) \in S \times S$ are mapped out of $S$, so $*$ is not a binary operation on $S$.
Of course, if we let $S^* = \{ x \in \mathbb{R} : x > 1 \}$ then $\ln b > 0$ for all $b \in S^*$ so $a * b > 0$ for all $(a, b) \in S^* \times S^*$ so indeed, $*$ is a binary operation on the set $S^*$.
For another example, consider the set of rational numbers $\mathbb{Q}$ and the function $* : \mathbb{Q} \times \mathbb{Q} \to \mathbb{Q}$ defined for $x, y \in \mathbb{Q}$ by:
(2)In this instance, we have that $*$ is merely division on the set of rational numbers. Unfortunately, $*$ is not a binary operation since the pair $(a, 0) \in \mathbb{Q} \times \mathbb{Q}$ is such that $a * 0 = \frac{a}{0}$ which is undefined. Instead, we can define the binary operation above if we instead consider the set $\mathbb{Q} \setminus \{ 0 \}$.