How do we show that this particular function is not well defined? Let $J_5=\{0,1,2,3,4\}$. Then $J_5-\{0\}=\{1,2,3,4\}$. A student tries to define a function $R:J_5-\{0\}\to J_5-\{0\}$ as follows: For each $x\in J_5-\{0\}$,
$R(x)$ is the number $y$ so that $(xy)\bmod 5=1$.
Student B claims that $R$ is not so well defined. Who is right?


My answer. Consider $R(0)$, where $(0\cdot y)\bmod 5=1$. There is no corresponding value of $y$ for $x=0$, and therefore not all elements in the domain have an image in the co-domain, and therefore it is not well defined.


However my answer said "Consider $R(3). $Then $y$ can be $2$ or $7$. Since an element of the domain has $2$ images, the function is not well defined.
I agree with what my asnswer said, but will my attempt get me the marks too? 
My question would be "Will a function be considered a function if an element in the domain have an image in the co-domain?"
 A: Your answer should get you few marks or none: $0$ is not in the domain of $R$, so $R(0)$ isn’t even defined. The domain of $R$ is $\{1,2,3,4\}$, not $\{0,1,2,3,4\}$.
However, the other answer is also wrong: $R$ is stated to be a function from $J\setminus\{0\}$ to $J\setminus\{0\}$, and $7\notin J\setminus\{0\}$, so $7$ is not a possible value of the function.
Assuming that you’ve reported it accurately, the question is defective if the intended answer is that $R$ is not well-defined. If it says that $R:J\setminus\{0\}\to J\setminus\{0\}$ is defined by letting $R(x)$ be the number $y$ such that $xy\bmod 5=1$, then $R$ is well-defined, since it’s clearly to be understood that $y\in J\setminus\{0\}$, the stated co-domain of the function. (Of course it would be better to say so explicitly, but it shouldn’t be necessary to do so.) If the co-domain were not stated, or were given as $\Bbb Z$, say, then the function would not be well-defined, because $2$ and $7$ would both be possible values of $R(3)$.
A: The function $R$ is defined on $J_5 - \{0\}$, so you can not evaluate $R(0)$. In addition you can not define $R(3)=7$ since your co-domain is $J_5-\{0\}$. So, the only possible image is $2$. 
