Tutorials › Topology (Undergraduate) › Endpoint Neighborhoods in Half-Open and Closed Intervals

The Subspace Topology · Tutorial 177 of 799

Endpoint Neighborhoods in Half-Open and Closed Intervals

Use one-sided relative neighborhoods to decide when subsets of closed and half-open intervals are open, and distinguish relative openness from openness in the real line.

Intermediate 10 min read

What You'll Learn

  • Describe neighborhoods at included endpoints of closed and half-open intervals.
  • Apply a local test for relative openness in an interval.
  • Decide when a relatively open subset is also open in the real line.
  • Identify why an excluded endpoint imposes no neighborhood condition.
  • Diagnose common errors about endpoint openness.

Why Endpoints Need a Relative Test

An interval can have open sets that are not open in the real line. The reason is that openness depends on which space supplies the neighborhoods. Near an included endpoint, an interval contains points on only one side, so a neighborhood in the interval is a clipped, one-sided version of an open interval in \(\mathbb{R}\). Near an endpoint that is not in the space, there is no point at which to impose an endpoint condition.

Throughout, \(a<b\) are real numbers and the intervals have the subspace topology inherited from \(\mathbb{R}\) with its standard topology. Thus, for an interval \(X\subseteq\mathbb{R}\), a set \(U\subseteq X\) is open in \(X\) when \(U=G\cap X\) for some open set \(G\) in \(\mathbb{R}\). We call such a set relatively open. An open neighborhood in \(X\) of \(x\in X\) is a relatively open set containing \(x\).

Definition: A relative neighborhood test at \(x\in X\) asks whether some open interval around \(x\), intersected with \(X\), lies inside the set being tested. In symbols, \(U\subseteq X\) is relatively open if and only if for every \(x\in U\) there is an \(\varepsilon>0\) such that \((x-\varepsilon,x+\varepsilon)\cap X\subseteq U\).

This test is local: it checks each point of \(U\) separately. The intersection with \(X\) is essential. It discards the parts of the real-line interval that are not in the space.

The Endpoint Neighborhoods

Theorem (Relative-neighborhood test): Let \(X\) be one of \([a,b]\), \([a,b)\), or \((a,b]\), with \(a<b\). A set \(U\subseteq X\) is open in \(X\) if and only if every \(x\in U\) has some \(\varepsilon>0\) for which \((x-\varepsilon,x+\varepsilon)\cap X\subseteq U\). At an included endpoint, these intersections are one-sided intervals; at an excluded endpoint there is no endpoint condition.

Proof. Suppose first that \(U\) is open in \(X\), so \(U=G\cap X\) for an open \(G\subseteq\mathbb{R}\). For any \(x\in U\), we have \(x\in G\). Since \(G\) is open in \(\mathbb{R}\), there is an \(\varepsilon>0\) with \((x-\varepsilon,x+\varepsilon)\subseteq G\). Intersecting with \(X\) gives \((x-\varepsilon,x+\varepsilon)\cap X\subseteq G\cap X=U\).

Conversely, suppose the stated condition holds at every \(x\in U\). For each such \(x\), choose an interval \((x-\varepsilon_x,x+\varepsilon_x)\) whose intersection with \(X\) is contained in \(U\). Then \[ U=\bigcup_{x\in U}\bigl((x-\varepsilon_x,x+\varepsilon_x)\cap X\bigr). \] The right side is a union of sets open in the subspace topology, so \(U\) is open in \(X\). If \(U=\varnothing\), the union is empty and is open as well. This proves both directions, including the empty-set case. \(\square\)

At an included endpoint, the test takes a particularly simple form. For \(0<\varepsilon\le b-a\), the relevant intersections are \[ (a-\varepsilon,a+\varepsilon)\cap[a,b]=[a,a+\varepsilon),\qquad (b-\varepsilon,b+\varepsilon)\cap[a,b]=(b-\varepsilon,b]. \] The same formulas apply at \(a\) in \([a,b)\) and at \(b\) in \((a,b]\). The left endpoint of \([a,b)\) therefore has a right-sided neighborhood, while its missing endpoint \(b\) is not a point of the space. In \((a,b]\), it is \(b\) that has a left-sided neighborhood, and \(a\) is absent.

