An interval can be shown using set notation. For instance, the interval that includes all the numbers between 0 and 1, including both endpoints, is written 0 ≤ x ≤ 1, and read "the set of all x such that 0 is less than or equal to x and x is less than or equal to 1." The same interval with the endpoints excluded is written 0 < x < 1, where the less than symbol (<) has replaced the less than or equal to symbol (≤). Replacing only one or the other of the less than or equal to signs designates a half-open interval, such as 0 ≤ x < 1, which includes the endpoint 0 but not 1. A shorthand notation, specifying only the endpoints, is also used to designate intervals. In this notation, a square bracket is used to denote an included endpoint and a parenthesis is used to denote an excluded endpoint. For example, the closed interval 0 ≤ x ≤ 1 is written [0,1], while the open interval 0 <: x < 1 is written (0,1). Appropriate combinations indicate half-open intervals such as [0,1) corresponding to 0 ≤ x < 1.
An interval may be extremely large, in that one of its endpoints may be designated as being infinitely large. For instance, the set of numbers greater than 1 may be referred to as the interval 1 < x < ∞, or simply (1,∞). Notice that when an endpoint is infinite, the interval is assumed to be open on that end. For example the half-open interval corresponding to the nonnegative real numbers is [0,∞), and the half-open interval corresponding to the nonpositive real numbers is (-∞,0].