I think a better (and perhaps more correct) statement is the following: an infinite interval is closed if and only if it contains all of its endpoints. Conversely, an infinite interval is open if and only if it does not contain any endpoints.
Note that these two statements are not negations of one another, as exemplified by the infinite interval $( -\infty , +\infty ) = \mathbb{R}$. This interval has no endpoints, and so it does not contain any endpoints, and therefore it is open. Also, since it has no endpoints, it vacuously contains all of them, and therefore it is closed.
There are only 5 different kinds of infinite intervals:
- $(a , +\infty)$;
- $[a , +\infty)$;
- $(-\infty,a)$;
- $(-\infty,a]$; and
- $(-\infty , +\infty)$.
We can then easily check whether they are open or closed (or both!).