2

I'm looking for any ideas as to a function which maps $\mathbb{R} \to (-\infty, 0]$.

I considered $-|x|$ but realised that is not injective.

Wharf Rat
  • 274
  • Could you please clarify: Are you looking for 1. A surjective (onto) function, or just a mapping whose codomain is $(-\infty, 0]$, in which case $0$ need not be a value, or 2. A continuous function? (If $f:(-\infty, \infty) \to (-\infty, 0]$ is injective, you can't have both continuous and onto, though you can get either one alone.) – Andrew D. Hwang May 30 '16 at 00:38
  • 1
    This is part of a larger problem, I'm to prove that $\mathbb{R}$ has the same cardinality as $(-\infty, 0]$. I intend to use the Schröder-Bernstein Theorem and find an injection from $\mathbb{R}$ to $(-\infty, 0]$ and then injection on the way back. – Wharf Rat May 30 '16 at 00:52

2 Answers2

9

The exponential function $e^x$ maps $\mathbb{R}$ injectively into $(0, \infty)$. Can you adjust this function in some way?

D_S
  • 33,891
  • I didn't even think of that! Well I could take the negative of it, but that would still not include 0 in the co-domain. – Wharf Rat May 30 '16 at 00:02
  • 1
    @EkalAnwa You want an injection, not necessarily a bijection. – MathematicsStudent1122 May 30 '16 at 00:04
  • It does not equal 0 ever, and so the function does not map the real numbers to the negative real numbers including 0. – Wharf Rat May 30 '16 at 00:30
  • 2
    @EkalAnwa It looks like you want a bijection. Then use $f(x)=-e^x$ on $\mathbb{R}-\mathbb{N}$ and map $\mathbb{N}={1, 2, 3, \ldots }$ to $ {0} \cup { f(n) : n=1, 2, 3, \ldots }$. – Sungjin Kim May 30 '16 at 00:41
  • I see the error in my ways. By using $-e^x$ everything in the domain is mapped to the co-domain. It does not need to include 0, that is just what the co-domain contains, is this correct? Apologies for sounding crazy. – Wharf Rat May 30 '16 at 01:01
  • I quite honestly do not see the point of phrasing the question as a "hint" in this way when all is left to do is to multiply by $-1$. "What is $3 \times 7$? HINT: It is a two-digits number whose first digit is $2$ and second digit is $1$." – Najib Idrissi May 30 '16 at 09:02
  • in my experience, what I think of as an answer could very well be a vague hint to someone else. in any case, I was not sure if OP wanted an injection or a bijection, in which case there is still some work to be done. – D_S May 30 '16 at 15:47
2

Also very handy for such kind of questions is the function $x\mapsto\arctan x$. It maps $\mathbf R$ injectively into the open interval $(-\frac\pi2,\frac\pi2)$. Left composing with $x\mapsto ax+b$, for some real numbers $a$ and $b$ with $a\neq0$, allows you to map $\mathbf R$ injectively into whatever small subset of $\mathbf R$ that contains an open interval!

Johannes Huisman
  • 4,034
  • 12
  • 21