interval
Loosely speaking, an interval is a part of the real numbers that start at one number and stops at another number. For instance, all numbers greater that $1$ and smaller than $2$ form in interval. Another interval is formed by numbers greater or equal to $1$ and smaller than $2$. Thus, when talking about intervals, it is necessary to specify whether the endpoints are part of the interval or not. There are then four types of intervals with three different names: open, closed and halfopen. Let us next define these precisely.

1.
The open interval contains neither of the endpoints. If $a$ and $b$ are real numbers, then the open interval of numbers between $a$ and $b$ is written as $(a,b)$ and
$$ 
2.
The closed interval contains both endpoints. If $a$ and $b$ are real numbers, then the closed interval is written as $[a,b]$ and
$$[a,b]=\{x\in \mathbb{R}\mid a\le x\le b\}.$$ 
3.
A halfopen interval contains only one of the endpoints. If $a$ and $b$ are real numbers, the halfopen intervals $(a,b]$ and $[a,b)$ are defined as
$(a,b]$ $=$ $$ $\mathrm{\hspace{0.17em}}[a,b)$ $=$ $$
Note that this definition includes the empty set as an interval by, for example, taking the interval $(a,a)$ for any $a$.
An interval is a subset $S$ of a totally ordered set^{} $T$ with the property that whenever $x$ and $y$ are in $S$ and $$ then $z$ is in $S$. Applied to the real numbers, this encompasses open, closed, halfopen, halfinfinite, infinite, empty, and onepoint intervals. All the various different types of interval in $\mathbb{R}$ have this in common. Intervals in $\mathbb{R}$ are connected under the usual topology.
There is a standard way of graphically representing intervals on the real line using filled and empty circles. This is illustrated in the below figures:
The logic is here that a empty circle represent a point not belonging to the interval, while a filled circle represents a point belonging to the interval. For example, the first interval is an open interval.
Infinite intervals
If we allow either (or both) of $a$ and $b$ to be infinite, then we define
$(a,\mathrm{\infty})$  $=$  $\mathrm{\{}x\in \mathbb{R}\mid x>a\},$  
$\mathrm{\hspace{0.17em}}[a,\mathrm{\infty})$  $=$  $\mathrm{\{}x\in \mathbb{R}\mid x\ge a\},$  
$(\mathrm{\infty},a)$  $=$  $$  
$(\mathrm{\infty},a]$  $=$  $\mathrm{\{}x\in \mathbb{R}\mid x\le a\},$  
$(\mathrm{\infty},\mathrm{\infty})$  $=$  $\mathbb{R}.$ 
The graphical representation of infinite intervals is as follows:
Note on naming and notation
In [1, 2], an open interval is always called a segment, and a closed interval is called simply an interval. However, the above naming with open, closed, and halfopen interval seems to be more widely adopted. See e.g. [3, 4, 5]. To distinguish between $[a,b)$ and $(a,b]$, the former is sometimes called a right halfopen interval and the latter a left halfopen interval [6]. The notation $(a,b)$, $[a,b)$, $(a,b]$, $[a,b]$ seems to be standard. However, some authors (especially from the French school) use notation $]a,b[$, $[a,b[$, $]a,b]$, $[a,b]$ instead of the above (in the same ). Bourbaki, for example, uses this notation.
This entry contains content adapted from the Wikipedia article http://en.wikipedia.org/wiki/Interval_(mathematics)Interval (mathematics) as of November 10, 2006.
References
 1 W. Rudin, Principles of Mathematical Analysis, McGrawHill Inc., 1976.
 2 W. Rudin, Real and complex analysis, 3rd ed., McGrawHill Inc., 1987.
 3 R. Adams, Calculus, a complete course, AddisonWesley Publishers Ltd., 3rd ed., 1995.
 4 L. Råde, B. Westergren, Mathematics Handbook for Science and Engineering, Studentlitteratur, 1995.
 5 R.A. Silverman, Introductory Complex Analysis, Dover Publications, 1972.
 6 S. Igari, Real analysis  With an introduction to Wavelet Theory, American Mathematical Society, 1998.
The metapost code for the figures can be found http://aux.planetmath.org/files/objects/4446/here.
Title  interval 
Canonical name  Interval 
Date of creation  20130322 13:44:58 
Last modified on  20130322 13:44:58 
Owner  PrimeFan (13766) 
Last modified by  PrimeFan (13766) 
Numerical id  16 
Author  PrimeFan (13766) 
Entry type  Definition 
Classification  msc 12D99 
Classification  msc 2600 
Classification  msc 54C30 
Related topic  OpenSetsInMathbbRnContainsAnOpenRectangle 
Related topic  LineSegment 
Related topic  CircularSegment 
Defines  open interval 
Defines  closed interval 
Defines  halfopen interval 
Defines  right halfopen interval 
Defines  lefthalfopen interval 
Defines  segment 