Finding a function $f:\mathbb{Z} \to \mathbb{ Z}^+$ that is bijective; injective but not surjective Given an example, if possible, of a function $f:\mathbb{Z} \to \mathbb{Z}^+$ that meets the following requirements. If it is not possible, explain why.
a) bijective 
b) injective but not surjective
 A: This should be all possible.
A bijective function $f:\mathbb{Z}\to\mathbb{Z}^+$ is given by:
$f(0)=1, f(1)=2, f(-1)=3, f(2)=4, f(-2)=5$ 'and so on'.
It should be not that difficult to give an exact definition of $f$ that functions like the principle above.
An injective, but not surjective function, can be constructed like above, where you just start with $f(0)=10$ for example, and then $f(1)=11, f(-1)=12, f(2)=13, f(-2)=14$ and so on.
This function would not be surjective, since $1,2,3,\dotso, 10$ has no preimage. 
Note also, that this function is obtained by the first function, where you just add $10$.
If you want an explicit form, you might want to try to find that on your own first.
As I said, it should not be to difficult.
You might want to separate cases for $z\geq 0$ and $z<0$.
A: An example of a bijective function is, 
$$f(a)= \begin{cases} 
  2a-1  &\text{if $a>0$} \\
  2|a|   &\text{if $a \leq 0$}
\end{cases}$$
If you're considering that $0 \not\in \Bbb Z^+$ then you'll have to take the function, 
$$f(a)= \begin{cases} 
  2a  &\text{if $a>0$} \\
  2|a|+1   &\text{if $a \leq 0$}
\end{cases}$$
An example of a injective function is,
$$f(a)= \begin{cases} 
  2a+5  &\text{if $a>0$} \\
  2|a|+6   &\text{if $a \leq 0$}
\end{cases}$$
