The set builder calculator is a helpful tool for generating and populating a set of numbers that you can later use for plotting, mathematical analysis, and much more. Keep reading if you want to learn:
- What intervals are and how to represent them;
- What the set builder notation is;
- How to calculate the set builder notation form for any interval;
- What the roster form of a set is;
- How to calculate the roster form from the set builder notation form; and
- Much more.
Intervals in math: a prelude to the set builder notation
An interval in math is a comprehensive set of numbers between two endpoints. If you imagine the numbers placed in an ordered fashion on a line, an interval would be a segment on this line. By definition, intervals are defined on real numbers, so this segment is continuous.
The endpoints of an interval are the starting and ending points of the segment on the number line. We can define different types of intervals depending on the kind of endpoints:
- Closed intervals — the endpoints are included in the interval. We denote such an interval with square brackets:
[a, b]. - Open intervals — the endpoints are excluded from the interval. In this case, we use round brackets:
(a, b). - Mixed (half-open) intervals — one of the endpoints is included and the other is excluded:
[a, b)or(a, b].
When representing an interval on the number line, we use filled dots for included endpoints and empty dots for excluded ones. Our calculator draws exactly this picture for you.
💡 A good example of an interval is the domain of the tangent function, which is defined as integer multiples of the interval between (excluded)
-π/2andπ/2.
Calculating the set builder notation
If you want to restrict an interval to a defined set of numbers following specific rules, you need the set builder notation (or set builder form). To calculate it, you need:
- The interval where the set is defined;
- The set from which you draw the desired numbers (integer, natural, real, etc.); and
- Any other conditions that the numbers must satisfy, if specified.
Once you know these quantities, you can calculate the set builder notation for an interval by following these steps:
- Wrap the entire expression in curly brackets
{ }, as we are dealing with an enumeration of elements. - Begin the content of the brackets with the conventional expression
x |, which you can read as "the set composed of elements x such that…". - Define the interval using inequalities:
- An inclusive endpoint corresponds to a less/greater than or equal to sign:
≤or≥; and - An exclusive endpoint corresponds to the simple inequality sign
<or>.
xin the center, as the number lies between the two endpoints. The result looks something likea < x ≤ b. - An inclusive endpoint corresponds to a less/greater than or equal to sign:
- Define the set to which the numbers belong using the set operator
∈:x ∈ ℕmeans that x belongs to the natural numbers;x ∈ ℤmeans the numbers belong to the integers; andx ∈ ℝmeans we are dealing with the real numbers.
- Add any specified condition — for example, if you want x to be even or odd.
Calculating the set builder form: an example
Say we want all the integers greater than 0 and at most 7. We combine the pieces above:
{ x | 0 < x ≤ 7, x ∈ ℤ }
Read aloud, this is: "the set of all x such that x is greater than 0 and at most 7, and x is an integer." Because we chose the integers, the interval (0, 7] is restricted to just a handful of numbers instead of the whole continuous segment.
Calculating the roster form of a set
The roster form (or enumeration form) simply lists every element of the set between curly brackets, separated by commas. It is the most explicit way to describe a set.
You can only calculate the roster form when the set is discrete and finite — that is, when you draw from the integers, natural, or whole numbers and the interval is bounded. For our example above:
{ x | 0 < x ≤ 7, x ∈ ℤ } = { 1, 2, 3, 4, 5, 6, 7 }
If the set is drawn from the real numbers, the roster form cannot be written out — between any two real numbers there is always another, so you can never list them all. In that case, the interval itself is the most compact description.
How to use our set builder calculator
- Choose the number set — integers
ℤ, natural numbersℕ, whole numbersℕ0, or real numbersℝ. - Enter the interval: pick the bracket on each side — round
( )for an excluded endpoint, square[ ]for an included one, or infinity for an unbounded side — and type the endpoints. - Optionally add a condition (even, odd, or multiple of k) to filter the elements further.
- Read off the results: the calculator returns the set builder notation, the roster form, the interval notation, the matching inequality, the number of elements, and a number-line picture.
- If your elements represent a price or a measurement, switch on the optional value box to see the total in 20 world currencies or in metric / US units.
Frequently Asked Questions
What is set builder notation?
Set builder notation describes a set by stating the property its members share, rather than listing them. It has the form { x | condition }, read as "the set of all x such that the condition holds". For example, { x | 1 ≤ x ≤ 5, x ∈ ℤ } is the set of integers from 1 to 5.
What is the difference between set builder form and roster form?
Set builder form states a rule ({ x | 1 ≤ x ≤ 5, x ∈ ℤ }), while roster form lists the actual members ({ 1, 2, 3, 4, 5 }). Roster form is only possible when the set is discrete and finite.
Why can't I list the elements of a real interval?
The real numbers are dense: between any two of them lies another. Because of this, a real interval such as [0, 1] contains infinitely many — in fact uncountably many — numbers, so no list can ever contain them all.
Does infinity get a square bracket or a round bracket?
Always a round bracket. Infinity is not a real number, so it can never be "included" as an endpoint: we write (a, ∞) or (-∞, b).
Are the natural numbers the same as the whole numbers?
Not quite. In this calculator the natural numbers ℕ start at 1 (1, 2, 3, …), while the whole numbers ℕ0 also include 0 (0, 1, 2, 3, …). The integers ℤ add the negative numbers as well.