When is a relation a function in the sets $\mathbb{N},\:\mathbb{Z},\:\mathbb{R}$? I have recently started learning about relations and functions in a more formal way than I was used to and I am stuck on the following question:
Let $M = \{\mathbb{N},\:\mathbb{Z},\:\mathbb{R}\}$, $R_A = \{(x, 2x)\:|\:x \in A\}$ and $S_A = \{(2x, x)\:|\: x \in A\}$, where $R_A$ and $S_A$ are relations. For which $A \in M$ are $R_A$ and $S_A$ functions and for which $A$ is $R_A$ a bijective function?
Now, it is obvious that $R_A$ is a function for all $A \in M$, since for any $x$ in the natural, whole and real numbers $2x$ is always well-defined. However, when it comes to checking whether $R_A$ is also a bijective function for any $A \in M$ I am a bit confused. My first thought was that its only bijective for the real numbers, since $\frac{x}{2}$ won't always be a whole number for any $x \in \mathbb{N},\:\mathbb{Z}$, but after thinking about it I am not so sure anymore. Take $A = \mathbb{N}$ for example. Then $R_A$ would define a function $f: \mathbb{N} \to 2\mathbb{N},\:x \to 2x$. If you look at it like that, than of course this would also be bijective. Same for $A = \mathbb{Z}$.
With $S_A$ I'm also a bit confused for the same reason. Take $A = \mathbb{N}$ again, then $S_A$ defines the function $f: 2\mathbb{N} \to \mathbb{N},\:2x \to x$. This is again bijective if you define the $f$ like this, because half of every even number is again a whole number and every whole number will be an even number, when doubled. Am I thinking about these relations in the wrong way?
Another part of this exercise was the following:
For two relations $U \subseteq X \times Y$ and $V \subseteq Y \times Z$ their relational product $V \circ U \subseteq X \times Z$ is defined as $V \circ U = \{(x, z)\:|\:\exists y \in Y: (x, y) \in U\:\land\:(y, z) \in V\}$.
What does this now mean, if I look at $R_A \circ S_A$ and $S_A \circ R_A$ for all $A \in M$?
I know this is a lot, but I am stuck on this and I can't really make sense of what is right and where my thought process is wrong.
 A: The question is ambiguous. For each $A\in M$ it is true that both $R_A$ and $S_A$ are functions, in the sense that if $T$ is any of these relations, and $\langle x,y\rangle,\langle x,z\rangle\in T$, then $y=z$. Thus, each of these relations is a function whose domain is the domain of the relation. However, while $R_A$ is a function on $A$ for each $A\in M$, $S_A$ is a function on $A$ only for $A=\Bbb R$, as you realized.
In much the same vein, each of these relations is a bijection between its domain and its range, but $R_{\Bbb R}$ and $S_{\Bbb R}$ are the only ones of the six that are bijections from $A$ to $A$.
I don’t know how you’re supposed to interpret the question. If I had to guess, your first reactions were probably what was intended: $R_A$ is a function (with domain $A$) for each $A\in M$, but $S_A$ is a function (with domain $A$) only for $A=\Bbb R$, and $R_{\Bbb R}$ and $S_{\Bbb R}$ are the only bijections (from $A$ to $A$). But it I had to answer it without being able to discuss this difficulty with an instructor, I’d probably write something like what wrote above, together with my justifications for my various assertions.
By definition
$$S_A\circ R_A=\{\langle a,b\rangle\in A\times A:\exists c\in A(\langle a,c\rangle\in R_A)\text{ and }\langle c,b\rangle\in S_A\}\,,$$
so $\langle a,b\rangle\in S_A\circ R_A$ if and only if there is a $c\in A$ such that $c=2a$ and $c=2b$, i.e., if and only if $a=b$ and $2a\in A$. For each $A\in M$ and each $a\in A$ it is true that $2a\in A$, so
$$S_A\circ R_A=\{\langle a,a\rangle:a\in A\}\,,$$
the identity relation on $A$.
$R_A\circ S_A$ is a little trickier, but for now I’ll leave it to you to take a stab it it; start just as I did with $S_A\circ R_A$ by writing down the definition and working out what it really says in terms of elements of $a$. This time it will matter which $A\in M$ you’re considering.
