Simply, an interval is a connected portion of the real line. Mathematically, a subset of the real line is called an interval if it contains at least two numbers and every number lying between them; that is, if and , then .
If we suppose that , we could have…
- an open interval: contains neither endpoint such that .
- a closed interval: contains both endpoints such that .
- a half-open interval: contains one endpoint such that .
These could be finite or infinite, or semi-infinite: For a real value , we could have or . This can be the same for . Note that there is no square bracket on , as infinity is not a number and so can never be included. All of those examples are semi-infinite.