Set Builder Notation Calculator

Generate sets from conditions and convert between set-builder and roster notation with step-by-step solutions.

Define Your Set

Result

Set-Builder Notation
--
Roster Notation --
Number of Elements --
Minimum Element --
Maximum Element --
Sum of Elements --

Step-by-Step Solution

What Is Set Builder Notation?

Set builder notation is a mathematical shorthand for describing a set by stating the properties that its members must satisfy. Instead of listing every element (roster notation), you describe the rule for membership. It is written as {x | condition} or {x : condition}, read as "the set of all x such that condition."

Common Set Builder Forms

Greater Than

All integers greater than a given value.

{x ∈ Z | x > a}

Between Two Values

All integers between two bounds.

{x ∈ Z | a < x < b}

Even Numbers

All even integers in a range.

{x ∈ Z | x = 2k, a ≤ x ≤ b}

Multiples

All multiples of k in a range.

{x ∈ Z | x = nk, a ≤ x ≤ b}

Set Builder vs Roster Notation

Set Builder Notation

Describes a set by a rule: {x | x is an even integer, 1 ≤ x ≤ 10}. This is concise and works well for large or infinite sets.

Roster Notation

Lists all elements explicitly: {2, 4, 6, 8, 10}. This is clear for small, finite sets but impractical for large or infinite sets.

Examples

  • {x ∈ Z | 0 < x < 6} = {1, 2, 3, 4, 5}
  • {x ∈ Z | x is even, 1 ≤ x ≤ 10} = {2, 4, 6, 8, 10}
  • {x ∈ Z | x is a multiple of 3, 1 ≤ x ≤ 15} = {3, 6, 9, 12, 15}
  • {x ∈ Z | x > 5} = {6, 7, 8, 9, ...} (infinite set)

Applications

  • Defining domains and ranges of functions.
  • Specifying solution sets for equations and inequalities.
  • Database queries (conceptually similar to SQL WHERE clauses).
  • Programming: list comprehensions in Python are inspired by set builder notation.