← MATH 114 MathScape 0 MATH114

Set-Builder and Interval Notation

7 min read

Jump to a section

Textbook Reference

Primary source OpenStax College Algebra 2e, Section 3.2: “Domain and Range”
Direct link https://openstax.org/books/college-algebra-2e/pages/3-2-domain-and-range

This source is free and openly licensed. College Algebra 2e Section 3.2 introduces set-builder and interval notation as the language for describing domains and ranges.


Key idea

Interval notation is a compact way to name a stretch of the number line, and the only thing you must decide is whether each endpoint is included or left out.

Picture a piece of the number line, say all numbers from $2$ to $5$. The only real question is what happens at the two ends: is $2$ itself part of the stretch, or just everything above it? Interval notation answers this with a single bracket on each side. A square bracket means “include this endpoint”; a round parenthesis means “leave this endpoint out”. That one choice, bracket or parenthesis, carries all the meaning.

This means: do not memorize four separate notations. Picture the number line, mark the two endpoints, and decide for each end whether it is filled in (bracket) or open (parenthesis). The notation writes itself.


Prerequisite Check

Before this lesson, make sure you can do all of the following:

If inequality symbols are unfamiliar, a brief review of them will help before continuing.


Quick Reference

Three ways to describe the same set of numbers.

Description Inequality Set-builder Interval
from $2$ to $5$, both ends in $2 \le x \le 5$ $\{x \mid 2 \le x \le 5\}$ $[2, 5]$
from $2$ to $5$, both ends out $2 < x < 5$ $\{x \mid 2 < x < 5\}$ $(2, 5)$
$2$ in, $5$ out $2 \le x < 5$ $\{x \mid 2 \le x < 5\}$ $[2, 5)$
everything from $2$ up $x \ge 2$ $\{x \mid x \ge 2\}$ $[2, \infty)$
everything below $5$ $x < 5$ $\{x \mid x < 5\}$ $(-\infty, 5)$
all real numbers (no restriction) $\{x \mid x \in \mathbb{R}\}$ $(-\infty, \infty)$

The bracket rule.

Combining pieces. The union symbol $\cup$ joins two separate stretches: $(-\infty, 1) \cup (1, \infty)$ means “every real number except $1$”.


Key Concepts

1. Set-Builder Notation

Set-builder notation describes a set by stating the condition its members satisfy. The vertical bar $\mid$ is read “such that”.

\[ \{x \mid x > 3\} \quad \text{reads} \quad \text{"the set of all } x \text{ such that } x \text{ is greater than } 3\text{"} \]

Example 1. Translate “all real numbers at least $-2$” into set-builder notation.

“At least $-2$” means $x \ge -2$. In set-builder notation: $\{x \mid x \ge -2\}$.


2. Interval Notation and the Bracket Rule

Interval notation names a stretch of the number line with two endpoints and two brackets. A square bracket includes the endpoint; a round parenthesis excludes it.

Example 2. Write $[1, 4]$, $(1, 4)$, and $[1, 4)$ as inequalities.

Important: match the bracket to the inequality. A square bracket pairs with $\le$ or $\ge$ (endpoint included); a parenthesis pairs with $<$ or $>$ (endpoint excluded). Writing $[1, 4]$ for $1 < x < 4$ wrongly includes the endpoints.


3. Infinity Always Takes a Parenthesis

When a set extends forever in one direction, use the infinity symbol with a parenthesis, because infinity is a direction, not a reachable number.

Example 3. Write $x \ge 2$ and $x < 5$ in interval notation.

Important: never put a square bracket on infinity. Writing $[2, \infty]$ is incorrect, because you cannot “include” infinity as an endpoint. Infinity always gets a parenthesis: $[2, \infty)$.


4. The Order of Endpoints

In interval notation the smaller number is always written first, on the left, matching the number line’s left-to-right order.

Example 4. Write “between $-3$ and $1$, both excluded” in interval notation.

The smaller endpoint $-3$ goes first: $(-3, 1)$.

Important: write the endpoints in increasing order. An interval such as $(1, -3)$ is meaningless, because the left endpoint must be the smaller one. Always put the smaller value first.


5. Combining Intervals with Union

When a set is made of two separate stretches, join them with the union symbol $\cup$.

Example 5. Write “all real numbers except $0$” in interval notation.

