Notes 16 Sep 2026

3. Intervals

What an interval is, how it is written, and what the union and the intersection of two intervals are.

What an interval is

Definition

An interval represents a set of real numbers lying between two given real values.

Types

→ Open $(\;,\;)$: the endpoints are not included.

→ Half-open $(\;,\;]$ and $[\;,\;)$: one endpoint is included.

→ Closed $[\;,\;]$: both endpoints are included.

A square bracket means "this endpoint is in" and a round bracket, "this endpoint is out". On the line we draw a solid dot or a hollow one.

Notation

IntervalSet notationReal line
$(a,\, b)$ $\{a < x < b \mid x \in \mathbb{R}\}$ ab
$[a,\, b)$ $\{a \le x < b \mid x \in \mathbb{R}\}$ ab
$(a,\, b]$ $\{a < x \le b \mid x \in \mathbb{R}\}$ ab
$[a,\, b]$ $\{a \le x \le b \mid x \in \mathbb{R}\}$ ab

Example

IntervalSet notationReal line
$[0,\, 5)$ $\{0 \le x < 5 \mid x \in \mathbb{R}\}$ 05

The $0$ is in and the $5$ is out: $4{,}999\ldots$ belongs to it, $5$ does not.

Union and intersection

Union $\cup$

The union of two intervals $A$ and $B$ is made of the values that are in $A$ or in $B$.

Example

$$(-3,\, 5] \;\cup\; (-1,\, 7) = (-3,\, 7)$$
AB−3−157

The two intervals overlap, so the union is a single interval: it starts where the first one starts and ends where the second one ends.

Intersection $\cap$

The intersection of two intervals $A$ and $B$ is made of the values that are in $A$ and in $B$ at the same time.

Example

$$(-3,\, 5] \;\cap\; (-1,\, 7) = (-1,\, 5]$$
AB−3−157

The intersection is the stretch they share: it starts at the later start and ends at the earlier end. Each endpoint keeps the bracket it had in its own interval.