Is $(-\infty, 1]\cup [2,\infty)$ closed set Is $(-\infty, 1]\cup [2,\infty)$ closed set? I don't get it how to show, when a set contains $\infty$ or $-\infty$. Any help appreciated.
Also, is $(-\infty,1]$ closed? Thanks.
 A: A set is closed if and only if its complement is open. The complement of $(-\infty, 1]\cup [2,\infty)$ is $(1,2)$ which is open (in $\mathbb{R}$, but not in $\mathbb{R^2}$) since each point of the segment $(1,2)$ is an interior point of $(1,2)$. 
$$$$Alternatively you could go by the definition of a closed set (ie a set which contains all of its limit points). Clearly all the limit points of $(-\infty, 1]\cup [2,\infty)$ are contained in $(-\infty, 1]\cup [2,\infty)$. Hence $(-\infty, 1]\cup [2,\infty)$ is closed.
$$$$To address whether $(-\infty,1]$ is closed:$$$$
Again there are two alternatives. One is by noting that once again the complement of $(-\infty,1]$ (ie $(1,\infty)$) is an open set (in $\mathbb{R}$) since all its points lie in the interior of $(1,\infty)$. 
$$$$The second alternative is by checking if every limit point of $(-\infty,1]$ is contained within $(-\infty,1]$ or not. Note that a limit point $p$ of a set $E$ is defined as a point such that $every$ neighborhood of $p$ contains another point $q\ne p$ such that $q\in E$. Clearly all the limits points of $(-\infty,1]$ are the points $p\in (-\infty,1]$. Thus every limit point of $(-\infty,1]$ is contained in $(-\infty,1]$, hence making it closed.
A: A set is closed if its complement is open. 
The complement of $$ (-\infty, 1]\cup [2,\infty)$$ is the open interval (1,2) therefore $ (-\infty, 1]\cup [2,\infty)$ is closed.
Similarly you can show that  $ (-\infty, 1]$ is closed because its complement is the open interval $(1,\infty).$
