Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to show that $|\mathbb{Z}|=|\mathbb{N}|$. FWIW, I think again that I must define a injective and surjective function from $\mathbb{Z}$ to $\mathbb{N}$. But how? Is there any proof as to how could one define such functions and based on what information?

share|cite|improve this question
$\mathbb{N} = \text{odd}+\text{even}$ and $\mathbb{Z}=\text{negative} + \text{positive}$ – Cortizol Feb 24 '13 at 13:24
"Is there any proof as to how could one define such functions and based on what information?" You made my brain hurt with this sentence... – TonyK Feb 24 '13 at 13:25
up vote 3 down vote accepted

Since you are to show that $\mathbb{N}$ and $\mathbb{Z}$ have the same cardinality, you're correct: you need to find a bijection (hence both injective and surjective) between $\mathbb Z $ and $\mathbb N$

One bijection between $\mathbb{Z}$ and $\mathbb{N}$ is the function $f: \mathbb{Z} \to \mathbb{N}$, defined by:

$$f(k) = \begin{cases} \\ \\ 2k & \quad k \in \mathbb Z,\; k>0 \\ \\ -2k + 1 & \quad k\in \mathbb Z, \; k \leq 0 \\ \\ \end{cases} $$

In words, you are simply mapping positive integers to positive even integers, and non-positive integers to positive odd integers.

share|cite|improve this answer
You kill the poor problem. + and + for Gigili – Babak S. Feb 24 '13 at 16:13

You can do something like this, $f\colon\mathbb{Z} \to \mathbb{N}$. By $f(0) = 0,\; f(1) = 1, \;f(-1) = 2,\; f(2) = 3,\; f(-2) = 4,\;$ etc. This gives a bijection from $\mathbb{Z}$ to $\mathbb{N}$.

I leave it as an exercise for the reader to give an explicit formula for the function $f$.

share|cite|improve this answer
Oliver, I simply put your answer (the $f(x)'s$) enclosed in $$ signs. Feel free to roll back to your original post if you are offended by my edit. – amWhy Feb 24 '13 at 15:09
Haha no problem! it looks way better now :) – Oliver E. Anderson Feb 25 '13 at 8:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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