Remove the single point $0$ from the line, leaving everything below and everything above: \[ (-\infty, 0) \cup (0, \infty) \] Each piece excludes $0$, and the union puts them together.

Self-check: Write $-1 \le x < 4$ in interval notation, and write $[0, \infty)$ as an inequality.

$-1 \le x < 4$ includes $-1$ (square bracket) and excludes $4$ (parenthesis): $[-1, 4)$. And $[0, \infty)$ includes $0$ and runs forever upward, so the inequality is $x \ge 0$.


Common Errors Summary

Error Example Correction
Wrong bracket for the inequality writing $[1,4]$ for $1 < x < 4$ Use parentheses for strict inequality: $(1,4)$
Square bracket on infinity $[2, \infty]$ Infinity always gets a parenthesis: $[2, \infty)$
Endpoints out of order $(4, 1)$ Smaller first: $(1, 4)$
Using a comma instead of union $(-\infty, 0), (0, \infty)$ Join separate pieces with $\cup$
Confusing $\{x \mid \dots\}$ with a single value reading set-builder as one number It names a whole set, not one number

Common Misconceptions

Common misconception

infinity can be included as an endpoint with a square bracket.

This is the concept-image-conflicts-definition error. Infinity is a direction, not a number that can be reached or included in a set. Writing $[2, \infty]$ with a square bracket on the right implies that $\infty$ is the largest element of the set, which it is not. The correct notation is $[2, \infty)$, where the parenthesis signals that the set extends without bound in the positive direction but never closes at a specific value. The same applies to $(-\infty, 5]$: the left side must always use a parenthesis regardless of whether the right endpoint is included.


Leveled Practice

Level 1 -- Direct Application

Problem 1. Write $x \le 7$ in interval notation.

Show answer

Extends leftward forever, including $7$: $(-\infty, 7]$.


Problem 2. Write $(3, 8]$ as an inequality.

Show answer

Excludes $3$, includes $8$: $3 < x \le 8$.


Problem 3. Write “all real numbers” in interval notation.

Show answer

$(-\infty, \infty)$.


Level 2 -- Translating

Problem 4. Write “$x$ is greater than $-5$ and at most $2$” in interval notation.

Show answer

Greater than $-5$ (excluded) and at most $2$ (included): $(-5, 2]$.


Problem 5. Write the set-builder notation for the interval $[-4, 0)$.

Show answer

Includes $-4$, excludes $0$: $\{x \mid -4 \le x < 0\}$.


Level 3 -- Combining

Problem 6. Write “all real numbers except $3$ and $5$” in interval notation.

Show answer

Remove both points, leaving three pieces: \[ (-\infty, 3) \cup (3, 5) \cup (5, \infty) \]


Problem 7. A classmate writes the set $x \ge 1$ as $[1, \infty]$. Identify the error and give the correct notation.

Show answer

The square bracket on infinity is wrong, because infinity is not a reachable endpoint that can be included. The correct interval is $[1, \infty)$: a square bracket on $1$ (included) and a parenthesis on infinity.


Mastery Checklist

You have mastered this skill when you can do all of the following without referring to notes:


Mental Model

Think of an interval as a strip of tape laid on the number line, with a decision at each end.

Lay the tape from the smaller endpoint to the larger one. At each end you decide: is the very last point under the tape, or does the tape stop just short of it? A filled-in end (square bracket) keeps the endpoint; an open end (parenthesis) drops it. Infinity is the end of a roll that never runs out, so it can never be a filled point; it always gets a parenthesis. If your set is two separate strips with a gap between them, the union symbol staples the two pieces into one description. Picture the tape and the two end decisions, and the notation follows directly.


Connections

Within MATH 114

Toward Calculus

Audience Notes

For students who find math intimidating: There is really one decision per endpoint: filled in or open. Square bracket means filled, parenthesis means open. Picture the number line and you will never have to memorize a table.

For students interested in proof: Set-builder notation is the entry point to the precise language of sets that all of higher mathematics is written in. The “such that” bar and the membership idea recur in every later proof course.

For students interested in careers: Ranges of valid values, such as acceptable temperatures, allowed array indices, or confidence intervals in statistics, are described exactly this way. The included-or-excluded endpoint distinction is the difference between a safe and an off-by-one boundary in real systems.


Back to MATH 114 Skills | Previous: Evaluating Functions | Next: Domain and Range