How to Write Domain and Range in Interval Notation
You’ve probably seen those weird brackets and parentheses in algebra books and thought, “What the heck does that even mean?” The truth is, once you get the hang of interval notation, it’s just a clean way to describe sets of numbers. And if you’re ever stuck on a math test, homework, or a data science interview, knowing how to write domain and range in this format can save you a lot of time and confusion.
What Is Interval Notation?
Think of interval notation as a shorthand for “all the numbers between two points.” Instead of writing out a list or a sentence, you use symbols that instantly tell the reader whether the endpoints are included or excluded Easy to understand, harder to ignore..
- Parentheses ( ) mean exclude the endpoint.
- Brackets [ ] mean include the endpoint.
So, ([2, 5)) reads as “all numbers from 2 up to, but not including, 5.”
When you’re dealing with domain (the set of all possible input values) or range (the set of all possible output values) of a function, interval notation keeps everything tidy, especially when the sets are infinite or have multiple pieces.
Why It Matters / Why People Care
You might wonder why anyone would bother learning this special syntax. Here are a few real‑world reasons:
- Precision – In calculus, you need to know exactly where a function is defined or where it can output values.
- Clarity – A teacher can see at a glance that you understand the bounds of a function.
- Data Science – When you’re fitting models, you often constrain parameters to ranges like ([0, 1]) or ((-\infty, 0]).
- Coding – Many programming languages use interval notation (or something similar) in regular expressions, regex ranges, or when defining ranges for loops.
Missing a bracket or a parenthesis can change the meaning entirely: ([0, 1]) includes both 0 and 1, but ((0, 1)) excludes them both. That tiny detail can be the difference between a correct answer and a math‑error And that's really what it comes down to..
How It Works (or How to Do It)
Let’s break this down step by step. We’ll cover basic intervals, infinite intervals, unions, and how to write domain and range specifically.
Basic Intervals
| Endpoint | Symbol | Means |
|---|---|---|
| Start inclusive | ([a, …) | Include a |
| Start exclusive | ((a, …) | Exclude a |
| End inclusive | (..., b]) | Include b |
| End exclusive | (..., b)) | Exclude b |
Examples:
- ([3, 7]) → 3, 4, 5, 6, 7
- ((−1, 4)) → any number greater than –1 and less than 4
Infinite Intervals
Use ((-\infty, …) or (..., \infty)) to denote that the interval stretches forever.
- ((−\infty, 5)) → all numbers less than 5
- ([10, \infty)) → all numbers 10 and above
Unions of Intervals
Sometimes a domain or range isn’t a single continuous stretch. You combine intervals with a union symbol, which in plain text is often written as ( \cup ) or just “or.”
- ([−2, 0] \cup [3, 5]) → numbers from –2 to 0 or from 3 to 5
Domain in Interval Notation
The domain is the set of all inputs (x) for which the function is defined. To write it:
- Identify restrictions – division by zero, square roots of negatives, logarithms of non‑positive numbers, etc.
- Solve the inequalities – find the values that satisfy the restrictions.
- Express the solution – use brackets or parentheses accordingly.
Example 1: (f(x) = \frac{1}{x-3})
- Restriction: denominator ≠ 0 → (x ≠ 3)
- Domain: ((−\infty, 3) \cup (3, \infty))
Example 2: (g(x) = \sqrt{x+1})
- Restriction: inside the root ≥ 0 → (x+1 ≥ 0 → x ≥ -1)
- Domain: ([−1, \infty))
Range in Interval Notation
The range is the set of all possible output values (y). The process is similar but you look at the function’s output behavior.
- Determine the output limits – consider asymptotes, minimum/maximum values, etc.
- Solve for (y) – sometimes you’ll need to isolate (y) or analyze the function’s behavior.
- Write the interval – again, use brackets or parentheses.
Example 1: (f(x) = \frac{1}{x-3})
- As (x) approaches 3 from either side, (f(x)) goes to ±∞.
- As (x) goes to ±∞, (f(x)) approaches 0 but never actually reaches 0.
- Range: ((−\infty, 0) \cup (0, \infty))
Example 2: (h(x) = x^2)
- Minimum value 0 at (x=0).
- No upper bound.
- Range: ([0, \infty))
Common Mistakes / What Most People Get Wrong
- Mixing up brackets and parentheses – forgetting that ((a, b)) excludes both ends while ([a, b]) includes them.
- Forgetting to split at discontinuities – writing ((−\infty, \infty)) when the function actually skips a value (like (x=3) in (\frac{1}{x-3})).
- Assuming the range always starts at the minimum output – many functions have gaps or asymptotes that create missing output values.
- Using the wrong symbols for infinity – writing ((−∞, 5]) is fine, but some people mistakenly use a bracket before (-\infty), which is nonsensical.
- Not checking both domain restrictions and output behavior – especially for inverse functions where the domain and range swap.
Practical Tips / What Actually Works
- Sketch it first – a quick graph can reveal asymptotes, intercepts, and range gaps.
- Write the inequalities before converting to interval notation.
- Double‑check endpoints – test values just inside and just outside the boundaries.
- Use a calculator for complex functions to spot any hidden restrictions.
- Practice with real functions – try writing the domain and range of (\sin(x)), (\ln(x)), or piecewise functions.
- Keep a cheat sheet – a small list of common interval patterns (e.g., ([a, b)), ((−\infty, c]), etc.) can speed up writing.
FAQ
Q1: How do I write a domain that excludes a single point?
A1: Use a union of two intervals, like ((−\infty, a) \cup (a, \infty)).
Q2: What if a function has multiple gaps in its domain?
A2: List each continuous piece with the union symbol, e.g., ([−5, −2] \cup [0, 3] \cup (4, \infty)).
Q3: Can I use “or” instead of the union symbol?
A3: In plain text, “or” works, but in formal math writing, the union symbol (\cup) is preferred.
Q4: How do I express a range that includes negative infinity?
A4: Use ((−\infty, b]) or ((−\infty, b)) depending on whether (b) is included.
Q5: Why does ([0, \infty)) mean “all non‑negative numbers”?
A5: The bracket at 0 includes 0, and (\infty) indicates the interval extends forever to the right That alone is useful..
You’re now equipped to read, write, and interpret domain and range in interval notation with confidence. Think about it: whether you’re tackling algebra, calculus, or data science, this concise notation keeps your math clean and unmistakably clear. Happy interval‑writing!