Difference between $x\in[0,1]$ and $x\in \{0,1\}$?

2.2k Views Asked by At

If I write $$ x\in [0,1] \tag 1 $$ does it mean $x$ could be ANY number between $0$ and $1$?

Is it correct to call $[0,1]$ a set? Or should I instead write $\{[0,1]\}$?

Q2:

If I instead have $$ x\in \{0,1\} \tag 2 $$ does it mean $x$ could be only $0$ OR $1$?

4

There are 4 best solutions below

2
On BEST ANSWER

If I write $x\in[0,1]$ does it mean that $x$ can be ANY number between $0$ and $1$?

Yes.

If $x\in [0,1]$ then $x$ can be any number between $0$ and $1$ (inclusive). Another way to write this is $0 \leq x \leq 1$.

A related notation is $(0,1)$, or sometimes in European writing $]0,1[$, which is the open interval excluding end points, i.e. $0<x < 1$.

Is it correct to call $[0,1]$ as set? Or should I instead write $\{[0,1]\}$?

Yes, $[0,1]$ is a set (it is also called an interval because it contains only consecutive numbers). The set is $[0,1] = \{x\in\mathbb R\mid 0 \leq x \leq 1\}.$

However, $\{[0,1]\}$ is also a set. A different set. They are different sets because $[0,1]$ has an infinite (uncountable) number of elements (i.e. any real number between $0$ and $1$), whereas $\{[0,1]\}$ has only one element, namely $[0,1]\in\{[0,1]\}$.

If I instead have $x\in\{0,1\}$ does it mean that $x$ could be only $0$ OR $1$?

Yes.

If $x\in\{0,1\}$ then $x$ is either $0$ or $x$ is $1$, and not for example $0.312$.

0
On

$x\in[0;1]$ means $0\le x\le 1$, any real number $x$ that satisfies this is true. For example:

$x^2-x\le 0\Leftrightarrow x(x-1)\le 0\Leftrightarrow x-1\le 0\le x\Leftrightarrow 0\le x\le 1$

$x\in\{0;1\}$ means $x=0$ or $x=1$ is true. For example:

$x^2-x=0\Leftrightarrow x(x-1)=0 \Leftrightarrow x\in\{0;1\}.$

2
On

Is it correct to call $[0,1]$ a set?

Yes, although it doesn't sound natural to me if you "call $[0,1]$ a set". I'd rather call it the closed interval. You can also write as $\{x|x\in[0,1]\}$ (trivial).

$x\in \{0,1\}$ means $x=1$ or $x=0$.

0
On

$[0,1]$ is (defined as) the set $\{ x \in \mathbb{R} : 0 \leq x \leq 1 \}$, i.e. it is a set that contains every real number between $0$ and $1$ (inclusive). It contains an uncountable number of elements.

$\{0,1\}$ is a set containing 2 elements: $0$, and $1$.