More explicitly, a relatively open subset of \([a,b]\) that contains \(a\) must contain \([a,a+\varepsilon)\) for some \(\varepsilon>0\); if it contains \(b\), it must contain \((b-\varepsilon,b]\) for some \(\varepsilon>0\). For \([a,b)\), only the condition at an included endpoint \(a\) applies; for \((a,b]\), only the condition at \(b\) applies. At every other point, use the interval-intersection test in the theorem. These are requirements for some positive \(\varepsilon\), not for every positive \(\varepsilon\).

Worked Example: A Relatively Open Set in a Closed Interval

Let \(X=[0,5]\) and \(U=[0,2)\cup(3,5]\). Decide whether \(U\) is open in \(X\), and whether it is open in \(\mathbb{R}\).

To test relative openness, use the open set \(G=(-1,2)\cup(3,6)\) in \(\mathbb{R}\). Intersecting each interval with \(X\) gives \[ (-1,2)\cap[0,5]=[0,2),\qquad (3,6)\cap[0,5]=(3,5]. \] Therefore \(G\cap X=U\), so \(U\) is open in \(X\).

The endpoint test gives the same conclusion locally. At \(0\), choosing \(\varepsilon=1\) gives \([0,1)\subseteq U\). At \(5\), choosing \(\varepsilon=1\) gives \((4,5]\subseteq U\). The other points of \(U\) have neighborhoods supplied by the displayed open intervals making up \(G\).

But \(U\) is not open in \(\mathbb{R}\): it contains \(0\), and every open interval around \(0\) in \(\mathbb{R}\) contains negative numbers, which are not in \(U\). Thus relative openness permits an included endpoint even though real-line openness does not.

Worked Example: The Missing Endpoint of a Half-Open Interval

Let \(X=[-2,3)\) and \(U=[-2,0)\cup(1,3)\). Check relative openness and examine what happens near \(3\).

Set \(G=(-3,0)\cup(1,4)\), which is open in \(\mathbb{R}\). Direct intersection gives \[ (-3,0)\cap[-2,3)=[-2,0),\qquad (1,4)\cap[-2,3)=(1,3). \] Hence \(G\cap X=U\), so \(U\) is open in \(X\). At the included endpoint \(-2\), \(\varepsilon=1\) gives \([-2,-1)\subseteq U\).

The number \(3\) is not in \(X\), so it is not in \(U\) and no neighborhood condition is tested at \(3\). Points of \(U\) can lie arbitrarily close to \(3\): for example, \(29/10\in(1,3)\), since \(1<29/10<3\). This causes no failure of relative openness. The local test applies to each point actually in \(U\), not to a missing endpoint.

Check: the representation \(U=G\cap X\) uses open intervals in \(\mathbb{R}\), and its intersections are exactly \([-2,0)\) and \((1,3)\), with neither endpoint calculation adding \(3\).

Worked Example: A Set That Fails at an Included Endpoint

Let \(X=(1,6]\), and compare \(V=(1,3)\cup(5,6]\) with \(W=(1,3)\cup\{6\}\).

For \(V\), take \(G=(1,3)\cup(5,7)\). Then \[ (1,3)\cap(1,6]=(1,3),\qquad (5,7)\cap(1,6]=(5,6], \] so \(G\cap X=V\), and \(V\) is relatively open. In particular, its included endpoint \(6\) comes with the segment \((5,6]\).

The set \(W\) is not relatively open. For every \(\varepsilon>0\), let \(t=\min(\varepsilon,1)/2\). Then \(0<t<\varepsilon\) and \(0<t\le 1/2\). The point \(6-t\) belongs to \((6-\varepsilon,6+\varepsilon)\cap X\), but \(11/2\le 6-t<6\), so \(6-t\notin(1,3)\) and \(6-t\ne6\). Thus every relative neighborhood of \(6\) contains a point not in \(W\), contradicting the required neighborhood test.

