1
$\begingroup$

I am trying to come up with a well-defined map from $\mathbb{Q}$$\to$ $\mathbb{Z}$

i.e. find a map $f$ such that it maps $\frac{a}{b}$ $\epsilon$ $\mathbb{Q}$ to an integer in $\mathbb{Z}$. I tried a couple of things, and unfortunately, they did not work.

The one that I recently came up with is the given map:

$f$($\frac{a}{b}$)= $\frac{a+b}{gcd(a,b)}$

However, I just do not see how I can prove that this is indeed a well-defined map. All I am doing at this stage is randomly plugging numbers to see if this works.

Is this map well-defined? If yes, can someone help me prove it? If not, is there a well-defined map from $\mathbb{Q}$$\to$ $\mathbb{Z}$ $?$

$\endgroup$
6
  • 2
    $\begingroup$ How about $f(x)=0$ for $x\in\Bbb Q$? Or is there something else you want from your map? $\endgroup$ Jan 26 '19 at 7:55
  • $\begingroup$ Thought about it, but it seems too trivial to me. I am absolutely not saying that it cannot work, but I wanted to play with something non-trivial. $\endgroup$
    – Ufomammut
    Jan 26 '19 at 7:56
  • $\begingroup$ Can you at least decide what to you is trivial, and what isn't? $\endgroup$ Jan 26 '19 at 7:57
  • $\begingroup$ $f(\frac{5}{3})=\frac{5+3}{\gcd(5,3)}=f(\frac{1}{7})=\frac{1+7}{\gcd(1,7)}=8$. What do you want exactly? $\endgroup$ Jan 26 '19 at 7:57
  • $\begingroup$ @KonstantinosGaitanas you just took a random rational number and found the functional value. I wanted to prove that the mapping I came up with is "well-defined." $\endgroup$
    – Ufomammut
    Jan 26 '19 at 8:02
3
$\begingroup$

Yes, your map is well-defined. Suppose that $\frac ab=\frac cd$. Let $m=\frac a{\gcd(a,b)}$ and let $n=\frac b{\gcd(a,b)}$. Then there are integers $\alpha$ and $\beta$ such that $a=\alpha m$, $b=\alpha n$, $c=\beta m$, and $d=\beta n$. Then$$\frac{a+b}{\gcd(a,b)}=\frac{\alpha m+\alpha n}{\gcd(\alpha m,\alpha n)}=\frac{m+n}{\gcd(m,n)}$$and$$\frac{c+d}{\gcd(c,d)}=\frac{\beta m+\beta n}{\gcd(\beta m,\beta n)}=\frac{m+n}{\gcd(m,n)}.$$So$$\frac{a+b}{\gcd(a,b)}=\frac{c+d}{\gcd(c,d)}.$$

$\endgroup$
1
  • $\begingroup$ Thank you very much. This helped a lot. $\endgroup$
    – Ufomammut
    Jan 26 '19 at 8:16
2
$\begingroup$

Both the sets are countably infinite therefore such a mapping definately exists. One of many possible maps is as follows.
Let's represent the rational numbers as $$ s\frac{p}{q} $$ p,q belong to natural numbers and the GCD of p and q is 1 and s belongs to set {1,-1}. Then we define $$ f: Q\rightarrow Z $$ $$f(s\frac{p}{q})=s2^p3^q$$ Done! Note that this is one among many beautiful mappings the are many other ways.

$\endgroup$
5
  • $\begingroup$ How is this mapping well defined? For instance, if I have let's say s = 1, p = 1, and q = 2, then I have $\frac{1}{2}$ and if I take another rational number for which s = 1, p = 2, and q = 4 then I have $\frac{2}{4}$. And we know that the two rational numbers are equal. But if I know plug them in the map, the value I get are not equal, and hence the map is not "well-defined." $\endgroup$
    – Ufomammut
    Jan 26 '19 at 8:04
  • $\begingroup$ What do you mean by "well defined"? $\endgroup$
    – Karthik
    Jan 26 '19 at 8:05
  • $\begingroup$ Should be well defined now. $\endgroup$
    – Karthik
    Jan 26 '19 at 8:07
  • $\begingroup$ A correspondence $f$: $A$ $\to$ $B$ is called well-defined if for all a,b $\in$ A such that if a = b then f(a) = f(b). $\endgroup$
    – Ufomammut
    Jan 26 '19 at 8:08
  • $\begingroup$ Still well defined. Because we took the GCD of p and q to be 1. $\endgroup$
    – Karthik
    Jan 26 '19 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.