# Intervals as Subsets of R

Let a, b âˆˆ R and a < b. Then- Open interval does not contain the endpoints. On the number line, open intervals (a, b) are defined as {x: a < x < b}.

- Closed interval includes its endpoints. On the number line, closed intervals [a, b] are defined as {x: a x b}.

- We can also have intervals closed at one end and open at the other,

[a, b) = {a : a â‰¤ x < b} is an open interval from a to b, including a but excluding b.

- (a, b] = {a : a < x â‰¤ b} is an open interval from a to b, excluding a but including b.