# Prove that $\mathbb{R}$ and the interval $(0, \infty)$ have the same cardinality.

Prove that Real Numbers and the interval $(0,\infty)$ have the same cardinality.

Attempt:

Consider the function $f(x) = e^x$.

The domain of this function is all real numbers.

The range of this function is from $0$ to infinity.

Let $e^a = e^b$.

Then $\ln(e^a) = \ln(e^b)$

Then $a\ln(e) = b\ln(e)$

This means that $a = b$

Hence, $f$ is injective.

Let $c > 0$

Then $e^{ln(c)} = c$

Since $c > 0, \ln(c)$ is defined, so $f(\ln(c)) = c$

Therefore, f is surjective.

Then f is bijective.

Hence, $\mathbb{R}$ and $(0, \infty)$ have the same cardinality.

• What is your question? If your question is "is my proof correct?", then the answer is "yes": the function $x \mapsto e^ x$ is indeed a bijection between $\mathbb{R}$ and the interval $(0, \infty)$. Hence these two sets have the same cardinality. – Rob Arthan Nov 19 '13 at 21:59

This is a valid proof. Essentially you have used the fact that the exponential function has a two-sided inverse (at least when the codomain is the positive reals), $\log$ (or $\ln$ if you prefer). Any function with a two-sided inverse is automatically a bijection. In fact, injectivity is precisely the same as having a left inverse and surjectivity is precisely the same as having a right inverse. Exercise: if a function $g$ has a left inverse $f$ and a right inverse $h$, then in fact $f = h$, so $g$ has a two-sided inverse.
• Indeed; the hard part of the proof has been done when you assume the existence of an inverse function $\ln(x)$. The above proof can basically be shortened to: Consider the function $f(x) = e^x$. This is known to be a bijection from $\mathbb{R} \to (0, \infty)$. Therefore, $\mathbb{R}$ and $(0, \infty)$ have the same cardinality. – augurar Jul 24 '15 at 20:12