How's this done?
Also, I am wondering, are all subsets of $\mathbb{R}$ cardinally equivalent to each other? If not, why not?
How's this done?
Also, I am wondering, are all subsets of $\mathbb{R}$ cardinally equivalent to each other? If not, why not?
Consider $f:[0,1)\to(0,1)$ such that $$ f(x)=\begin{cases} 1-\frac{1}{n+1} & \text{if $x=1-1/n$ for some natural number $n$}\\ x &\text{otherwise} \end{cases} $$ You can prove that $f$ is bijection. So two sets have same cardinality.
More generally, if $X$ is infinite and $x\in X$ then there is a bijection between $X$ and $X\setminus \{x\}$.
Let $x_0=x,x_1,...\in X$ be an infinite sequence of distinct elements of $X$. Then define $$f(x)=\begin{cases} x_{n+1} & \text{if } x=x_n\\ x &\text{otherwise} \end{cases}$$
This is the same as totori's answer, he just picks a specific sequence $x_n=1-\frac{1}{n}$. Shuchang's answer is a variation, since his map goes the other direction, but he is basically using $x_0=0, x_n=2^{-n}\text{ otherwise}$.
Define a mapping $f$ from $(0,1)$ to $[0,1)$ by $$f(x)=\left\{\begin{matrix}0,&x=\frac12\\ \frac1{2^n},&x=\frac1{2^{n+1}}\\ x,&\text{otherwise}\end{matrix}\right.$$ The mapping $f$ is bijective, which implies $\text{card}(0,1)=\text{card}[0,1)$.
The question of bijections have been answered.
The second question, however, has gone mainly unnoticed. The answer is no. Almost trivially, $\varnothing$ is a subset of $\Bbb R$ and it is certainly not of the same cardinality as $\Bbb R$ itself.
Moreover, there are finite sets, and countably infinite sets which are also of different cardinalities from one another.
One can ask, if so, if $A\subseteq\Bbb R$ is uncountable, is it necessarily of the same cardinality as $\Bbb R$? The positive answer to this question is known as "The Continuum Hypothesis", but the answer is that there is no provable answer. It is consistent with the usual axioms of mathematics that the answer is "yes", and it is consistent that the answer is "no".
Namely, there are universes of set theory in which the answer is positive, and no uncountable set of real numbers has a smaller cardinality than $\Bbb R$; but there are universes of set theory where the answer is no and there is an example for such set. But do note that these example are not sets which can be explicitly written by a formula, we can simply prove they exist in one way or another from set theoretical assumptions.