# Bijective/Injective function mapping

I have a quick question about bijective functions.

Let's say I want a function that maps $$f:(0,1] \rightarrow [0,\infty)$$

I can say $$f(x) = 1- \frac1x$$ right?

And if I want an injective function that maps $f: [0,1] \rightarrow \mathbb{Z}$ , then is there no such function?

I just want to understand bijective and injective functions a bit better. Thanks

• That's right. :) Jul 25 '16 at 13:53
• $1 - \frac{1}{x}$ maps $(0,1]$ to $(-\infty, 0]$, but $\frac{1}{x} - 1$ will do. Jul 25 '16 at 13:55
• Injective simply means one-to-one. Since $[0,1]$ is uncountably infinite and $\Bbb Z$ is countably infinite, there's no way to find a one-to-one function from the former to the latter. You could find a one-to-one function in the other direction though. Jul 25 '16 at 15:07

Your first function map $(0,1]\longrightarrow (-\infty ,0]$ and is indeed bijective. Now, there is no injective function $[0,1]\to \mathbb Z$, otherwise, $[0,1]$ could be seen has a subset of $\mathbb Z$ wich is obviously impossible since $[0,1]$ is uncountable whereas $\mathbb Z$ is countable. But, there is an injective function $\mathbb Z\longrightarrow [0,1]$. Take just $f:\mathbb Z\longrightarrow [0,1]$ defined by $$f(k)=\begin{cases}\frac{1}{k}&k\neq 0\\0&k=0\end{cases}.$$ I hope that help.

• Thanks! On a note thats related to the subset part you mentioned, The set of positive integers Z+ is a subset of Z. But could I not have a surjective funtion that states: $$f(x)=\begin{cases}x&for all x \\-x&for all x\end{cases}.$$ And even though, Z+ is a subset of Z, I am able to map it, unlike the example earlier regarding mapping [0,1] -> Z. Jul 25 '16 at 13:59
• I didn't, but it's indeed true that $\mathbb Z^+$ is a subset of $\mathbb Z$...
– Surb
Jul 25 '16 at 14:00
• Sorry I was trying to figure out how to use math formatting and did not complete my comment. Jul 25 '16 at 14:03
• your function is not defined since each point has two range.
– Surb
Jul 25 '16 at 15:03

Your function $$f:x\mapsto 1- \frac 1 x$$ does not ap $(0,1]$ to $[0,\infty)$ but to $(-\infty,0]$. You could instead take for example $$g:x\mapsto \frac 1 x-1$$ which does the job. This indeed is a bijective function,i.e. both sets have the same cardinality. On the oter hand you won't find any bijective map between $\mathbb R$ and $\mathbb Z$, both sets don't have the same cardinality. You may find this theorem Schröder-Bernstein helpful. But you can find an injective map $h$ such that $$h:\mathbb Z \to [0,1]$$ or a surjective map $i:[0,1]\to \mathbb Z$.

• Could you say that, Bijective map: have the same cardinality. Injective map: the right hand side has a greater cardinality. Surjective map: left side has the greater cardinality. Jul 25 '16 at 14:16
• @t3hdaniel bijective map implies the same cardinality, injective map from $A\to B$ implies $|A|\leq |B|$ and surjective map from $A\to B$ implies $|B|\leq |A|$ Jul 25 '16 at 14:24
• Thank you, so I assume I can't do a surjective mapping from Z+ --> Z with the function: $$f(x)=\begin{cases}x&for all x \\-x&for all x\end{cases}.$$ Jul 25 '16 at 14:25
• @t3hdaniel you can! they have the same cardinality. Maybe you reached a point where it would be helpful to look for some definitions like countable, non-countable sets and so on, then you'll see that by taking the $0$ away you actually don't change the cardinality, take for example the mapping $g:n\to k \text { for }n=2k \vee n\to -k \text { for }n=2k+1$ Jul 25 '16 at 14:34
• @t3hdaniel your proposed function is indeed not well defined, just check mine, it is a bijection. Jul 25 '16 at 16:13