Check: the endpoint \(6\) belongs to \(W\), but \(W\) contains no interval of the form \((6-\delta,6]\) for any \(\delta>0\). It fails precisely the condition for an included right endpoint.

Relative Openness Versus Openness in the Real Line

Proposition: Suppose \(a<b\) and \(U\) is a subset of the indicated interval. For \(X=[a,b]\), \(U\) is open in \(\mathbb{R}\) if and only if it is relatively open in \(X\) and contains neither \(a\) nor \(b\). For \(X=[a,b)\), the corresponding condition is that \(U\) is relatively open and \(a\notin U\). For \(X=(a,b]\), it is that \(U\) is relatively open and \(b\notin U\).

Proof. If \(U\) is open in \(\mathbb{R}\), then it is relatively open in \(X\), since \(U=U\cap X\). It cannot contain an endpoint of \(X\) that is included in \(X\): every real-line open interval around that endpoint also contains points outside \(X\), and hence outside \(U\).

For the converse, suppose \(U\) is relatively open and excludes every included endpoint of \(X\). Every \(x\in U\) then lies strictly between \(a\) and \(b\). By the relative-neighborhood test, some \(\varepsilon>0\) satisfies \((x-\varepsilon,x+\varepsilon)\cap X\subseteq U\). Choose \[ \delta=\min\left(\frac{\varepsilon}{2},\frac{x-a}{2},\frac{b-x}{2}\right)>0. \] Then \((x-\delta,x+\delta)\subseteq(a,b)\subseteq X\), and also \((x-\delta,x+\delta)\subseteq U\). Thus every point of \(U\) has a real-line open interval contained in \(U\), so \(U\) is open in \(\mathbb{R}\). For \(U=\varnothing\), the conclusion holds directly. This proves the stated criteria for all three intervals. \(\square\)

The proposition makes the distinction precise. A relatively open set can reach an included endpoint, provided it contains a one-sided segment there. A set open in \(\mathbb{R}\) cannot reach an included endpoint of any of these bounded intervals. The excluded endpoint imposes no restriction because it is not a point of the subspace.

These statements assume \(a<b\). In the degenerate case \(a=b\), the interval \([a,a]\) consists of the single point \(a\), and its subspace topology has just the open sets \(\varnothing\) and \(\{a\}\). Both \([a,a)\) and \((a,a]\) are empty. In particular, \(\{a\}\) is relatively open in \([a,a]\) but is not open in \(\mathbb{R}\).

A Common Endpoint Mistake

Common pitfall. The claim “\([0,1)\) is not open because it contains \(0\)” uses the wrong space for the neighborhood test. It is correct that \([0,1)\) is not open in \(\mathbb{R}\), but it is open in \(X=[0,2]\). Indeed, \((-1,1)\) is open in \(\mathbb{R}\), and \[ (-1,1)\cap[0,2]=[0,1). \] At \(0\), the relative neighborhood \([0,1/2)\) lies inside the set. The correction is to name the space first, then intersect real-line neighborhoods with that space. For a relative test, points outside \(X\) do not need to be included.

One practical reason to keep this distinction is that the same subset can have different openness answers depending on its ambient space. Endpoint calculations make that dependence explicit instead of relying on a sketch or on the appearance of brackets in interval notation.

Check Your Understanding

For each question, identify the space before applying the neighborhood test.

  1. In \(X=[1,6]\), describe the form of a relative neighborhood of \(1\) and of \(6\), using an \(\varepsilon\) with \(0<\varepsilon\le5\).
  2. Is \([2,4)\) open in \([2,7)\)? Give an open subset of \(\mathbb{R}\) whose intersection with \([2,7)\) is the set in question, or explain why none exists.
  3. For \(X=(0,5]\), does a relatively open subset containing \(5\) have to contain \((5-\varepsilon,5]\) for some \(\varepsilon>0\)? Does it have to contain \(0\)?
  4. In \(X=[-1,3]\), test whether \([-1,1)\cup(2,3]\) is relatively open. Is it open in \(\mathbb{R}\)?
  5. In \(X=[0,4]\), explain why \(\{0\}\) is not relatively open, even though \(0\) is an included endpoint.