Can anyone help me understand the notation of binary operator in the definition The definition goes, 

Let $S$ be a non-empty set. Then a function $f : S \times S \to S$ is
  a binary operator.

If I understand correctly, then it means $(a,b) \in S \times S \Rightarrow f(a,b)=a\text{*}b  \in S$ then $\text{*}$ is a binary operator. Alright fine. But that doesn't explain that why is $f$ a binary operator?
Let me explain my doubt more clearly, I'm having trouble with notations here,
If $f(a,b) = a \text{*} b$ where $\text{*}$ is a binary operator. And if I say that $f$ is the same binary operator as well, then $f= \text{*}$.
So I can write $f(a,b)= afb$ which seems to be absurd because $b$ is not the image of $a$ under $f$. The correct expression (according to me) should be $(a,b)f(a\text{*}b)$
So, $f$ can't be $\text{*}$. I don't understand how can a relation (function in this case) be equal to a binary operator
EDIT: What I'm trying to say is,
If $R$ is a relation, then if $b$ is the image of $a$ under $R$, then we write it as, $aRb$
By the definition in my textbook, $ * : S \times S \to S $ where $*$ is a binary operator $\Rightarrow$ function $\Rightarrow$ Relation.
Then $* (a,b) = a *b $ but this would be read as $b$ is image of $a$ under $*$. This notation seems to be used widely but somehow this doesn't feel correct.
 A: $*$ and $f$ are just different notations for the same underlying function. So
$a*b=c$
$f(a,b)=c$
$(a,b) \xrightarrow{f} c$
all have the same meaning. A binary operator simply maps each ordered pair of elements from $S$ (i.e. each member of $S \times S$) to an element of $S$.
A: It is called binary, because $f$ has two arguments. It acts on $2$-tuples.

So I can write $f(a,b)= afb$ which seems to be absurd because $b$ is
  not the image of $a$ under $f$.

$a f b$ is called infix notation. ($f a b$ is called prefix notation and $a b f$ postfix notation). All mean $f(a, b)$.
As usual, the interpretation of how you parse a given term depends on your context.
A: Perhaps it is better to use the viewpoint that some definitions can be relaxed, in some sense, and that notation changes depending on how we want to use an object.
Say that $\ast$ is a binary operator. Then we can take two elements, say $a, b \in S$, and combine them using $\ast$ to get $a\ast b\in S$. So a binary operator is something that takes two elements and combines them to give one.
Now define $f\colon S\times S \to S,\enspace f(x, y) = x\ast y$. Then $f$ takes two elements and combines them to give one, and hence $f$ is a binary operator by using the binary operation $\ast$, but we will use the notation $f(x, y)$ instead of $x\ast y$ to emphasise that we're using some function $f$, rather than just the binary operation $\ast$.
This is like being able to write $f(a) = b$ and $a \stackrel{f}{\mapsto} b$ interchangeably. Sometimes it's better to write the former, and sometimes it's better to write the latter, but they both mean the same thing.
A: When you write $afb$ then you seem to confuse the infix notation of a relation (of which a function is a special kind) and the infix notation of a binary operator (like $+$).
What the definition tries to say is that a binary operator on a set $S$ is a function $S \times S \to S.$ It doesn't however say anything about notation. But as you know, we seldom write $+(3,5) = 8,$ but instead $3+5 = 8.$ That does not mean that $+$ relate $3$ and $5$ like $3 < 5$ does.
If you want to use the infix notation of the function $+$ as a relation, then the correct way to write it is $(3,5)+8.$ But that's a really confusing way to write the identity that is normally written $3+5=8.$
