Which of the following relations $f\colon \mathbb{Q} \to \mathbb{Q} \!\,$ define a mapping? In each case, supply a reason why $f$ is or is not a mapping.
So my understanding is that a mapping is a special relation is which an element $a$ in the set $A$ gives a unique element $b$ in the set $B$. I guess I don't really understand how to determine which relations are mapping and which are not.
An example given in my book: "Consider $f(\tfrac{p}{q})=p$. We know $\tfrac12=\tfrac24$ but is $f(\tfrac12)=1$ or $2$?. This relation can not be a mapping because it is not well-defined.". I don't really understand this: is it saying because there are so many equivalent fractions, the value of $p$ is not well defined? So in relation to my homework problem, is it safe to say that the functions are only mapping if they involve both $p$ and $q$ on the right hand side?
My attempt:
a. $f(\tfrac{p}{q})=\frac{p+1}{p-2}$
Not a mapping because it is not well defined. $$ \tfrac12=\tfrac24, f(\tfrac12)=\tfrac{2}{-1}, f(\tfrac36)=4 $$
b. $f(\tfrac{p}{q})=\frac{3p}{3q}$
Mapping $$ \tfrac12=\tfrac24, f(\tfrac12)=\tfrac36=f(\tfrac24)=\tfrac{6}{12} $$ c. $f(\tfrac{p}{q})=\frac{p+q}{q^2}$
Not a mapping because it is not well defined. $$ \tfrac12=\tfrac24, f(\tfrac12)=\tfrac34, f(\tfrac24)=\tfrac{6}{16} $$ d. $f(\tfrac{p}{q})=\frac{3p^2}{7q^2}-\frac{p}{q}$
Mapping $$ \tfrac12=\tfrac24, f(\tfrac12)=\tfrac{3}{(7\cdot4)}-\tfrac12=-\tfrac{11}{28}, f(\tfrac24)=\tfrac{3\cdot 4}{7\cdot 16}-\tfrac24=-\tfrac{11}{28} $$
The condition of well-definition of a function is defined as $$ x = y \implies f(x) = f(y) $$ and you can note that its inverse implication is $f(x) = f(y) \implies x = y$, which is the definition of a 1-1 function. So, to check whether a function is well-defined, in this case, you have to assume $$ \frac{p}{q} = \frac{p'}{q'} $$ and verify that their images are the same.