Intervals as subsets of R

Intervals as subsets of R

An interval is a connected subset of numbers. Let a, b ∈ R and a < b.

Closed Interval: The interval containing the endpoints is also called the closed interval and is denoted by [a, b], and it is written as [a, b] = {x : a ≤ x ≤ b}.

Closed interval [a, b] can be described on a real number line as:

                                                         

 Open Interval: The set of real numbers {x : a < x < b} is called an open interval and is denoted by (a, b). Open intervals contain all the points between a and b belonging to (a, b), but a, b themselves do not belong to this interval.

This can be represented on the real number line as:

                                                        

 Semi-Open or Semi-Closed Interval: the intervals that are closed at one end and open at the other. These can be represented as:

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

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

These intervals can be represented on the real number line as shown in the below figure: