What is set-builder notation?
Set-builder notation describes a set by the rule its members follow instead of listing them. {x | x > 3} reads "the set of all x such that x is greater than 3." The letter before the bar names the variable. The bar means "such that." Everything after it is the condition.
It is one of three ways algebra class writes the same set of numbers. The other two are interval notation, (3, ∞), and a plain inequality, x > 3. All three say the same thing. Teachers ask you to move between them because each one is handy somewhere else: inequalities come out of solving equations, intervals show up in domain and range questions, and set-builder is the only one that can say "every number except 3" in a single line.
The notation goes back to the late 1800s, when mathematicians needed a precise way to talk about infinite sets. Today it lives on Algebra 1 and precalculus worksheets, usually as an instruction like "write the solution in set-builder and interval notation." That instruction is the whole job of the Set Builder Notation Calculator. Type the set once, in whatever form you have, and it writes it every other way and draws it on a number line. There's no account and no step paywall.
How to use the Set Builder Notation Calculator
- Type your set in the notation you already have.
-2 <= x < 5,[-2, 5)and{x | -2 ≤ x < 5}all work. You don't pick a "from" or "to" format. The calculator recognizes what you typed. - Use keyboard symbols if you don't have the math ones:
>=for ≥,<=for ≤,!=for ≠,inffor ∞, andUororfor a union. - Read the answer as you type. Set-builder, interval and inequality notation appear together, with a number line underneath. There's no Calculate button.
- Switch the domain to Integers (ℤ) if your worksheet is about whole numbers. You'll get roster form, the list of members, instead of an interval.
- Press Copy next to the row your homework asks for. You copy exactly what's on screen, and negative numbers use a plain hyphen so they paste into any homework portal.
That's it. Open, type, copy, leave. Most homework-solver sites make you pick a conversion direction from a dropdown, load a full algebra engine to move a parenthesis, and then hide the explanation behind a subscription. This page does one thing, and it tells you why along the way.
How to convert between set-builder, interval and inequality notation
Every conversion comes down to two questions about each end of the set. Where does it stop? And is the stopping point included?
Square bracket [ ] = the endpoint is included (≤ or ≥). Round parenthesis ( ) = it isn't (< or >). Infinity always gets a round parenthesis.
Infinity gets a parenthesis because no real number equals ∞, so there's nothing to include. If you type [-inf, 2], the calculator corrects it to (-∞, 2]. It doesn't throw an error, because the set you meant is clear.
A worked example
Say your worksheet gives you -2 ≤ x < 5.
- Left end: the set starts at -2 and includes it, because the sign is ≤. That's a square bracket:
[-2. - Right end: the set stops at 5 but doesn't include it, because the sign is <. That's a round parenthesis:
5). - Interval:
[-2, 5). - Set-builder: wrap the inequality in braces with the variable and a bar:
{x | -2 ≤ x < 5}.
On the number line, -2 gets a filled dot, 5 gets an open dot, and the segment between them is shaded. Type -2 <= x < 5 into the Set Builder Notation Calculator and you'll see those exact strings.
Going the other way
Reading an interval back into an inequality is the same rule in reverse. (-3, 1/2] means greater than -3 and at most 1/2, so the inequality is -3 < x ≤ 1/2 and the set-builder form is {x | -3 < x ≤ 1/2}. The calculator keeps fractions as fractions. It compares bounds with exact arithmetic, never rounded decimals, so two intervals that touch at 1/3 are treated as touching.
It also tidies up the way a teacher expects a final answer. 3 < x becomes x > 3, with the variable on the left. 5 > x > -2 becomes -2 < x < 5, running from small to large. Any single letter works as the variable, too: t >= 0 gives {t | t ≥ 0} and [0, ∞).
Common sets in every notation
These are the shapes that come up on nearly every worksheet. Each row is real output from the calculator.
| You type | Set-builder | Interval | Inequality |
|---|---|---|---|
x > 3 | {x | x > 3} | (3, ∞) | x > 3 |
x >= 0 | {x | x ≥ 0} | [0, ∞) | x ≥ 0 |
-2 <= x < 5 | {x | -2 ≤ x < 5} | [-2, 5) | -2 ≤ x < 5 |
(-inf, -1) U [4, inf) | {x | x < -1 or x ≥ 4} | (-∞, -1) ∪ [4, ∞) | x < -1 or x ≥ 4 |
x != 3 | {x | x ≠ 3} | (-∞, 3) ∪ (3, ∞) | x ≠ 3 |
x > 0 and x != 3 | {x | x > 0 and x ≠ 3} | (0, 3) ∪ (3, ∞) | x > 0 and x ≠ 3 |
x < 5 or x > 2 | {x | x ∈ ℝ} | (-∞, ∞) | all real numbers |
x > 3 and x < 1 | ∅ | ∅ | no solution |
Look at the x != 3 row. Set-builder says it in five characters. Interval notation needs two pieces and a union symbol, because an interval can't have a hole in the middle. That's why set-builder exists.
The last two rows are the ones students get marked down on. x < 5 or x > 2 covers the whole number line, since every number is either below 5 or above 2. x > 3 and x < 1 covers nothing, since no number is both. An interval notation calculator that just echoes your pieces back would print two intervals for each. This one simplifies them to (-∞, ∞) and ∅. It also merges pieces that touch: (-∞, 2] ∪ [2, 5) becomes (-∞, 5).
Integers and roster form
Switch the domain to Integers (ℤ) and the answer changes, not just the formatting. An interval contains every real number between its ends, decimals included. The integers from -2 to 2 are five separate points with gaps between them. So over ℤ there is no interval notation, and the Set Builder Notation Calculator shows roster form instead.
| Integers (ℤ), you type | Set-builder | Roster form |
|---|---|---|
-2 <= x < 3 | {x ∈ ℤ | -2 ≤ x < 3} | {-2, -1, 0, 1, 2} |
x > -1 and x < 1 | {x ∈ ℤ | -1 < x < 1} | {0} |
x >= 4 | {x ∈ ℤ | x ≥ 4} | {4, 5, 6, …} |
x > 2.5 | {x ∈ ℤ | x > 2.5} | {3, 4, 5, …} |
x < 0 | {x ∈ ℤ | x < 0} | {…, -3, -2, -1} |
0 <= x <= 30 | {x ∈ ℤ | 0 ≤ x ≤ 30} | {0, 1, 2, …, 30} |
2.2 < x < 2.8 | ∅ | ∅ |
Short lists are written out in full. Longer ones use an ellipsis between the first few members and the last. Sets that run forever end, or start, with "…". If you type {x ∈ Z | x > 0} while the domain is still on real numbers, the control flips to ℤ on its own and you get {1, 2, 3, …}.
Edge cases and common mistakes
If the Set Builder Notation Calculator won't give you an answer, one of these is usually why. Here's what to try first.
- A backwards interval.
[5, 1]gets the reply "[5, 1] runs backwards. The smaller number goes first: [1, 5]." Swap the numbers and you're done. - A chain that points two ways.
3 < x > 5doesn't describe one range. Split it with "and" or "or", depending on what the problem means. - A list.
{1, 2, 3}is already roster form. The calculator rewrites rules into notation, but it won't guess the rule behind a list, because{2, 4, 6}could be "even numbers" or just those three values. - ℕ, the natural numbers. Textbooks disagree about whether 0 counts. Rather than silently pick one and give half its users the wrong set, the calculator asks you to write
x ∈ ℤwithx ≥ 0orx ≥ 1. - A single point.
[3, 3]is the set containing only 3. It prints as{3}and{x | x = 3}, since a single point isn't written as an interval.(3, 3)is empty.
This calculator rewrites a set. It doesn't solve for it. If your problem says 2x + 1 > 7, solve it first (subtract 1, divide by 2), then type the result, x > 3.
One more limit. The output uses American notation: a decimal point, a comma between interval bounds, and round parentheses for open ends. Some countries write (a; b) or ]a, b[ instead. If your class does, the bracket logic is identical. Swap the separator by hand.
Related calculations
Sets with fractional bounds are common, and it helps to have the fraction in its simplest form before you write the interval. The fraction simplifier reduces 6/12 to 1/2 in one step. The decimal to fraction converter turns 0.375 into 3/8 when your teacher wants exact bounds. If the same worksheet has you comparing fractions, the equivalent fractions calculator shows which ones are the same number in disguise. And once you move on to graphing lines, the slope calculator handles rise over run and the equation of a line through two points.
Frequently asked questions
Does it matter if I write 3 < x or x > 3?
No. Both say the same thing, and the calculator gives identical output for each: {x | x > 3} and (3, ∞). It puts the variable on the left because that's the form most answer keys use.
How do I write "x is not equal to 3" in interval notation?
Use two intervals joined by a union: (-∞, 3) ∪ (3, ∞). Both ends at 3 are round parentheses, because 3 is the one number left out. In set-builder it's shorter: {x | x ≠ 3}.
How do I type ≤, ≥ and ∞ on a normal keyboard?
You don't need to. Type <=, >=, != and inf, and the calculator reads them as ≤, ≥, ≠ and ∞. The output uses the proper symbols, so what you copy looks like the textbook.
Why does my answer show 1/2 instead of 0.5?
The calculator prints a bound the way you first typed it. If you enter x > 1/2 or x > 0.5, it sees that both pieces are the same set and keeps one: (1/2, ∞). Type 0.5 first if your worksheet uses decimals.
Can I use a letter other than x?
Yes. Any single letter works and carries through to every notation. t >= 0 gives {t | t ≥ 0}, [0, ∞) and t ≥ 0.
What do the open and filled dots on the number line mean?
A filled dot means the endpoint is in the set, matching a square bracket and ≤ or ≥. An open dot means it isn't, matching a round parenthesis and < or >. An arrow means the set keeps going toward ∞ in that direction. Over the integers, the line shows separate dots instead of shading.