Skip to main content
Home
Pimath

Menu EN

  • Home
  • 🌐 EN
    • 🇮🇹 IT
    • 🇪🇸 ES
    • 🇵🇹 PT
    • 🇫🇷 FR
    • 🇷🇴 RO
  • 👨‍🎓 About Me
  • 🚧 Theory & Exercises
User account menu
  • Log in

Breadcrumb

  1. Home

Intervals and Neighborhoods: 20 Step-by-Step Practice Problems

Profile picture for user Pimath
By Pimath, 29 May, 2026

We present a collection of 20 worked exercises on intervals and neighborhoods, designed to build a rigorous, step-by-step understanding of the structure of the main subsets of the real line.

The exercises deal with open, closed, and half-open intervals, half-lines, membership in intervals, set-builder notation, and a first look at geometric interpretations on the real line.


Exercise 1 — level ★☆☆☆☆

Write the following interval in set-builder notation:

\[ (2,7) \]

Result

\[ (2,7)=\{x\in\mathbb{R}\mid 2<x<7\} \]

Solution

The interval:

\[ (2,7) \]

is an open interval.

The round brackets indicate that the endpoints \(2\) and \(7\) do not belong to the interval.

Hence:

\[ 2\notin(2,7), \qquad 7\notin(2,7). \]

The interval does, however, contain every real number strictly between \(2\) and \(7\).

Saying that a real number \(x\) belongs to \((2,7)\) therefore amounts to imposing the two conditions simultaneously:

\[ x>2 \]

and

\[ x<7. \]

Writing the two conditions compactly, we obtain:

\[ 2<x<7 \]

Therefore:

\[ (2,7)=\{x\in\mathbb{R}\mid 2<x<7\} \]


Exercise 2 — level ★☆☆☆☆

Write the following interval in set-builder notation:

\[ [-3,5] \]

Result

\[ [-3,5]=\{x\in\mathbb{R}\mid -3\leq x\leq 5\} \]

Solution

The interval:

\[ [-3,5] \]

is a closed interval.

The square brackets indicate that both endpoints belong to the interval.

Hence:

\[ -3\in[-3,5], \qquad 5\in[-3,5]. \]

Besides the endpoints, the interval contains every real number between \(-3\) and \(5\).

A real number \(x\) therefore belongs to \([-3,5]\) if it is greater than or equal to \(-3\) and less than or equal to \(5\).

In symbols:

\[ -3\leq x\leq 5 \]

Consequently:

\[ [-3,5]=\{x\in\mathbb{R}\mid -3\leq x\leq 5\} \]


Exercise 3 — level ★☆☆☆☆

Express the following set in interval notation:

\[ \{x\in\mathbb{R}\mid 1\leq x<6\}. \]

Result

