Bijective function between $\mathbb Q$ and $\mathbb Q\ge 0$ I have to prove that $\mathbb Q$ and $\mathbb Q \ge 0$ have the same cardinality. In order to do this I need to create bijective function between these sets. And I need help with this. I can't come up with any ideas. 
Thanks.
 A: Hint 1: There are obvious inclusions
$$\mathbb{N} \hookrightarrow \mathbb{Q}_{\ge 0} \hookrightarrow \mathbb{Q}$$
so if you can find an injection $\mathbb{Q} \to \mathbb{N}$ then you'll have proved that all three sets have the cardinality.
Hint 2: (hover mouse over to see)

 Every rational number has a unique expression in the form $$(-1)^i \cdot \dfrac{m}{n}$$ where $i \in \{ 0,1 \}$, $m \ge 0$, $n > 0$, and $p$ and $q$ are coprime. Consider encoding the triple $(i,m,n)$ as a natural number.

Hint 3: (hover mouse over to see)

 Encode $(i,m,n)$ as $2^i3^m5^n$ and prove this defines an injective function using a familiar fact about natural numbers.

A: EDIT:
I believe now I am able to fully solve your problem, that is explicitly show a bijection between $\mathbb {Q}_{\geq0}$ and $\mathbb{Q}$.
First we build a bijection $g:\mathbb {Q}_{\geq0} \to \mathbb{Q_{>0}}$, consider the set $A=\left\{{0, 1/2,1/3,1/4,...}\right\}$ of the sequence $(a_{n})=(0, 1/2,1/3,1/4,...)$ and let $g(x)=\begin{cases} a_{n+1}, & \mbox{if } x\mbox =a_n \\ x, & \mbox{if } \mbox x  \in \mathbb {Q}_{\geq0} \setminus A  \end{cases}$
Second, we build a bijection $f:\mathbb{Q_{>0} \to \mathbb{Q}}$, let $f(x)=\begin{cases} 1/x, & \mbox{if } x\geq 1, \ x \in \Bbb{Q} \\ -x+2, & \mbox {if } \mbox  x<1, \ x \in \Bbb{Q}  \end{cases}$
(Notice that since $\mathbb{Q}$ is a field any rational non-zero has an inverse that is also a rational and any non-zero rational can be expressed as the inverse of another rational, so we can assure that $f([1,+\infty)\cap \Bbb{Q})= (0,1]\cap \Bbb{Q}$)
Now $h=f \circ g$ is a bijection from $\mathbb {Q}_{\geq0}$ to $\mathbb{Q}$. Namely $$h(x) = \begin{cases} -a_{n+1}+2, & \mbox{if } \mbox x \in A \\ -x+2, & \mbox{if } \mbox x  \in (0,1)\setminus A,\  x \in \Bbb{Q} \\ 1/x, & \mbox x\in[1,+\infty), \ x \in \Bbb{Q}  \end{cases}$$

I'd use Bersntein-Schröeder Theorem.
By the inclusion $i(x)=x$ in $i:\mathbb{Q}_{\ge 0} \to \mathbb{Q}$ we have an injection from $\mathbb{Q}_{\ge 0}$ to $\mathbb{Q}$
Now, consider the injection $f:\mathbb{Q} \to \mathbb{Q}_{\ge 0}$, $f(x) = (1/x)$ if $x>1$, $f(x)=(1/-x) \cdot +1$ if $x<-1$, $f(x)=x+3$ if $\ -1\leq x\leq 1$. If you check case-by-case you'll see f is injective because the functions defined on each interval are injective and their images do not intersect. $f(1,+\infty)=(0,1)\cap\mathbb{Q}$, $f(-\infty,-1)=(1,2)\cap\mathbb{Q}$ and $f[-1,1]=[2,4]\cap\mathbb{Q}$.
Because we can define injections from $\mathbb{Q}$ to $\mathbb{Q}_{\ge 0}$ and from $\mathbb{Q}_{\ge_0}$ to $\mathbb{Q}$ by the Bersntein-Schröeder Theorem the sets have the same cardinality.
A: In the search for a bijection, consider an "infinite hotel" map where $2p\over q$ is mapped to $p\over q$ and $2p+1\over q$ is mapped to $-p\over q$.
Proving whether this mapping has surjective and injective properties should be fairly straightforward.  Note that $p\over q$ is not required to be in reduced form.
Edit:
Efforts to rectify the shortcomings of this mapping (such as "$\frac 68$ maps to $\frac 38$ but $\frac 34$ maps to $-\frac 14$") are coming to naught, but also consider the mapping defined by "winding" through the reduced rationals:
$$0\to 0,\frac 11\to \frac 11, \frac 12\to -\frac 11,\frac 13\to\frac 12, \frac 23\to -\frac 12,\frac 14\to \frac 13,\frac 34\to -\frac 13,\dots$$
This mapping should cover the required aspects of the question.
