This question has been asked here several times but I still have some gaps in my knowledge. So $(0,1)$ is non-compact while $[0,1]$ is. The explanations usually involve creating a set $(\frac{1}{n},1)$. Here is what I do not understand.
Why can't we just construct a set like $\{(-1,2)\}$? It is an open set. It is a finite collection. I know Heine-Borel theorem and that it implies that a closed and bounded set is compact. So somehow, I figure $[0,1]$ is compact because it a $1$-cell.
The book I am using (baby Rudin, I understand, it is called) has not discussed any sequences as such. So what am I doing wrong by choosing a set like $(-2,2)$ or some such.
Compactness means: every open cover has a finite subcover. It does not suffice to check that there is one finite subcover! You have to check them all.
$(-1,2)$ has an open cover without finite subcover:
$$\bigcup_{n=1}^\infty (-1+1/n, 2-1/n) = (-1,2)$$
Thus $(-1,2)$ is not compact.
Alternatively,$(-1,2)$ is not closed (thus it can't be compact).
The interval $[0,1]$ is compact because it is closed and bounded (Heine-Borel).