Binary relation vs Binary operator?

247 Views Asked by At

I'm confused about the difference between a binary relation and binary operator, a function is a specific example of a binary relation, a binary relation $R$ could be a function, and a binary operator will be a function, however we could define a function of two real arguments (or one tuple of two reals) and have the following $f(x,y)$ could be written in infix as:

$xfy$ but we can define a a binary relation using: $(x,y)fz$ the first being a number which may be equal to $z$ and the last being a proposition about whether the pair on the left is taken to the number $z$ using the function $f$.

I might see something like $aRb$ and have no idea whether this is a statement of truth of $R$ a a binary relation or the value of $R$ for the real numbers $a,b$.

How do we make a distinction between the two, as just having two numbers with the function name between them is unclear.

2

There are 2 best solutions below

0
On

A binary relation $R$ on a set $X$ is a subset of $X\times X$. If, for certain $a,b\in X$, we have $(a,b)\in R$ then we sometimes write $aRb$ and we say that $a$ is in relation with $b$.

A binary operation on $X$ is a function $f: X\times X\to X$. That means that it is a subset of $X\times X\times X$. As a consequence, we cannot write this as a relation on the set $X$. We can write it as a relation $R_{f}$ between $X\times X$ and $X$. A couple $((a,b),c)$ with $(a,b)\in X\times X$ and $c\in X$ is in this relation precisely when $c$ is the image of $(a,b)$ under the function $f$.

Take as a simple example $X=\mathbb{N}$ and consider $+$ as binary operator. Then $f(a,b)=a+b$ and $R_{f}=\left\{((a,b),c)\mid a,b,c\in\mathbb{N}: a+b=c\right\}$.

1
On

You’re right: without further context, $xRy$ could be either the statement that $(x, y)$ lies in the relation $R$ or the value of the function $R$ at the point $(x, y)$. Luckily, there almost always is further context:

  • First of all, when $f$ is a function, we never write $xfy$ instead of $f(x) = y$ even though functions are often introduced as special kinds of relations. If we really want to consider $f$ as a relation, we use some special notation like $R_f$ or $\Gamma_f$ to denote the graph of $f$ (which is just “$f$ but considered as a relation”).

  • Now normally, the surrounding text will tell you whether $R$ is a function or a relation. If you encounter $xRy$ afterwards, you know how to interpret it. (Because – by the point above – if $R$ is a function, it will not be notation for $R(x) = y$ but rather the value $R(x, y)$.)

  • If there is no earlier explanation of $R$, you can still use context. For example, if $xRy$ is used as a statement, $R$ has to be relation. On the other hand, if $xRy$ is used on one side of an equation, say $xRy = z$, then $R$ has to be a function because we don’t use equality for statements (the corresponding concept is usually denoted by $\iff$).

  • Finally, the infix notation is mostly used with symbols instead of letters. There are very strong conventions for which symbols are used as binary operators and which are used as binary relations. All the symbols for the basic arithmetic operations ($+, -, \cdot$ and so on) and their variations ($\oplus, \otimes$ and similar) are always binary operators. Symbols that resemble equality or unequality signs ($\equiv, \cong, \prec$) as well as $\sim$ are always relations.

Each of these heuristics alone will usually be sufficient to decide whether you’re faced with a relation or a function; together, they’re nearly infallible.