Every closed interval is a closed set of the real line, but an interval that is a closed set need not be a closed interval. For example, intervals and are also closed sets in the real line. Intervals and are neither an open set nor a closed set. If one allows an endpoint in the closed side to be an infinity (such as ), the result will not be an interval, since it is not even a subset of the real numbers. Instead, the result can be seen as an interval in the extended real line, which occurs in measure theory, for example.
Every closed interval is a closed set of the real line, but an interval that is a closed set need not be a closed interval. For example, intervals and are also closed sets in the real line. Intervals and are neither an open set nor a closed set. If one allows an endpoint in the closed side to be an infinity (such as ), the result will not be an interval, since it is not even a subset of the real numbers. Instead, the result can be seen as an interval in the extended real line, which occurs in measure theory, for example.