\[ [1,6) \qquad \text{or} \qquad [1,6[ \]

Solution

Consider the set:

\[ \{x\in\mathbb{R}\mid 1\leq x<6\} \]

The condition:

\[ 1\leq x \]

means that \(x\) may equal \(1\) or be greater than \(1\).

Hence the left endpoint \(1\) belongs to the set.

For this reason, a square bracket is used on the left:

\[ [1,\ldots \]

The condition:

\[ x<6 \]

means, on the other hand, that \(x\) must be strictly less than \(6\).

Hence the number \(6\) does not belong to the set.

For this reason, a round bracket is used on the right:

\[ \ldots,6) \]

Therefore the given set is:

\[ [1,6) \]

In the alternative notation, widely used in mathematical analysis, the same interval is written:

\[ [1,6[ \]


Exercise 4 — level ★☆☆☆☆

Determine whether the number \(4\) belongs to the interval:

\[ (4,9] \]

Result

\[ 4\notin(4,9] \]

Solution

The interval:

\[ (4,9] \]

is half-open.

The round bracket on the left indicates that the left endpoint \(4\) does not belong to the interval.

The square bracket on the right, by contrast, indicates that the right endpoint \(9\) does belong to the interval.

In set-builder notation:

\[ (4,9]=\{x\in\mathbb{R}\mid 4<x\leq 9\}. \]

To check whether \(4\) belongs to the interval, we substitute \(x=4\) into the condition:

\[ 4<x\leq 9. \]

We obtain:

\[ 4<4\leq 9. \]

The inequality:

\[ 4<4 \]

is false, since no real number is strictly less than itself.

Therefore \(4\) does not satisfy the membership condition.

Hence:

\[ 4\notin(4,9] \]


Exercise 5 — level ★★☆☆☆

Write the following half-line in set-builder notation:

\[ [-2,+\infty) \]

Result

\[ [-2,+\infty)=\{x\in\mathbb{R}\mid x\geq -2\} \]

Solution

The interval:

\[ [-2,+\infty) \]

is a half-line unbounded to the right.

This means that it contains every real number greater than or equal to \(-2\).

The square bracket at \(-2\) indicates that this finite endpoint belongs to the interval.

Hence:

\[ -2\in[-2,+\infty) \]

The symbol \(+\infty\), on the other hand, does not represent a real number.

For this reason \(+\infty\) cannot be included in the interval by means of a square bracket.

The membership condition is therefore:

\[ x\geq -2 \]

Therefore:

\[ [-2,+\infty)=\{x\in\mathbb{R}\mid x\geq -2\} \]


Exercise 6 — level ★★☆☆☆

Find the center, length, and radius of the interval:

\[ [3,11] \]

Result

\[ \text{center}=7,\qquad \text{length}=8,\qquad \text{radius}=4 \]

Solution

Consider the interval:

\[ [3,11]. \]

Its endpoints are:

\[ a=3,\qquad b=11. \]

The length, also called the width of the interval, is the distance between the upper and lower endpoints.

Hence:

\[ b-a=11-3=8. \]

Therefore:

\[ \text{length}=8. \]

The center of the interval is the midpoint of its endpoints.

It is computed using the formula:

\[ \frac{a+b}{2}. \]

Substituting \(a=3\) and \(b=11\), we obtain:

\[ \frac{3+11}{2}=\frac{14}{2}=7. \]

Hence:

\[ \text{center}=7. \]

The radius is the distance from the center to either endpoint.

Equivalently, it is half the length:

\[ \frac{b-a}{2}. \]

Hence:

\[ \frac{11-3}{2}=\frac{8}{2}=4. \]

Therefore:

\[ \text{radius}=4. \]


Exercise 7 — level ★★☆☆☆

Express, in interval notation, the set of real numbers satisfying:

\[ |x-2|<5 \]

Result

\[ (-3,7) \qquad \text{or} \qquad ]-3,7[ \]

Solution

The expression:

\[ |x-2| \]

represents the distance between the real number \(x\) and the point \(2\) on the real line.

The inequality:

\[ |x-2|<5 \]

therefore means that \(x\) must lie at a distance less than \(5\) from the point \(2\).

In terms of an open neighborhood, we are looking for all the points of the neighborhood centered at \(2\) with radius \(5\).

We use the property:

\[ |A|<r \iff -r<A<r, \qquad r>0. \]

In our case:

\[ A=x-2,\qquad r=5. \]

Hence:

\[ -5<x-2<5. \]

We add \(2\) to each part of the compound inequality:

\[ -5+2<x-2+2<5+2. \]

We obtain:

\[ -3<x<7. \]

Hence the solution set is the open interval:

\[ (-3,7) \]

In the alternative notation:

\[ ]-3,7[ \]


Exercise 8 — level ★★☆☆☆

Express, in interval notation, the set of real numbers satisfying:

\[ |x+1|\leq 4 \]

Result

\[ [-5,3] \]

Solution

The quantity:

\[ |x+1| \]

can be rewritten as:

\[ |x-(-1)|. \]

It therefore represents the distance between \(x\) and the point \(-1\).

The inequality:

\[ |x+1|\leq 4 \]

means that the distance between \(x\) and \(-1\) must be less than or equal to \(4\).

Since the symbol \(\leq\) appears, the endpoints of the interval will be included.

We use the property:

\[ |A|\leq r \iff -r\leq A\leq r, \qquad r>0. \]

In our case:

\[ A=x+1,\qquad r=4. \]

We obtain:

\[ -4\leq x+1\leq 4. \]

We subtract \(1\) from each part:

\[ -4-1\leq x+1-1\leq 4-1. \]

Hence:

\[ -5\leq x\leq 3. \]

In interval notation:

\[ [-5,3]. \]


Exercise 9 — level ★★★☆☆

Find:

\[ [1,8]\cap(3,10) \]

Result

\[ (3,8] \qquad \text{or} \qquad ]3,8] \]

Solution

The intersection of two sets contains exactly those elements that belong to both sets at the same time.

Consider the first interval:

\[ [1,8] \]

It contains all real numbers \(x\) such that:

\[ 1\leq x\leq 8. \]

Now consider the second interval:

\[ (3,10). \]

It contains all real numbers \(x\) such that:

\[ 3<x<10. \]

To belong to the intersection, a real number must satisfy both conditions.

We must therefore impose simultaneously:

\[ 1\leq x\leq 8 \]

and:

\[ 3<x<10. \]

The more restrictive constraint on the left is:

\[ x>3. \]

Indeed, if \(x>3\), then automatically \(x\geq1\).

The more restrictive constraint on the right is:

\[ x\leq8. \]

Indeed, if \(x\leq8\), then automatically \(x<10\).

We thus obtain:

\[ 3<x\leq8. \]

Therefore:

\[ [1,8]\cap(3,10)=(3,8] \]


Exercise 10 — level ★★★☆☆

Find:

\[ [0,4]\cup(4,9) \]

Result

\[ [0,9) \qquad \text{or} \qquad [0,9[ \]

Solution

The union of two sets contains all the elements that belong to at least one of the two sets.

The first interval is:

\[ [0,4]. \]

It contains all real numbers between \(0\) and \(4\), endpoints included.

In particular:

\[ 4\in[0,4]. \]

The second interval is:

\[ (4,9). \]

It contains all real numbers strictly between \(4\) and \(9\).

In particular, the number \(4\) does not belong to the second interval, but it does belong to the first.

Hence no gap arises at the point \(4\).

The union contains:

  • all numbers from \(0\) to \(4\), including \(4\);
  • all numbers greater than \(4\) and less than \(9\).

All in all, it contains every real number \(x\) such that:

\[ 0\leq x<9. \]

Therefore:

\[ [0,4]\cup(4,9)=[0,9) \]


Exercise 11 — level ★★★☆☆

Determine whether the set:

\[ [0,2)\cup(2,5] \]

is an interval.

Result

The set is not an interval.

Solution

Recall that a subset \(I\subseteq\mathbb{R}\) is an interval if, given any two of its elements, it also contains every real number lying between them.

Consider the set:

\[ [0,2)\cup(2,5]. \]

The first interval:

\[ [0,2) \]

contains all real numbers \(x\) such that:

\[ 0\leq x<2. \]

The second interval:

\[ (2,5] \]

contains all real numbers \(x\) such that:

\[ 2<x\leq5. \]

Now look at the point \(2\).

It does not belong to the first interval, because the first interval excludes its right endpoint:

\[ 2\notin[0,2). \]

Moreover, it does not belong to the second interval, because the second interval excludes its left endpoint:

\[ 2\notin(2,5]. \]

Hence:

\[ 2\notin[0,2)\cup(2,5]. \]

However:

\[ 1\in[0,2)\cup(2,5] \]

and:

\[ 3\in[0,2)\cup(2,5]. \]

Since:

\[ 1<2<3, \]

we have found two elements of the set, \(1\) and \(3\), such that a number lying between them, namely \(2\), does not belong to the set.

The set therefore has an internal “gap”.

It is worth noting that the set under consideration is a union of two intervals, yet it is not itself an interval of the real line.

Therefore:

\[ [0,2)\cup(2,5] \]

is not an interval.


Exercise 12 — level ★★★☆☆

Determine whether the interval:

\[ [2,+\infty) \]

is open, closed, or neither open nor closed in \(\mathbb{R}\).

Result

The interval \([2,+\infty)\) is closed in \(\mathbb{R}\), but it is not open.

Solution

Consider the interval:

\[ [2,+\infty)=\{x\in\mathbb{R}\mid x\geq2\}. \]

It contains its finite endpoint \(2\), since the square bracket indicates inclusion.

Let us first investigate whether the set is open.

A set is open if every one of its points has an open neighborhood entirely contained in the set.

The point \(2\) belongs to the set:

\[ 2\in[2,+\infty). \]

However, every open neighborhood of \(2\) also contains points less than \(2\).

For example, for every \(r>0\), the neighborhood:

\[ (2-r,2+r) \]

contains points of the interval \((2-r,2)\), which are less than \(2\).

Such points do not belong to \([2,+\infty)\).

Hence no open neighborhood of \(2\) is entirely contained in \([2,+\infty)\).

Therefore \([2,+\infty)\) is not open.

Let us now investigate whether the set is closed.

The complement of \([2,+\infty)\) in \(\mathbb{R}\) is:

\[ \mathbb{R}\setminus[2,+\infty)=(-\infty,2). \]

The interval:

\[ (-\infty,2) \]

is open in \(\mathbb{R}\).

Since the complement of \([2,+\infty)\) is open, it follows that \([2,+\infty)\) is closed.


Exercise 13 — level ★★★★☆

Write the open neighborhood centered at \(-1\) with radius \(3\), both in interval notation and in set-builder notation.

Result

\[ I(-1,3)=(-4,2)=\{x\in\mathbb{R}\mid |x+1|<3\} \]

Solution

An open neighborhood centered at \(x_0\) with radius \(r>0\) is the set of real numbers whose distance from the point \(x_0\) is less than \(r\).

In set-builder notation:

\[ I(x_0,r)=\{x\in\mathbb{R}\mid |x-x_0|<r\}. \]

In this exercise:

\[ x_0=-1,\qquad r=3. \]

Substituting into the definition:

\[ I(-1,3)=\{x\in\mathbb{R}\mid |x-(-1)|<3\}. \]

Since:

\[ x-(-1)=x+1, \]

we obtain:

\[ I(-1,3)=\{x\in\mathbb{R}\mid |x+1|<3\}. \]

To write it in interval notation, we compute the endpoints:

\[ x_0-r=-1-3=-4 \]

and:

\[ x_0+r=-1+3=2. \]

Since it is an open neighborhood, the endpoints are not included.

Hence:

\[ I(-1,3)=(-4,2). \]

Therefore:

\[ I(-1,3)=(-4,2)=\{x\in\mathbb{R}\mid |x+1|<3\} \]


Exercise 14 — level ★★★★☆

Write the closed neighborhood centered at \(4\) with radius \(5\), both in interval notation and in set-builder notation.

Result

\[ \overline{I}(4,5)=[-1,9]=\{x\in\mathbb{R}\mid |x-4|\leq5\} \]

Solution

A closed neighborhood centered at \(x_0\) with radius \(r>0\) is the set of real numbers whose distance from the point \(x_0\) is less than or equal to \(r\).

In set-builder notation:

\[ \overline{I}(x_0,r)=\{x\in\mathbb{R}\mid |x-x_0|\leq r\}. \]

In this case:

\[ x_0=4,\qquad r=5. \]

Substituting into the definition:

\[ \overline{I}(4,5)=\{x\in\mathbb{R}\mid |x-4|\leq5\}. \]

To pass to interval notation, we compute the endpoints.

The left endpoint is:

\[ x_0-r=4-5=-1. \]

The right endpoint is:

\[ x_0+r=4+5=9. \]

Since the neighborhood is closed, the points lying at distance exactly \(5\) from the center are also included.

Indeed:

\[ |-1-4|=|-5|=5 \]

and:

\[ |9-4|=5. \]

Hence the endpoints \(-1\) and \(9\) belong to the neighborhood.

Therefore:

\[ \overline{I}(4,5)=[-1,9]=\{x\in\mathbb{R}\mid |x-4|\leq5\} \]


Exercise 15 — level ★★★★☆

Write the open right neighborhood of \(2\) with radius \(6\).

Result

\[ (2,8) \qquad \text{or} \qquad ]2,8[ \]

Solution

An open right neighborhood of a point \(x_0\) contains only points lying to the right of \(x_0\), that is, points greater than \(x_0\).

If the radius is \(r>0\), the open right neighborhood has the form:

\[ (x_0,x_0+r). \]

In this exercise:

\[ x_0=2,\qquad r=6. \]

We compute the right endpoint:

\[ x_0+r=2+6=8. \]

The open right neighborhood is therefore:

\[ (2,8). \]

It contains all real numbers \(x\) such that:

\[ 2<x<8. \]

The point \(2\) does not belong to the neighborhood, because the open right neighborhood starts at \(2\) but excludes it.

The point \(8\) does not belong to the neighborhood either, because the right endpoint is excluded.


Exercise 16 — level ★★★★☆

Write the open left neighborhood of \(5\) with radius \(4\).

Result

\[ (1,5) \qquad \text{or} \qquad ]1,5[ \]

Solution

An open left neighborhood of a point \(x_0\) contains only points less than \(x_0\).

If the radius is \(r>0\), it has the form:

\[ (x_0-r,x_0). \]

In this exercise:

\[ x_0=5,\qquad r=4. \]

We compute the left endpoint:

\[ x_0-r=5-4=1. \]

Therefore the required open left neighborhood is:

\[ (1,5). \]

This set contains all real numbers strictly between \(1\) and \(5\).

In particular:

  • every point of the neighborhood is less than \(5\);
  • the point \(5\) does not belong to the neighborhood;
  • the endpoint \(1\) is excluded as well.

In set-builder notation:

\[ (1,5)=\{x\in\mathbb{R}\mid 1<x<5\} \]


Exercise 17 — level ★★★★★

Express, as a union of intervals, the deleted neighborhood:

\[ I^\ast(3,2) \]

Result

\[ I^\ast(3,2)=(1,3)\cup(3,5) \]

Solution

By definition, the deleted neighborhood centered at \(x_0\) with radius \(r>0\) is:

\[ I^\ast(x_0,r)=\{x\in\mathbb{R}\mid 0<|x-x_0|<r\}. \]

It is obtained by taking the open neighborhood centered at \(x_0\) and removing the center point.

In this exercise:

\[ x_0=3,\qquad r=2. \]

First consider the associated open neighborhood:

\[ I(3,2)=(3-2,3+2). \]

Computing the endpoints:

\[ 3-2=1 \]

and:

\[ 3+2=5, \]

we obtain:

\[ I(3,2)=(1,5). \]

However, the required neighborhood is deleted.

This means that the center point:

\[ x_0=3 \]

must be removed from the interval.

Removing the point \(3\), the interval splits into two parts:

\[ (1,3) \]

and:

\[ (3,5). \]

Therefore:

\[ I^\ast(3,2)=(1,3)\cup(3,5) \]


Exercise 18 — level ★★★★★

Write a neighborhood of \(+\infty\) determined by \(M=4\).

Result

\[ (4,+\infty) \]

Solution

A neighborhood of \(+\infty\) is an open right half-line of the form:

\[ (M,+\infty), \qquad M>0. \]

It contains all sufficiently large real numbers, that is, those greater than some real value \(M\).

In this exercise:

\[ M=4. \]

Substituting into the definition, we obtain:

\[ (4,+\infty). \]

In set-builder notation:

\[ (4,+\infty)=\{x\in\mathbb{R}\mid x>4\}. \]

This set contains all real numbers greater than \(4\).

The number \(4\) does not belong to the neighborhood, since the round bracket indicates that the endpoint is excluded.

Moreover, the symbol \(+\infty\) does not represent a real number and therefore cannot be included in the interval.

Neighborhoods of \(+\infty\) are not neighborhoods in the ordinary sense based on the distance between real numbers; rather, they are a fundamental convention in the study of limits at infinity.


Exercise 19 — level ★★★★★

Write a neighborhood of \(-\infty\) determined by \(M=6\).

Result

\[ (-\infty,-6) \]

Solution

A neighborhood of \(-\infty\) is an open left half-line of the form:

\[ (-\infty,-M), \qquad M>0. \]

It contains all sufficiently small real numbers, that is, numbers that are negative and very large in absolute value.

In this exercise:

\[ M=6. \]

Therefore:

\[ -M=-6. \]

Substituting into the definition of a neighborhood of \(-\infty\), we obtain:

\[ (-\infty,-6). \]

In set-builder notation:

\[ (-\infty,-6)=\{x\in\mathbb{R}\mid x<-6\}. \]

The set therefore contains all real numbers less than \(-6\).

The number \(-6\) does not belong to the neighborhood, because the endpoint is excluded.

Neighborhoods of \(-\infty\) are not neighborhoods in the ordinary sense based on the distance between real numbers; rather, they are a fundamental convention in the study of limits at infinity.


Exercise 20 — level ★★★★★

Find the solution set of the inequality:

\[ |x-1|<|x+3| \]

Result

\[ (-1,+\infty) \]

Solution

The quantity:

\[ |x-1| \]

represents the distance of the point \(x\) from the number \(1\).

Likewise:

\[ |x+3|=|x-(-3)| \]

represents the distance of the point \(x\) from the number \(-3\).

The inequality:

\[ |x-1|<|x+3| \]

therefore means that \(x\) must be closer to \(1\) than to \(-3\).

Let us solve the inequality algebraically.

Since both sides are non-negative, we may square them without changing the direction of the inequality:

\[ (x-1)^2<(x+3)^2. \]

Expanding the squares:

\[ x^2-2x+1<x^2+6x+9. \]

Subtracting \(x^2\) from both sides:

\[ -2x+1<6x+9. \]

Moving the terms containing \(x\) to the left:

\[ -8x+1<9. \]

Subtracting \(1\):

\[ -8x<8. \]

Now we divide by \(-8\).

Since we are dividing by a negative number, the direction of the inequality reverses:

\[ x>-1. \]

Therefore the solution set is:

\[ (-1,+\infty). \]

Geometrically, the dividing point is the midpoint between \(-3\) and \(1\), that is:

\[ \frac{-3+1}{2}=-1. \]

All points lying to the right of \(-1\) are therefore closer to \(1\) than to \(-3\).


Your feedback is important to us! Leave a comment and help us improve this content. Thank you!

Feedback

Support us by liking the page:
Or, share:

Tags

  • Mathematical Analysis 1

Support us by liking the page:
Or, share:

Copyright © 2026 | Pimath | All Rights Reserved