Let $\star$ be a binary operation on the set $S=[0,1]$ defined to be $$\star : [0,1] \times [0,1] \to [0,1] $$
$$\text{where } a \star b = \text{min}\left(\frac12 a , \frac12 b\right) $$
From observation we can see that the set $S$ is closed under $\star$ and that each ordered pair $(a,b)$ is mapped to only one element in $S$.
For example, $1 \star 0.3 = 0.15$
But we also don't have every element in the codomain being hit. There doesn't exist any $(a,b) \in S^2$ such that $a \star b = 0.75$, for example.
Does this cause a problem at all? Is $\star$ still considered a binary operation on $S$? In class we were told all binary operations were surjective, but the textbook for the class states no such thing. And if it is not a problem, I am wondering if there are any more complicated or "elegant" examples. I am interested to see them if they are.
Thanks for any clarification on my confusion.
Best Answer
Binary operations do not need to be surjective. Here is a natural example:
Let $\mathbb N = \{1,2,3,\dots \}$. Then $+: \mathbb N \times \mathbb N \to \mathbb N$ is not surjective because $1$ is not in the image.
Here is another natural, more interesting example:
Let $\mathbb N' = \{2,3,\dots \}$. Then $\times: \mathbb N' \times \mathbb N' \to \mathbb N'$ is not surjective because the prime numbers are not in the image.