Is there a bijection between $\mathbb{Q}$ and $\mathbb{Q}_{>0}$? 
Is there a bijection between $\mathbb{Q}$ and $\mathbb{Q}_{>0}$?

For $\mathbb{R}$, we have the exponential function. Is there also a bijection $f: \mathbb{Q} \to \mathbb{Q}_{>0}$ or to $\mathbb{Q}_{\geq 0}$?
 A: The function $f:\mathbb Q\to\mathbb Q_{\gt0}$ defined by $f(x)=x+1$ if $x\geqslant0$ and $f(x)=1/(1-x)$ if $x\lt0$, sends $0$ to $1$ and sends bijectively $\mathbb Q_{\gt0}$ to $\mathbb Q_{\gt1}$ and $\mathbb Q_{\lt0}$ to $\mathbb Q\cap(0,1)$. Thus, $f$ is bijective.
For a bijection $g:\mathbb Q_{\gt0}\to\mathbb Q_{\geqslant0}$, consider $g(x)=x-1$ if $x$ is an integer and $g(x)=x$ otherwise. 
For a bijection from $\mathbb Q$ to $\mathbb Q_{\geqslant0}$, consider $h=g\circ f$, that is, $h(x)=1/(1-x)$ if $x$ is negative, $h(x)=x$ if $x$ is a nonnegative integer and $h(x)=x+1$ if $x$ is positive and not an integer.
A: EDIT: If $x\ge0$, then $f(x)=x+[x]$; if $x\lt0$, then $f(x)=x-3[x]-1$. Here, $[x]$ is the integer part of $x$, the largest integer not exceeding $x$ (also known as the "floor" of $x$). 
The following, incorrect answer is kept so as not to make the comments look odd: 
If $x=a/b$, $b\gt0$, let $f(x)=a/(2b+1)$ if $a\ge0$, $f(x)=(2|a|-1)/2b$ if $a\lt0$. 
A: The Stern-Brocot tree $\mathcal T$ is an infinite binary search tree containing all positive rationals. It's easy to create its counterpart $\mathcal T^{-}$ for all negative rationals.
Create a tree with 0 as root, $\mathcal T^{-}$ as the left subtree and $\mathcal T^{+}$ as the right subtree. This is also an infinite binary search tree, which is trivially isomorphic to $\mathcal T$, so there's an order isomorphism between $\mathbb Q^{+}$ and $\mathbb Q$.
A: A bijection from $\mathbb N$ to $\mathbb Q_{\ge0}$ :


*

*$f(0)=0$

*$f(1)=1$

*$f(2n)=f(n)+1$

*$f(2n+1) = \frac{1}{f(2n)}$


You obtain $0,1,2,\frac{1}{2},3,\frac{1}{3},\frac{3}{2},\frac{2}{3},4,\frac{1}{4},\frac{4}{3},\frac{3}{4},\frac{5}{2},\frac{2}{5},\dots$
A bijection from $\mathbb N$ to $\mathbb Q$ :


*

*$g(0)=0$

*$g(2n+1)=f(n+1)$

*$g(2n+2)=-f(n+1)$


You obtain $0,1,-1,2,-2,\frac{1}{2},-\frac{1}{2},3,-3,\dots$
Compose those two bijections : $f \circ g^{-1}$ to obtain a bijection from $\mathbb Q$ to $\mathbb Q_{\ge 0}$
Or consider $x\mapsto f(g^{-1}(x)+1)$ to obtain a bijection from $\mathbb Q$ to $\mathbb Q_{>0}$
A: It is well known that there is an injection of $\mathbb Q$ into $\mathbb N$ (Cantor diagonal argument) while the inclusion $\mathbb N \subset \mathbb Q_+ \subset \mathbb Q$ is an injection in the opposite direction. By Cantor-Bernstein theorem there exist bijection between the three sets (i.e. all three sets have the same cardinality).
