1

$f : \mathbb{N} \cup \{0{}\} \to \mathbb{Z}$

$f({}n) = \frac{n{}}{2}$ if $n$ is even $f(n) = -\frac{n{}+1}{2}$ if $n{}$ is odd

I want to prove that $f$ is a bijection, and find $f^{-1}$.

Now I can see that $f$ is a bijection because $n = 2k,k \in \mathbb{Z}$ is assigned to be an odd number in $\mathbb{Z}$ from $f$, and all odd from $f$ get assigned to the negatives. So I can see this is counting all integers one for one.

I am however, unsure of how I can prove it in a Mathematically rigorous way, any tips would be lovely!

Katie
  • 826

1 Answers1

1

Now I can see that f is a bijection because $n=2k$,$k \in \mathbb{Z}$ is assigned to be an odd number in $\mathbb{Z}$ from f

This isn't true. Consider $k = 2^{3} = 8$. Then $f(8) = 8$.

To prove a bijection, you have to show injection and surjection properties. If $f$ is injective, then $f(a) = f(b) \implies a = b$. There are two parts to the function $f$. Show both to be injective.

For surjective, take $x \in \mathbb{Z}$. Is there an $n$ such that $f(n) = x$? What happens if $n < 0$? What happens if $n \geq 0$? Apply your cases like that.

ml0105
  • 14,674